Skip to content
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

Bug: Workspace._root_path attribute not set if if self._root_uri is None #395

Closed
pappasam opened this issue Oct 6, 2023 · 3 comments · Fixed by #396
Closed

Bug: Workspace._root_path attribute not set if if self._root_uri is None #395

pappasam opened this issue Oct 6, 2023 · 3 comments · Fixed by #396

Comments

@pappasam
Copy link
Contributor

pappasam commented Oct 6, 2023

I believe this is incorrect behavior. Relevant code:

https://github.com/openlawlibrary/pygls/blob/571fd1c569603475475883c118b56ba4680ca023/pygls/workspace/workspace.py#L49C1-L49C1

if self._root_uri is None, then self._root_path is never set. This, in turn, raises an AttributeError when self.root_path is called:

Related issue: pappasam/jedi-language-server#287

@perrinjerome
Copy link
Contributor

I also noticed this and was preparing a fix

@tombh tombh closed this as completed in #396 Oct 6, 2023
tombh added a commit that referenced this issue Oct 6, 2023
Quick release to get a fix for #395 public
@tombh tombh mentioned this issue Oct 6, 2023
tombh added a commit that referenced this issue Oct 6, 2023
Quick release to get a fix for #395 public
tombh added a commit that referenced this issue Oct 6, 2023
Quick release to get a fix for #395 public
tombh added a commit that referenced this issue Oct 6, 2023
Quick release to get a fix for #395 public
@tombh
Copy link
Collaborator

tombh commented Oct 6, 2023

Thanks for the report @pappasam and thanks for the fix @perrinjerome

I just published a release with this fix in v1.1.1

@pappasam
Copy link
Contributor Author

pappasam commented Oct 6, 2023

Really appreciate the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants