You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add @ApiStatus.Internal annotation on non-API code #380
For the other classes, please try to avoid using it (except perhaps LSP4IJUtils) because we will mark as @ApiStatus.Internal a lot of classes.
If you need to use some classes, please report that in this issue to discuss together and provide the best API. The main goal of this issue is to provide a clean and robust API in 0.0.3 to avoid breaking something in the future.
LSP4IJ is now at a very low version number of 0.0.2. Unless you are not using SemVer, that obviously should mean "anything may change at anytime". You are taking your time designing a good API structure, and I'm taking my time experimenting with what you have to offer. You are providing me with code I could reuse, and I'm providing you my feedbacks as I use it. This benefits both of us.
Personally, I would prefer it if I could just use whatever I want for my code to work. If your API were to suddenly change and break my existing code, I'll accept it: it's a part of our implicit contract from the very start anyway.
+1 for @InSyncWithFoo
We are totally ok with the annotation. But I suppose it to mean that the other available parts should be properly documented for the correct usage or modification to avoid the situation where it is impossible to introduce necessary changes without changing the things marked with the annotation. Of course, it is not a mandatory for the non-GA version, from my perspective
For comparison, the native LSP APIs provides a default class/interface for each feature that can be inherited from to override default behaviours. For instance, I added support for WSL just by overridingLSPDiagnosticsSupport's .getFileUri() and .findFileByUri(), which I had initially expected to have been much, much harder. I would love to see a similarly well-designed model.
@angelozerr@fbricon This is going to be extremely helpful. Thank you for doing this.
So far we've been borrowing LSP4MP4iJ from Quarkus Tools to support MicroProfile and then applying patterns that we've seen in Quarkus Tools to our other LSP clients in Liberty Tools. Our assumption has been that if you're using it in Quarkus Tools you must have considered it to be an API (at least at that moment in time) otherwise you wouldn't have been using it yourselves.
Our assumption has been that if you're using it in Quarkus Tools you must have considered it to be an API (at least at that moment in time) otherwise you wouldn't have been using it yourselves.
Indeed, but it is not true today, it was hard to provide the best LSP support and take care of API both.
Activity
angelozerr commentedon Jun 21, 2024
@CppCXY @InSyncWithFoo @seachicken @KUGDev @AlexWeinstein92 @aparnamichael @MituuZ @turkeylurkey @mrglavas @koxudaxi @FalsePattern please follow this issue.
We wanted to do that in 0.0.2, but as you have reported so many issues (thanks for that!) we had no time to specifiy proper API. For the moment the clean API is only https://github.com/redhat-developer/lsp4ij/blob/main/src/main/java/com/redhat/devtools/lsp4ij/LanguageServerManager.java
For the other classes, please try to avoid using it (except perhaps LSP4IJUtils) because we will mark as @ApiStatus.Internal a lot of classes.
If you need to use some classes, please report that in this issue to discuss together and provide the best API. The main goal of this issue is to provide a clean and robust API in 0.0.3 to avoid breaking something in the future.
Hope you will understand that.
InSyncWithFoo commentedon Jun 21, 2024
I'm not sure what to think of this.
LSP4IJ is now at a very low version number of 0.0.2. Unless you are not using SemVer, that obviously should mean "anything may change at anytime". You are taking your time designing a good API structure, and I'm taking my time experimenting with what you have to offer. You are providing me with code I could reuse, and I'm providing you my feedbacks as I use it. This benefits both of us.
Personally, I would prefer it if I could just use whatever I want for my code to work. If your API were to suddenly change and break my existing code, I'll accept it: it's a part of our implicit contract from the very start anyway.
KUGDev commentedon Jun 21, 2024
+1 for @InSyncWithFoo
We are totally ok with the annotation. But I suppose it to mean that the other available parts should be properly documented for the correct usage or modification to avoid the situation where it is impossible to introduce necessary changes without changing the things marked with the annotation. Of course, it is not a mandatory for the non-GA version, from my perspective
angelozerr commentedon Jun 21, 2024
@InSyncWithFoo don't be afraid with the API described in https://github.com/redhat-developer/lsp4ij/blob/main/docs/DeveloperGuide.md it will not change.
The API which could change is for instance when you want to collect language server from a given file with
lsp4ij/src/main/java/com/redhat/devtools/lsp4ij/LanguageServiceAccessor.java
Line 43 in c45ed60
We would like providing high user level API instead of providing a lot of methods hosted in LanguageServiceAccessor that we could refactor because this class comes from https://github.com/eclipse/lsp4e/blob/main/org.eclipse.lsp4e/src/org/eclipse/lsp4e/LanguageServiceAccessor.java which was adapted for IJ. I don't master the code of this class and I spend my time to clean up to have a better base code.
InSyncWithFoo commentedon Jun 21, 2024
I was referring to the classes that implement LSP features: diagnostics, completion, inlay hints, signature help, etc.
For comparison, the native LSP APIs provides a default class/interface for each feature that can be inherited from to override default behaviours. For instance, I added support for WSL just by overriding
LSPDiagnosticsSupport's.getFileUri()and.findFileByUri(), which I had initially expected to have been much, much harder. I would love to see a similarly well-designed model.angelozerr commentedon Jun 21, 2024
It is this kind of feedback that I love, thanks @InSyncWithFoo !
We need to think about providing this similar API.
mrglavas commentedon Jun 21, 2024
@angelozerr @fbricon This is going to be extremely helpful. Thank you for doing this.
So far we've been borrowing LSP4MP4iJ from Quarkus Tools to support MicroProfile and then applying patterns that we've seen in Quarkus Tools to our other LSP clients in Liberty Tools. Our assumption has been that if you're using it in Quarkus Tools you must have considered it to be an API (at least at that moment in time) otherwise you wouldn't have been using it yourselves.
angelozerr commentedon Jun 21, 2024
Indeed, but it is not true today, it was hard to provide the best LSP support and take care of API both.