-
Notifications
You must be signed in to change notification settings - Fork 8
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
upgrade pygls #373
base: main
Are you sure you want to change the base?
upgrade pygls #373
Conversation
ekacnet
commented
Jan 14, 2024
- Update tests to deal with the upgrade of pygls
- Adapt server code to new version of pylsp
- Ensure version is never None
- Bump the version of pygls
- Remove locked version
- Expose version of the package and use it for the LspServer
Would be great if the PR was not purely squashed but instead merged on top of current |
ed18188
to
5bbcbca
Compare
Thank you for this massive PR and apologies for taking so long to respond. This lgtm overall, however, I'd like to not remove the Additionally, your code now no longer formats cleanly. Please run If you don't want to address all these changes yourself, then let me know and I'll cherry-pick & add the requested changes myself. |
Mainly it's fixing the import so that the new names are used also replace {put/get}_document by {put/get}_text_document
0.11 is kind of outdated so let's get something more recent
5bbcbca
to
df30424
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #373 +/- ##
==========================================
- Coverage 76.73% 76.51% -0.23%
==========================================
Files 8 9 +1
Lines 735 745 +10
Branches 147 138 -9
==========================================
+ Hits 564 570 +6
- Misses 141 145 +4
Partials 30 30
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -206,9 +213,9 @@ def setup_custom_workspace(self): | |||
""" | |||
if not isinstance(self.workspace, SlsFileWorkspace): | |||
old_ws = self.workspace | |||
self.workspace = SlsFileWorkspace( | |||
self._workspace = SlsFileWorkspace( |
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.
This change will break all the functions that assume that SaltLspProto.workspace
is an instance of SlsFileWorkspace
@@ -168,7 +169,8 @@ def initialize(params: InitializeParams) -> None: | |||
server.logger.debug("Replaced workspace with SlsFileWorkspace") |
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.
mypy
is now complaining about line 168:
salt_lsp/server.py:168: error: "LanguageServerProtocol" has no attribute "setup_custom_workspace" [attr-defined]