Add read/write access tags to call hierarchy and find references (fix #951)#954
Add read/write access tags to call hierarchy and find references (fix #951)#954travkin79 wants to merge 1 commit intoeclipse-lsp4j:mainfrom
Conversation
Fix issue eclipse-lsp4j#951. Implement LSP specification proposal microsoft/language-server-protocol#2226
| * <p>This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2226">PR</a> | ||
| * This method is planned to replace {@link #references(ReferenceParams)} and could be renamed to 'references' in future.</p> | ||
| */ | ||
| // TODO introduce this new method (avoid a breaking change) or replace #references(ReferenceParams)? |
There was a problem hiding this comment.
Hi @jonahgraham,
I'm still not sure how we should handle the new return type alternatives from the proposed LSP change. We could, of course, change the return type in references(ReferenceParams) instead of introducing a new method referencesWithTags(ReferenceParams) and increase LSP4J's version according to semantic versioning, but since the proposed LSP change is not yet accepted, I'm not feeling comfortable with introducing a breaking change that we might have to roll back if the LSP proposal gets rejected.
How do you think about introducing this additional method instead? It would avoid introducing a breaking change and even if the LSP proposal would be rejected some day, LSP4J wouldn't have to change the original method signature in references(ReferenceParams).
There was a problem hiding this comment.
If we agree that LSP4J is the reference implementation (in a similar way microsoft/language-server-protocol#2003 is for symbol tags) then the "correct" version should be implemented here.
Which means making the API breaking change which is explicitly allowed in the API policy of the project https://github.com/eclipse-lsp4j/lsp4j?tab=readme-ov-file#new-versions-of-lsp-and-dap-specifications
IMHO it is cleaner to change the API than to start coding in workarounds.
If the change is reverted, we bump the version number again.
jonahgraham
left a comment
There was a problem hiding this comment.
Until there is more sign that this is a likely to be accepted addition to the LSP I don't think LSP4J should release it. The Symbol Tags proposal (microsoft/language-server-protocol#2003) which has been merged in LSP4J has some indication that it may be approved because of real engagement from the LSP maintainers.
That said, I don't want to end up in a Catch-22 situation on progressing this, so please let us know if LSP4J needs to adopt this to get things unlocked.
| * <p>This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2226">PR</a> | ||
| * This method is planned to replace {@link #references(ReferenceParams)} and could be renamed to 'references' in future.</p> | ||
| */ | ||
| // TODO introduce this new method (avoid a breaking change) or replace #references(ReferenceParams)? |
There was a problem hiding this comment.
If we agree that LSP4J is the reference implementation (in a similar way microsoft/language-server-protocol#2003 is for symbol tags) then the "correct" version should be implemented here.
Which means making the API breaking change which is explicitly allowed in the API policy of the project https://github.com/eclipse-lsp4j/lsp4j?tab=readme-ov-file#new-versions-of-lsp-and-dap-specifications
IMHO it is cleaner to change the API than to start coding in workarounds.
If the change is reverted, we bump the version number again.
Add new tags as proposed in LSP specification issue microsoft/language-server-protocol#2207 and PR microsoft/language-server-protocol#2226 to add read / write access details to call hierarchy and find reference responses. Fix #951.