Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install project-local dev tools from Hackage #10016

Open
michaelpj opened this issue May 16, 2024 · 2 comments
Open

Install project-local dev tools from Hackage #10016

michaelpj opened this issue May 16, 2024 · 2 comments

Comments

@michaelpj
Copy link
Collaborator

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.project stanza dev-tools listing executables, which are solved for independently of everything else
  • A cabal dev-install command, which builds all the dev tools and links them into /my/project/dist-newstyle/bin or something
  • Users are responsible for getting /my/project/dist-newstyle/bin on their PATH?

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.

@pranaysashank
Copy link

There is a field extra-packages in cabal.project, I wonder if that can be re-purposed for this feature

@michaelpj
Copy link
Collaborator Author

Ah indeed, here's the previous ticket: #9230

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants