-
Notifications
You must be signed in to change notification settings - Fork 401
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
Don't use deprecated rangeLength property in handleChanged #1928
Conversation
Can one of the admins verify this patch? |
removing deprecated properties means we might break some clients that have not yet updated to a recent LSP spec (this happened before). I'd rather get feedback from our adopters before moving forward. |
This is not removing the property itself. It just means that is infers the length from the (required) Part of the motivation for the PR was that in neovim we considered dropping sending the property, because in the current version of the specification it is also marked as optional and partly because the computation is a bit painful in neovim due to the offset conversation we have to do due to utf8/utf-16 missmatch. Many servers we checked already don't use the property anymore. What do you think of only using
|
add to whitelist |
I'm just skimming, but looks like the PR is probably fine. |
Yup
|
5f0e3d2
to
77911bd
Compare
Thanks for the review. I think I've addressed all points. I kept dedicated fixup commits to make the re-review easier. I can squash them once the PR is otherwise good to go. Btw, locally I get a failure, but only if I run the full suite via
|
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.
I think this change can be merged, though I'd prefer just that small replacement of those lines that calculate length, with the helper method for that.
I think the failing tests happen occasionally. Not sure what causes them, though they're not related to this change. It could be that some orderings of the test runs cause this, or maybe some race condition.
....jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/BaseDocumentLifeCycleHandler.java
Outdated
Show resolved
Hide resolved
I was thinking about submitting a PR for code cleanup in |
The implementation in `DocumentLifeCycleHandler` matches the implementation in the base class. Signed-off-by: Mathias Fussenegger <f.mathias@zignar.net>
77911bd
to
1cb892b
Compare
Looks like this was left over from 7869725#diff-9fe4368770feb305d866b29457ae3c14f89ad289350200e3b2ec9e6819a2e73e , which removed the legacy semantic highlighting. @mfussenegger , could you just remove those 2 methods (handleOpen,handleClosed) in DocumentLifeCycleHandler ? I think it should really be the last thing. |
....jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/BaseDocumentLifeCycleHandler.java
Outdated
Show resolved
Hide resolved
rangeLength is deprecated Signed-off-by: Mathias Fussenegger <f.mathias@zignar.net>
These methods are basically no-ops. Signed-off-by: Mathias Fussenegger <f.mathias@zignar.net>
1cb892b
to
1e9e904
Compare
The rangeLength property is deprecated in the specification.