cabal
cabal copied to clipboard
Install project-local dev tools from Hackage
Describe the feature request
Possibly this has been requested before, but I can't find a previous issue.
A common thing that people want is to have development tools installed for working on a project. Often, being Haskellers, those have been written in Haskell. Examples:
- Formatters
- HLint
- HLS (in principle)
- Other tools like the new cabal-audit
It is not uncommon for tools like cabal to have a way of installing "dev dependencies" or "dev tools" like this.
A sketch of what this could look like:
- A new
cabal.projectstanzadev-toolslisting executables, which are solved for independently of everything else - A cabal
dev-installcommand, which builds all the dev tools and links them into/my/project/dist-newstyle/binor something - Users are responsible for getting
/my/project/dist-newstyle/binon theirPATH?
Additional context
The discussion in https://discourse.haskell.org/t/cabal-audit-please-try-it-out/9571/5 made me think about this. There is some discussion about distributing things through ghcup, but ghcup is never likely to distribute all the tools that people are interested in (e.g. specific versions of formatters). Cabal already has most of the machinery it would need to do this, it already knows how to build executables in standalone plans, so it's just a case of doing that for a few tools and linking them to a particular location.
There is a field extra-packages in cabal.project, I wonder if that can be re-purposed for this feature
Ah indeed, here's the previous ticket: https://github.com/haskell/cabal/issues/9230
Should we close this as a dup of https://github.com/haskell/cabal/issues/9230? The description here is valuable but at least it's linked from #9230 now...