Skip to content

Introduce the @ProtocolSince annotation#939

Merged
pisv merged 2 commits intoeclipse-lsp4j:mainfrom
pisv:protocol-since
Dec 9, 2025
Merged

Introduce the @ProtocolSince annotation#939
pisv merged 2 commits intoeclipse-lsp4j:mainfrom
pisv:protocol-since

Conversation

@pisv
Copy link
Contributor

@pisv pisv commented Dec 9, 2025

This is a follow-up to #928 (review):

  • Introduces the @ProtocolSince annotation to make it easier for API consumers to identify the version of a Protocol Specification in which the annotated element was first introduced. This complements the @ProtocolDeprecated and
    @ProtocolDraft annotations added earlier.

  • Adds special support for @ProtocolDeprecated, @ProtocolDraft, and @ProtocolSince annotations when generating getters and setters for @JsonRpcData-annotated classes in JsonRpcDataProcessor.

Introduces the `@ProtocolSince` annotation to make it easier for API consumers
to identify the version of a Protocol Specification in which the annotated
element was first introduced. This complements the `@ProtocolDeprecated` and
`@ProtocolDraft` annotations added earlier.
@pisv pisv changed the title Introduce the @ProtocolSince annotation Introduce the @ProtocolSince annotation Dec 9, 2025
@pisv pisv requested a review from jonahgraham December 9, 2025 16:56
@github-actions
Copy link

github-actions bot commented Dec 9, 2025

Test Results

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

Results for commit 16dc1a7. ± Comparison against base commit 9e9657b.

♻️ This comment has been updated with latest results.

Copy link
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.

LGTM - apart from comment. I think it is great to fix the annotations so all the @Protocol... ones are done

This leaves an annoying corner case of fields that have new value types, such as

* Since 3.18.0 - support for {@link MarkupContent}. This is guarded by the client

I am fine with how you have dealt with it, as I think anything else probably gets too complicated.

@pisv
Copy link
Contributor Author

pisv commented Dec 9, 2025

This leaves an annoying corner case of fields that have new value types
I am fine with how you have dealt with it, as I think anything else probably gets too complicated.

Yes, @ProtocolSince is intended to specify the spec version in which the annotated element was first introduced, not any later updates, which need to be specified separately in the javadoc comment.

Adds special support for `@ProtocolDeprecated`, `@ProtocolDraft`, and
`@ProtocolSince` annotations when generating getters and setters
for `@JsonRpcData`-annotated classes in `JsonRpcDataProcessor`.
@pisv pisv merged commit 7e49732 into eclipse-lsp4j:main Dec 9, 2025
11 of 12 checks passed
@pisv pisv deleted the protocol-since branch December 9, 2025 18:14
@jonahgraham jonahgraham added this to the 1.0.0 milestone Dec 9, 2025
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.

2 participants