haskell / haskell/haskell-language-server
HLS setting for build system preference
- Dominant language
- Haskell
- Stars
- 3k
- Forks
- 455
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 13
Description
## Is your enhancement request related to a problem? Please describe.
At the moment, one of the reasons users have to write a `hie.yaml` is to tell HLS to use cabal when there is both a `cabal.project` and a `stack.yaml` present. We do need _some_ kind of configuration there, but `hie.yaml` is not ideal.
The other way we have of configuring HLS is via client settings. And indeed, arguably the choice of preferred build system _is_ a client setting: different users might have different preferences (indeed, the existence of config files for multiple build systems suggests that this is true).
## Describe the solution you'd like
Add a HLS config setting like `buildSystemPreference` with options `cabal` and `stack`. If it is set, then use that to decide which build system to use if there is a choice.
Maybe also warn if `buildSystemPreference` can't be satisfied? "You asked for stack, but there is no stack.yaml only a cabal.project, using cabal instead".
I think this will need a change in `hie-bios` to let us tell it our preference.
Contributor guide
No contributing guide indexed for this repository
Research direction
Trace how HLS client settings are defined and how build-system selection is passed into hie-bios. Add a buildSystemPreference setting with cabal and stack options, use it when both configurations are present, and determine the behavior when the preference cannot be satisfied, including the proposed warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100