-
Notifications
You must be signed in to change notification settings - Fork 90
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
Allow using different versions of HLS for different workspaces with serverExecutablePath
at machine scope
#387
Comments
mmm I was afraid of breaking some workflow when removing it and that is the case |
Yeah, that would work for my use-case. If we want more flexibility, one option could be to specify a list of allowed paths as a machine variable and then the workspace can only use paths from that list. This is somewhat similar to what vs code did for their terminal option, but with a fancier UI (and using workspace local |
How does your workflow work? Maybe I could switch workflow as a workaround? |
I use always a dev version on PATH (maybe not the latest one) , only switch to release when trying to reproduce issues. |
That would be ideal, will take a look (pr's welcome, as always) |
This change is a total disaster - sorry for the harsh words, but I can't imagine how you could have come to the conclusion that it doesn't break any (real) workflow. Also, the security argument is very weak. No-one runs Case 1 - with nixWe have several haskell projects at work and some of them work with NIX - each project has a slightly different layout and we use our own script like Case 2 - STACK_YAMLYou cannot start |
@marcin-rzeznicki That said, i think it is a change that has to be done sooner or later:
cradle:
stack:
stackYaml: "./stack-8.8.3.yaml"
what do you think about? |
I am almost always setting per-project wrapper scripts which pass additional options to hls. This change would be quite inconvenient for me as well. |
@jneira Thanks a lot for a detailed reply, much appreciated.
No problem and sorry for the too harsh comment.
Many thanks for taking this into account, this is the verdict of Solomon IMO, which does not neglect the issues and at the same time gives everyone time to prepare a solution 👍
Ah, okay, I didn't think about Windows at all - sorry, my bad, I was too focused on the typical Linux setup.
That's my thinking as well. Overalll I think it all boils down to setting up the configuration for various tools that are needed to build the project (at least to the point where HLS can gather all the info it needs to work correctly - but in my experience HLS generally needs to have a building project). In this category we have my use case of
Great tip! Thank you, I didn't know that, I'll try it out as soon as possible
Long story short - I use it (perhaps wrongly) for a project that links to native libraries. I have one "default" config which just uses the system defaults for linking which is checked in git, and my own local machine-specific overrides with something like extra-include-dirs:
- /usr/local/include
extra-lib-dirs:
- /usr/local/lib
ghc-options:
"$locals": -optl=-Wl,-rpath,/usr/local/lib This way I can have, say, a newer version of the library installed somewhere (
I'll be happy to learn how to do it better. The thing with NIX is that I only use it at work, and all my Haskell colleagues have used this setup for ages - you could say it's a legacy, I am not saying it is perfectly logical, but it has worked fine for us so I didn't give it much thought. If there is a better way, I'll be happy to adapt.
Thank you - I am more than happy with this outcome. For the use cases I can think of, everything you proposed ⬆️ seems to work. One more thing comes to mind - a kind of map |
A new version 1.4.0 with the change reverted has been published in the vscode marketplace. The publishing is already shown in the marketplace: https://marketplace.visualstudio.com/items?itemName=haskell.haskell
So one piece to help set a version for workspace already exists. You could set a common path for all workspaces: I think that combined with some mechanism to being able to set several executable paths would cover most workflows. |
Related: #302 |
serverExecutablePath
at machine scope
I consider this to be resolved, scope is now If we overlooked something, feel free to reopen. |
Yes, I think it is solved. Thanks! |
This is especially important when writing patches for HLS itself, since I would want to use a stable version for developing and my unstable version for testing.
It was possible prior to 1.3.0, but the ability was removed (10676ee) for security reasons.
Is there any way to get back that ability without reintroducing those security issues?
The text was updated successfully, but these errors were encountered: