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

Inform clients when Preview support enabled for an incompatible version. #3137

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

rgrunber
Copy link
Contributor

@rgrunber rgrunber self-assigned this Apr 24, 2024
@jdneo
Copy link
Contributor

jdneo commented May 7, 2024

I'm thinking about how should the client side deal with this notification? It makes things clearer than only log it in the log file. However, users might still have no idea what should they do after receiving this notification?

@mickaelistria
Copy link
Contributor

IMO, the expectation of end-users is that preview flags just get silently ignored when they're not targeting latest version and that they shouldn't bother with them. It's the pattern we've seen in mulitple place in JDT and the Javac incubator.

@rgrunber
Copy link
Contributor Author

rgrunber commented May 7, 2024

At least for vscode-java, I have a client-side PR (local) that catches the event notification (like we do for incompatible Gradle + JDK versions) and shows the error message : "Preview features enabled at an invalid source release level ..., preview can be enabled only at source level ...", and a link to the build configuration file to change it.

Particularly on #3131 (comment) , if the clients do nothing with it, at least more is logged, at least until we properly address redhat-developer/vscode-java#1111 (disappearing errors when text document opened, if coming from workspace diagnostic handler).

As for Mickael's suggestion of ignoring, I kind of like it except for the fact that we're opening ourselves up for users to later complain that "preview features don't work". Eclipse doesn't actually silently ignored the error though. If you force preview features, it will complain : #3131 (comment)

@rgrunber rgrunber merged commit e9b0ec6 into eclipse-jdtls:master Aug 14, 2024
6 checks passed
@rgrunber rgrunber deleted the fix-3131 branch August 14, 2024 21:26
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.

Notify clients that enabling preview features on incompatible compliance level fails the build
3 participants