-
Notifications
You must be signed in to change notification settings - Fork 1
How to update the language server
jwortmann edited this page Jan 9, 2024
·
5 revisions
This is a small guide for maintainers of this repository how to update the language server to the latest version and make a new release for LSP-julia.
The language server consist of the LanguageServer.jl Julia package & dependencies and must be installed via the Julia package manager. To ensure a compatible version of LanguageServer.jl to this LSP-julia plugin, LanguageServer.jl should be pinned to a certain commit (tags/releases of LanguageServer.jl seem to be quite infrequent).
The following steps are necessary to update the packages:
- Go to https://github.com/julia-vscode/LanguageServer.jl and note/copy the latest commit hash from the master branch (or the hash of the compatible commit which should be used).
- Navigate into the
LSP-julia/server
directory (from this repository), where the Project.toml and Manifest.toml files for the language server are stored. - Start Julia in that directory and activate the environment with Julia's package manager:
julia> ] (@v1.7) pkg> activate . (server) pkg>
- Remove the LanguageServer package:
(server) pkg> remove LanguageServer
- Add the LanguageServer package with its latest commit (example commit hash below):
(server) pkg> add LanguageServer#dc87d7211dbdffdfaff12edac3a25182ac4407fb
- Open the file
plugin.py
and update the commit hash string returned by theserver_version()
method of theJuliaLanguageServer
class. This can in theory be an arbitrary string, but I prefer to use the 7-digit short commit hash of the LanguageServer.jl version here. It will be used in thePackage Storage/LSP-julia/VERSION
file, and to check whether the current version is installed. - Restart Sublime Text and open a Julia file. The plugin should copy the updated project files under
Package Storage/LSP-julia
and instantiate this environment (again). To be on the very safe side, optionally delete the LanguageServer folder under.julia/packages
before doing this step, so that the package manager is forced to download the LanguageServer.jl package again. Ensure that the server can start and that everything works as expected. - To create a new release of LSP-julia for Package Control, commit the changes (Manifest.toml and plugin.py) and push a new tag to this repository.