-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
[POC] Support installing the server with custom version #425
base: master
Are you sure you want to change the base?
Conversation
- How it's done? First we need to add the configuration as a `version` key in the language server configuration, for example: ```vim let g:lsp_settings = { 'clojure-lsp': { 'version': '2021.05.22-16.50.45' } } ``` Then this version is retrieved in the language-server install process, and is passed to the installer script as an argument when called, e.g. `installer/install-clojure-lsp.sh 2021.05.22-16.50.45` - Caveats Each installer script would need to be changed in order to support this argument as a custom version, however, it would not break for current not changed installer scripts since the argument would be ignored
@@ -1,5 +1,5 @@ | |||
@echo off | |||
|
|||
setlocal | |||
set VERSION=2021.02.01-20.37.52 | |||
set VERSION=%1:-2021.02.01-20.37.52% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea if this works, I used this tool to convert a bash expression to a bat one haha
Seems good for me. |
Great! I'll in the next following days:
Maybe I'm missing something? Do you see anything else that could be done? |
I think this is good. But I wonder some installers always install latest version. What should do in this PR for them. |
The only case where I see that we would have some work is installer scripts that do not support a specific version (solargraph for example), we could change them to install from channels where we can pass a specific version but default to lastest. In other cases where the script already supports but only chooses to pass the latest (e.g. scripts that download from github releases), we can just pass the specific version defaulting to lastest. WDYT, does it make sense? |
I would like to gather the opinions of other's for this. Anyone, thought? |
Maybe an alternative would be to always try and install the For example, my use case used to be that the version for If we always install the WDYT? |
Why?
There are some LSP servers that have a steady update rate, and in order to not flood this repository with PR just to update the version I through that having custom-defined versions to install would be nice
How it's done?
First we need to add the configuration as a
version
key in the language server configuration, for example:Then this version is retrieved in the language-server install process and is passed to the installer script as an argument when called, e.g.
installer/install-clojure-lsp.sh 2021.05.22-16.50.45
Not sure if this the best approach ☝️ but is the one with the smaller footprint that I could think of
I already changed the
clojure-lsp
installer to test this approach and has worked nicely.Caveats
Each installer script (that install a specific version) would need to be changed in order to support this custom version argument, however, it would not break for current not changed installer scripts since the argument would be ignored
Next steps?
Not sure, maybe change all installer scripts to support this argument? Another different approach? Being ok with having to send PRs to this repository
Update: kinda related to #311?