-
Notifications
You must be signed in to change notification settings - Fork 90
Extension Stopped working due to HLS ghc deprecation #504
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
Comments
Sorry to read that. I am afraid that haskell-language-server, the lsp server behind the extension, has deprecated that ghc version. The suggestion is upgrade your ghc to 8.10.7. It should not be very difficult as your projects compiled with 8.10.4 should work in most cases with 8.10.7. Another alternative is continue using haskell-language-server-1.4.0 setting the option |
Thanks @jneira . The deprecation plan seems quite aggressive though. I was on LTS Haskell 18.6 (ghc-8.10.4) from August 20-th this year. Despite LTS, this is already deprecated? Is there a way to tie the HLS used by vscode to a fixed version on a per project basis? From a usability POV I find the current behaviour quite problematic as it keeps breaking things that used to work only a few weeks earlier without a clear indication on how to fix this. |
Well, there are LTS's for ghc as olders a ghc-7.8.3. So the existence per se of a LTS cant be a criteria to keep compatibility. Otoh support minor versions have a cost in maintainability and ci resources. Time and resources which can be used to fix bugs and add new features. HLS is a open source project driven by voluntary work and donations so our resources are very limited. You can read more about the rationale here: As mentioned in the docs linked above, you have two options to continue using the extension and hls for your actual ghc version:
|
Good point, i think there is quite info in the hls documentation and the extension links directly to such documentation at top. But i think we should add a specific paragraph about what to do when your actual ghc is deprecated (linking to hls docs as well) |
FWIW, you can bump up the minor version of GHC without changing the LTS minor version by explicitly specifying resolver: lts-18.6
compiler: ghc-8.10.7 If the major version is different than LTS's standard version, it can be problem - but if the major version matches, basically same LTS would work for newer versions of GHC with the same major version (i.e. |
I think we discussed in the past the possibility of the extension downloading old versions of HLS if you're on an old version of GHC, but that might be quite complicated. But in lieu of that, I think it would be fine to have a short paragraph pointing people to the doc and telling them they need to install the old version themselves if they want it. |
Just a heads up (I agree it's a bit confusing unfortunately) but the long-term-support referred to by LTS Haskell 18.6 refers to the stackage snapshots, not the version of GHC itself. GHC doesn't make any LTS guarantees |
Agree, but in theory, if you already was using a hls version via the extension it will be available if you did not remove it manually (the extension does not remove old versions) so putting @mduerig could you confirm if doing that fix the issue for you? |
@jneira, setting |
What does work though is setting Putting this config into my workspace settings should allow me to tie the HLS version to the GHC version of individual projects. However, I'm a bit concerned about the deprecation note that goes along with that setting: "Deprecated scope: This option will be set to machine scope in a future release, so it can be changed only globally, not per workspace." Why would you do that? At least for me it is a common use case to jump between many small projects, each on a different GHC version and I wouldn't want to reconfigure my tooling each time I switch. |
I'm having the same issue and tried setting However, this doesn't work for me-- This file does exist on my machine: I'm teaching a class have set up the configuration to be exactly 8.10.4 for all of my materials this semester. How can I tell vscode-haskell to use the older version of haskell-language-server? |
Also, setting setting haskell.updateBehavior to never-check doesn't work for me. It was already set to update, so it did. I need the ability to choose the language-language-server version. |
thanks for checking, will revise the code, afaiu it should not even try to know if there is a new version and use the executables already available
is there any file with the 1.5.0 extension in The issue about handling old versions of hls is #454, will prioritize it but pull request will be very welcomed
Due to security reasons as you can download a directory which could run a harmful executable automatically when opening it in vscode. But the option will not change its scope until we got another way to not break people workflows, see #387 I think another workaround would be set |
🤦 there is one: So i think replacing it with the appropiate one for 1.4.0 and keep Fortunately i still had it in my machine and i even had no to regenerate with github api calls 😸 |
Yes, there is |
One of the major drawbacks of the workarounds i ve proposed is you can not use newer versions of hls for other projects using supported ghcs 😞 |
Thanks for the cached json file --- that worked for me. However, I'm still confused why changing the Server Executable Path doesn't work. |
What value did you set in the path? what error did you got? |
In #504 (comment), the first part is the error message. The value that I used was |
Oh sorry i missed your comment. The code use a call to Lines 276 to 281 in 627b1da
|
Yes, the |
Uhmm try |
Sadly, that doesn't work either. I also tried it (earlier) with "s.
|
Sorry running out of ideas and i dont have a mac to check my guesses but i would try to move the file to some simple and short place. But maybe is time to open another issue 🤔 |
@sweirich Is it possible that the space doesn't need escaped? |
Thanks. Removing the |
haskell-language-server 1.5.0 for GHC 8.10.4 is not available on Linux. See the list of supported versions
Was working fine until recently. No changes on my end.
The text was updated successfully, but these errors were encountered: