haskell / haskell/cabal

`maintenance-depends` and a new `tool` selector for it

Open
#10,253 5 comments 4 reactions 0 assignees View on GitHub
resolution: duplicate status: consider closing type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the feature request**
The idea is to support things that are per-project or per-package, but aren't strictly build tools: formatters, `changelog-d`, etc. This would also provide a more principled approach to `cabal exec ghc` (see #10196).

**Additional context**
Other build tools, such as npm, already support the concept of dev tools independent of build tools. But the primary reason for this is for code formatters, which in the Haskell ecosystem require you to pin formatter versions. There are currently few ways to deal with multiple projects that require different versions of e.g. `fourmolu` without resorting to external facilities (`nix-shell`, `direnv`, etc.).

This proposal involves two changes:
1. `maintenance-depends` for tools that are part of development but not of building/testing/etc.
2. A new selector (currently spitballing `tool` but I'm not wedded to it) to select these, `ghc` (replacing the `cabal exec ghc` hack), and possibly `build-tool-depends`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.