You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
build-tool-depends silently ignored for non-existent executable #4781
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:
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.
Can we make specific constraints, including only versions of package with an executable requested. That should work even we don't have per-component solving
That would be nice. To be clear, this still fails on the Cabal library side of things, right? I added a bunch of tests and stuff for those failure cases.
@GrayJay when the build-tool-depends executable is requested, we could elaborate that into more precise constraints than just package (+ bounds). I don't know how it happens now though :(
I think that would need to happen in the solver, after it chooses to build a package that has a build-tool-depends dependency. That corresponds to the first tree transformation that I described under "Component dependency validation steps" in #4087 (comment). I don't think we need to add the other tree transformations as long as we continue to require the dependencies for all executables for each package.
Activity
sebright commentedon Sep 23, 2017
It looks like cabal doesn't solve for specific executables yet:
cabal/cabal-install/Distribution/Solver/Modular/IndexConversion.hs
Lines 374 to 376 in d53b6e0
That will probably require #4087.
Ericson2314 commentedon Sep 23, 2017
@GrayJay yeah that was a stop-gap in lieu of per-component solving. Is a better solution possible now?
phadej commentedon Sep 23, 2017
Can we make specific constraints, including only versions of package with an executable requested. That should work even we don't have per-component solving
Ericson2314 commentedon Sep 23, 2017
That would be nice. To be clear, this still fails on the Cabal library side of things, right? I added a bunch of tests and stuff for those failure cases.
sebright commentedon Sep 25, 2017
@Ericson2314 I don't know of a better solution now.
@phadej Where would the constraints be specified? It seems like that would be easier to implement than complete per-component dependency solving.
phadej commentedon Sep 25, 2017
@GrayJay when the build-tool-depends executable is requested, we could elaborate that into more precise constraints than just package (+ bounds). I don't know how it happens now though :(
sebright commentedon Sep 25, 2017
I think that would need to happen in the solver, after it chooses to build a package that has a build-tool-depends dependency. That corresponds to the first tree transformation that I described under "Component dependency validation steps" in #4087 (comment). I don't think we need to add the other tree transformations as long as we continue to require the dependencies for all executables for each package.
Start checking for executables for build-tool-depends (issue haskell#…
Solver: Enforce dependencies on executables (fixes haskell#4781).
Solver: Enforce dependencies on executables (fixes haskell#4781).
Merge pull request #4884 from grayjay/issue-4781
Solver: Enforce dependencies on libraries (fixes haskell#779).
Solver: Enforce dependencies on libraries (fixes haskell#779).
Solver: Enforce dependencies on libraries (fixes #779).
Solver: Enforce dependencies on libraries (fixes #779).