-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Language Server: Improve hovered symbol resolution, fix renaming bugs, implement reference lookup #80973
Conversation
Please squash all the commits into one and amend the commit message to reflect, in general, what the PR does. I've renamed the PR itself, and you can use that same text as your final commit message. See this documentation, if you need help with squashing. |
Should all be squashed, let me know what else, if anything, needs to be done! |
Thanks! I think the remaining description should be removed, or at the very least significantly simplified. This amount of detail shouldn't be added to the git history. Given that this isn't your work, originally, it would probably be simpler to just remove everything after the first line, but if you can succinctly describe the changes, that can still be put into the commit's description. Up to you! |
Just to be clear, the first line being "Add |
No, the first line would be the commit's title, "[LSP] Improve hovered symbol resolution, renaming, and reference lookup" |
Ah, ok. I removed the description! |
@adamscott This PR is ready for review whenever you have time 😁 |
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 looks fine in general! I have a few comments on the PR itself (even if it's not directly your code @ryanabx).
I tested the PR and it fixes godotengine/godot-vscode-plugin#464.
But unfortunately, it doesn't seem to fix godotengine/godot-vscode-plugin#448. It works the first rename, but stops afterwards (ie. you can't rename after a rename).
Didn't test yet godotengine/godot-proposals#3687 though.
In the future please don't push individual commits while resolving feedback but push once you're done with all, if you weren't first time contributor it'd have heavily taxing the CI |
Sorry about that! It's my first time working with a repo with CI and I forget that Godot, being such a large project, uses a lot of resources to compile in it's CI. I'll be more careful next time |
@Booksbaum while you're here and available what do you think of this issue? I'm unfortunately not familiar enough with the material to know why this occurs |
it might be internal Godot structure (or just LSP Does it work when you:
Though if rename then works -- I don't know exactly how to fix it. VSCode should notify LSP about change and a reparse should happen. |
How so? |
Because we're now having multiple documents that changed -> lots of things to check. Additional: A changed doc might not be open yet (VSCode only "opens" a doc when you open a tab with it) -> we now have to deal with a new_ish document. In short: One doc: things can go wrong in one document. Multiple docs: things can go wrong in multiple documents :D And depending how parallel that happens: Request (or even reparse/check) might read outdated state -- or worse: state that changes during its execution -> uses two different states in same request... But the issue you described sound like there wasn't a reparse yet (or is still in the process) -> reads old state -> cannot rename. (Though then shouldn't it rename whatever was there in old state? hm...) Edit: Just tested it (with an old version): It's saving. After Ctrl+S renaming of that symbol works again. Edit: the internal |
Thanks @Booksbaum for the help! Looks like all checks passed as well, @adamscott can you check to see if your renaming issue is fixed? |
I went ahead and tested the changes for myself. Since I went ahead and tested it, I also rebased changes to match master again. EDIT: I know it says changes were requested, but I have resolved all comments on the requested changes. Is this something that has to be manually updated by the reviewer? |
This is the status of the latest review by that particular maintainer. It will be updated once a new review is submitted :) |
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.
Reviewed during the GDScript Team meeting. Looks good! A lot of code all at once, but the LSP needs it.
This PR need to be tested anyway, so let's merge this sooner than later.
…, implement reference lookup Co-Authored-By: Ryan Brue <56272643+ryanabx@users.noreply.github.com> Co-Authored-By: BooksBaum <15612932+booksbaum@users.noreply.github.com>
Thanks! And congrats for your first merged Godot contribution 🎉 |
Continuation of #79988 to match current master. Changes can be found on that PR. Link to original comment: #79988 (comment)
Production edit: Fixes godotengine/godot-vscode-plugin#464, Fixes godotengine/godot-vscode-plugin#448, Closes godotengine/godot-proposals#3687.