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

HLS setting for build system preference #3832

Open
michaelpj opened this issue Oct 9, 2023 · 3 comments
Open

HLS setting for build system preference #3832

michaelpj opened this issue Oct 9, 2023 · 3 comments
Labels

Comments

@michaelpj
Copy link
Collaborator

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.

@michaelpj michaelpj added type: enhancement New feature or request component: hie-bios status: needs triage level: easy The issue is suited for beginners labels Oct 9, 2023
@fendor
Copy link
Collaborator

fendor commented Oct 9, 2023

I think this will need a change in hie-bios to let us tell it our preference.

I think it is the other way around, we need to be able to tell hie-bios which Cradle type to prefer.

@michaelpj
Copy link
Collaborator Author

Yes, that's what I meant!

@xsebek
Copy link
Contributor

xsebek commented Oct 13, 2023

This looks directly related to haskell/vscode-haskell#668. 🙂

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

No branches or pull requests

3 participants