Skip to content

Install project-local dev tools from Hackage #10016

Open

Description

@michaelpj

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.

Activity

  1. pranaysashank commented on May 16, 2024

    @pranaysashank

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

  2. michaelpj commented on May 16, 2024

    @michaelpj
    CollaboratorAuthor

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

  3. ulysses4ever commented on Aug 14, 2024

    @ulysses4ever
    Collaborator

    Should we close this as a dup of #9230? The description here is valuable but at least it's linked from #9230 now...

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions