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

Should explicitly report the fatal settings error like "URI is not hierarchical" #2429

Closed
testforstephen opened this issue Apr 24, 2022 · 2 comments · Fixed by eclipse-jdtls/eclipse.jdt.ls#2089 · May be fixed by #2451
Closed
Assignees
Labels

Comments

@testforstephen
Copy link
Collaborator

testforstephen commented Apr 24, 2022

See #2260 (comment) and microsoft/vscode-java-debug#1148 (comment).

We frequently received issues about "java.lang.IllegalArgumentException: URI is not hierarchical" during "Initialize workspace". The root cause is that the user's settings like java.settings.url or java.format.settings.url point to an illegal url format, and JLS just fails silently.

I think we can improve two things:

  • Since this error is fatal, we should report a more explicit notification to tell user what's happening and guide user how to fix it.
  • We should catch this exception in JLS, and avoid breaking the startup of language server.
@rgrunber rgrunber added the bug label Apr 28, 2022
@rgrunber
Copy link
Member

Is there any way to catch these on validating the setting ? Or is pattern not enough to handle every case ?

@testforstephen
Copy link
Collaborator Author

It definitly helps if the client side could provide some validation logic to guard these settings. Also it's better to provide some samples of these settings in the description section.

Currently these url settings accept a file path or a url, that's too flexible and error-prone to configure manually. To be honest, I didn't really know how to properly configure these settings at first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants