Closed
Description
Consider the following specification,
name: dummypkg
version: 0
build-type: Simple
cabal-version: >=2.0
library
default-language: Haskell2010
build-tool-depends: mtl:imaginary-exe
when invoking new-build
, this silently succeeds. And also, plan.json
doesn't record any exe-depends
from dummypkg-0-inplace
on mtl
as it would if build-tool-depends
referred to an actually existing executable:
{
"type": "configured",
"id": "dummypkg-0-inplace",
"pkg-name": "dummypkg",
"pkg-version": "0",
"flags": {},
"style": "local",
"dist-dir": ".../dist-newstyle/build/x86_64-linux/ghc-8.2.1/dummypkg-0",
"depends": [],
"exe-depends": [],
"component-name": "lib"
},
For a build-tool-depends
declaration, I'd expect the solver to require the existence of that executable in the respective package as a constraint to solve for. The reason being is that packages may start out as a library, and in later releases start adding an executable. Or sometimes executables may get renamed or removed.
/cc @grayjay @Ericson2314