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 wants to install Stack #668

Open
AlexeyRaga opened this issue Aug 6, 2022 · 9 comments
Open

HLS wants to install Stack #668

AlexeyRaga opened this issue Aug 6, 2022 · 9 comments
Labels
can-workaround type: setup Issues related with the extension setup, including binaries downloads

Comments

@AlexeyRaga
Copy link
Contributor

Every time I open (or reload) a project it asks me to install Stack. Not even asks, it informs me that it needs to.
Which isn't true, because I don't use Stack and when I say "no" then it works just fine.

For projects that don't use Stack, can this notification be not shown? Or, at least, has "No, don't ask again" button for parity?

It is a bit annoying because if I don't click "No" in time then the notification disappears, but HLS doesn't work for the project until I re-open it and click "No" in that notification popup.

Your environment

Which OS do you use:

MacOS

Steps to reproduce

Open any project that doesn't use Stack

Expected behaviour

Project opens, Stack isn't mentioned

Actual behaviour

image

@hasufell
Copy link
Member

hasufell commented Aug 6, 2022

This popup was suggested by @wz1000

I was initially against it, because I find it questionable ergonomics.

You can disable it easily, see https://github.com/haskell/vscode-haskell#setting-a-specific-toolchain

Detecting whether a project uses stack or cabal is not as simple as it seems. We could parse hie.yaml however and derive from there. Wdyt @fendor ?

@hasufell hasufell added can-workaround type: setup Issues related with the extension setup, including binaries downloads and removed status: needs triage labels Aug 6, 2022
@fendor
Copy link
Collaborator

fendor commented Aug 6, 2022

Most projects don't use a hie.yaml, afaik, and ideally we shouldn't have to write it for the IDE to function as we intend.

Maybe a global option to never install stack is an option? E.g., add a fourth button saying "No, never install Stack"

@hasufell
Copy link
Member

hasufell commented Aug 6, 2022

Maybe a global option to never install stack is an option? E.g., add a fourth button saying "No, never install Stack"

I think more popups just make it worse.

@fendor
Copy link
Collaborator

fendor commented Aug 6, 2022

Absolutely, we already have too many pop-ups, I meant re-using this one, though.

@hasufell
Copy link
Member

hasufell commented Aug 6, 2022

Absolutely, we already have too many pop-ups, I meant re-using this one, though.

And then another button: "never install cabal"? 😅

@fendor
Copy link
Collaborator

fendor commented Aug 6, 2022

In the same pop-up that currently asks you whether it should install cabal, yeah. Probably even for the ghc installation, since maybe people want to use stack provided ghc bindists.

I am, as you may notice, also not convinced this is the best approach since we just have half a dozen of pop-ups...

@xsebek
Copy link
Contributor

xsebek commented Jan 8, 2023

And then another button: "never install cabal"? sweat_smile

@hasufell but that is in a different Cabal popup, right?

If clicking the Never button added "haskell.toolchain": ["XYZ": null] to the configuration then you would only have to deal with it once per project.

That seems more ergonomic to me than discovering this Issue and through trial and error settling on:

{
    "haskell.toolchain": {
        "stack": null
    }
}

(HLS docs recommendation gave me the Cabal popup for recommended Cabal, so deleting autodetect just fine.)

Previously I was using hardcoded PATH in options instead of GHCup, so apologies that I am late to the party. 😅

@hasufell
Copy link
Member

hasufell commented Jan 9, 2023

That seems more ergonomic to me

Only at a glance. Changing user configuration is hard. Do we just destructively overwrite? Prompt another time?

No, I think the popups will have to go. It's not good UX.

@twome
Copy link

twome commented Dec 9, 2023

While you're at it, I'd really appreciate if you could disable the "no cradle found" popup, too. I'm brand-new to Haskell and all I wanted was to explore the language itself first, before learning about any more professional-level build tools. The proper AST-based syntax highlighting + the inferred type notations are really helpful for learning, so I'd still love to use this extension, but without any Cabal/Stack/Cradle expectations until I gradually opt in to each one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can-workaround type: setup Issues related with the extension setup, including binaries downloads
Projects
None yet
Development

No branches or pull requests

5 participants