Support for `run-tool-depends`
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
`build-tool-depends` is for for executables used when building a component. `run-tool-depends` is for executables used when running a component. [Library ones are propagated to the final executable.] This distinction is important for build-time parallelism: the executable need not be built before the thing that needs it, garbage collection: installed things don't need their `build-tool-depends` but do need their`run-tool-depends`, and cross compilation: the former is built for the build platform while the latter is built for the host platform. [for reference, regular libraries are built for the host platform while plugins/TH should be built for the build platform.]
The motivating example would be for `Setup.hs` and https://github.com/haskell/cabal/issues/4648. But I think special-casing `Setup.hs` is not needed when the same principle can applies to any component.(likewise I sometimes wish we had `build-depends` for the custom setup stanza not `setup-depends` for consistency.)
For the cross stuff, recall that the `Setup` executable is built on the build platform for the build platform, so it's host and build platform (as opposed to that for the rest of the components) are the same. That removes the `build-tool-depends` and `run-tools-depends` distinction for cross for custom setups, but still keeps the others.
Contributor guide
Assessment
This issue has not been assessed yet.