Skip to content

Let the extension manage GHC/cabal/stack? #540

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

Closed
hasufell opened this issue Mar 13, 2022 · 3 comments
Closed

Let the extension manage GHC/cabal/stack? #540

hasufell opened this issue Mar 13, 2022 · 3 comments

Comments

@hasufell
Copy link
Member

hasufell commented Mar 13, 2022

Since we already support managing HLS, this might be the next natural step. It would probably also have to be behind a config option. Currently the extension asks the user if they want it to manage HLS, we could extend it to 3 options:

  1. manage HLS only
  2. manage the entire haskell toolchain
  3. don't manage anything

if you pick 2., the extension will set manageHLS, manageGHC, manageStack, manageCabal to true. So users who want very fine-grained behavior can dig into the config. But the popup shouldn't ask too many excessive questions.

I guess we also want equivalents for serverExecutablePath then.

Opinions @fendor ?

Relevant:

@pepeiborra
Copy link
Contributor

Will the managed toolchain be available outside VSCode? In other words, is the extension is driving the system ghcup or a hidden one?

If the managed toolchain is only available inside VSCode, then this doesn't seem like a good idea. Users will be confused that they can use ghc and cabal within VSCode but not without. Confusion leads to frustration both for users and maintainers.

If the managed toolchain is available everywhere, then this is fine.

I guess we also want equivalents for serverExecutablePath then.

Is this so that users can set their own toolchain binaries? Is this still needed if the extension is managing a global ghcup installation that puts things in PATH?

@hasufell
Copy link
Member Author

hasufell commented Mar 13, 2022

Will the managed toolchain be available outside VSCode? In other words, is the extension is driving the system ghcup or a hidden one?

That's up to the user to decide. The extension checks for a system ghcup on first start and asks the user if they want to use that.

If the managed toolchain is only available inside VSCode, then this doesn't seem like a good idea. Users will be confused that they can use ghc and cabal within VSCode but not without. Confusion leads to frustration both for users and maintainers.

If the managed toolchain is available everywhere, then this is fine.

I guess we also want equivalents for serverExecutablePath then.

Is this so that users can set their own toolchain binaries? Is this still needed if the extension is managing a global ghcup installation that puts things in PATH?

Yes, because some users use custom binaries (forks) or wrappers, see #529

hasufell added a commit to hasufell/vscode-haskell that referenced this issue Mar 17, 2022
Please enter the commit message for your changes. Lines starting
hasufell added a commit to hasufell/vscode-haskell that referenced this issue Mar 17, 2022
Please enter the commit message for your changes. Lines starting
@hasufell
Copy link
Member Author

Done

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

No branches or pull requests

2 participants