[POC] Support installing the server with custom version#425
[POC] Support installing the server with custom version#425mracos wants to merge 2 commits intomattn:masterfrom
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
|
|
||
| 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.
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
versionkey 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.45Not sure if this the best approach ☝️ but is the one with the smaller footprint that I could think of
I already changed the
clojure-lspinstaller 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?