Skip to content

Add read/write access tags to call hierarchy and find references (fix #951)#954

Draft
travkin79 wants to merge 1 commit intoeclipse-lsp4j:mainfrom
travkin79:read-write-tags
Draft

Add read/write access tags to call hierarchy and find references (fix #951)#954
travkin79 wants to merge 1 commit intoeclipse-lsp4j:mainfrom
travkin79:read-write-tags

Conversation

@travkin79
Copy link
Copy Markdown
Contributor

@travkin79 travkin79 commented Feb 9, 2026

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.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 9, 2026

Test Results

  500 files  ±0    500 suites  ±0   41s ⏱️ +3s
  359 tests ±0    359 ✅ ±0  0 💤 ±0  0 ❌ ±0 
4 052 runs  ±0  4 052 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit b3ec120. ± Comparison against base commit ebb51b1.

* <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)?
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

@jonahgraham jonahgraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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 this pull request may close these issues.

Add read and write tags to "find references" and "call hierarchy" responses (adapt API to proposal from LSP PR 2226)

2 participants