Skip to content
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

Update to newer LSP4J #2348

Closed
Tracked by #2354
mickaelistria opened this issue Nov 25, 2022 · 8 comments · Fixed by #2417
Closed
Tracked by #2354

Update to newer LSP4J #2348

mickaelistria opened this issue Nov 25, 2022 · 8 comments · Fixed by #2417
Labels
dependencies Pull requests that update a dependency file

Comments

@mickaelistria
Copy link
Contributor

Working on integrating JDT-LS in Eclipse IDE with an in-process deployment is made harder because JDT-LS uses an outdated version of LSP4J and this cause clashes in the workspace (not only JDT-LS's fault, also PDE's one probably, anyway it's almost blocking).
I've investigated migrating JDT-LS to newer version and found that the main cause of trouble would the the custom type hierarchy commands. Now that those commands are standardized as LSP operations; are they still useful? Do some clients require them? If not, a happy end would be to just remove them.

@mickaelistria
Copy link
Contributor Author

I noticed https://github.com/redhat-developer/vscode-java/blob/master/src/commands.ts still references them; but isn't it as well something that VSCode now provides by default and thus could be removed?

@rgrunber rgrunber changed the title Migrate to newer LSP4J. What of TypeHierarchy commands? Update to newer LSP4J Nov 25, 2022
@rgrunber rgrunber added the dependencies Pull requests that update a dependency file label Nov 25, 2022
@rgrunber
Copy link
Contributor

I think we want to use the type hierarchy request methods that are part of the protocol now. When it was implemented, I think it wasn't yet known if they would become part of the spec.

@CsCherrYY
Copy link
Contributor

there is a PR about moving type hierarchy to LSP using new version of LSP4J: redhat-developer/vscode-java#2376, but the change is now blocked by the language client version update, see: redhat-developer/vscode-java#2377.

@jdneo
Copy link
Contributor

jdneo commented Nov 28, 2022

+1 for this.

Another benefit is that newer LSP contains some new features that we can leverage. For example, it allows LS to provide descriptions for completion items, which will be displayed at the right of the completion list.

@rgrunber
Copy link
Contributor

rgrunber commented Nov 28, 2022

You're right. I forgot the migration was blocked for the VS Code client due to that. The best timeline for this is probably start of 2023 then. Only way to do it sooner is if we can allow both (delegate calls for type hierarchy, and LSP 3.17) to coexist.

Are there any clients other than VS Code that are known to have implemented type hierarchy on the current (delegate handler) API ?

Update: I also realized, that updating to LSP4J > 0.12.0 (LSP 3.17) could be risky since there's no guarantee it would work with a client (eg. vscode-java) that continues to stay on an older spec. May as well make the changes early on in a release cycle.

@mickaelistria
Copy link
Contributor Author

Current workaround is mickaelistria@e4f50f3

@mickaelistria
Copy link
Contributor Author

Just a note (hopefully to increase priority here): because of this -and other issues in Eclipse PDE- I'm finding it tricky to continue working on the JDT-LS and JDT-LS client simultaneously because I need to align the LSP4J versions for the workspace to show no error.
I always need to re-cherry-pick my workaround patch every time I make a change and this is easily forgotten or pushed to wrong branch and so on. Too messy for me to feel productive.
So I'm going to pause my experiments with JDT-LS client for some weeks, until JDT-LS adopts newer LSP4J APIs that are not conflcting with latest release of LSP4J.

@mickaelistria
Copy link
Contributor Author

mickaelistria commented Jan 24, 2023

See #2417

@rgrunber rgrunber linked a pull request Feb 23, 2023 that will close this issue
@rgrunber rgrunber added this to the Mid March 2023 milestone Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants