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

Missing Error Markers, possibly due to _Preview features enabled at an invalid source release level 11, preview can be enabled only at source level 21?_ #85

Closed
vorburger opened this issue Jan 16, 2024 · 6 comments

Comments

@vorburger
Copy link
Contributor

When I use this extension for https://github.com/enola-dev/enola/, "Error Markers" are missing - there are no "red squiggles" for syntax errors. However other Java (JDT) features such as e.g. Cross References and Ctrl-Space Completion do work just fine for me.

Perhaps this is related to https://github.com/salesforce/bazel-vscode-java/blob/main/docs/troubleshoot.md#java-version, and the Preview features enabled at an invalid source release level 11, preview can be enabled only at source level 21 error that I'm seeing? I may have been wrong in #74 that this message is "harmless"...

When I'll have a moment, I'll explore installing another JDK and running VSC with that, to see if that solves this.

@guw FYI

@vorburger
Copy link
Contributor Author

OK so closing VSC and doing e.g. killall java && sudo dnf remove "java-17*" && sudo dnf install java-21-openjdk-devel java-21-openjdk-src java-21-openjdk-javadoc java-21-openjdk-javadoc-zip java-21-openjdk-jmods and then restarting VSC and doing a Clean Java Language Server Workspace, as per https://github.com/salesforce/bazel-vscode-java/blob/main/docs/troubleshoot.md#hard-reset, doesn't seem to fix this.

Those Problems are still there, and there is also a pop-up whining about Invalid runtime for JavaSE-17: The path points to a missing or inaccessible folder (/usr/lib/jvm/java-17/).

vorburger added a commit to vorburger/vorburger-dotfiles-bin-etc that referenced this issue Jan 17, 2024
@vorburger
Copy link
Contributor Author

Invalid runtime for JavaSE-17: The path points to a missing or inaccessible folder (/usr/lib/jvm/java-17/).

vorburger/vorburger-dotfiles-bin-etc@05e7926 and vorburger/vorburger-dotfiles-bin-etc@43ab20a fix this.

@vorburger
Copy link
Contributor Author

I'm toying with upgrading from Java 11 to 21 to see if that could fix this, but it's a PITA; see referenced PRs & issues...

@guw if you can think of a better way to workaround the problem reported here, please do shout.

vorburger added a commit to vorburger/enola that referenced this issue Jan 17, 2024
vorburger added a commit to vorburger/enola that referenced this issue Jan 17, 2024
Originally motivated by bazelbuild/bazel#18743,
in the context of salesforce/bazel-vscode-java#85,

but as noted in bazelbuild/rules_java#159
from enola-dev#427 I can't go to 7.3.2
just yet - but bumping at least already to 7.2.0 is a first step!
vorburger added a commit to vorburger/enola that referenced this issue Jan 17, 2024
Originally motivated by bazelbuild/bazel#18743,
in the context of salesforce/bazel-vscode-java#85,

but as noted in bazelbuild/rules_java#159
from enola-dev#427 I can't go to 7.3.2
just yet - but bumping at least already to 7.2.0 is a first step!
vorburger added a commit to enola-dev/enola that referenced this issue Jan 17, 2024
Originally motivated by bazelbuild/bazel#18743,
in the context of salesforce/bazel-vscode-java#85,

but as noted in bazelbuild/rules_java#159
from #427 I can't go to 7.3.2
just yet - but bumping at least already to 7.2.0 is a first step!
vorburger added a commit to vorburger/enola that referenced this issue Jan 17, 2024
vorburger added a commit to vorburger/enola that referenced this issue Jan 17, 2024
vorburger added a commit to enola-dev/enola that referenced this issue Jan 17, 2024
vorburger added a commit to vorburger/enola that referenced this issue Jan 17, 2024
@vorburger
Copy link
Contributor Author

I'm toying with upgrading from Java 11 to 21 to see if that could fix this, but it's a PITA; see referenced PRs & issues...

https://github.com/enola-dev/enola/pull/426/files has that, and Bazel builds it fine on the CLI...

... in VSC however it's "all red" - even worse than before. Not just on the PR, but even without; see #86.

@guw
Copy link
Collaborator

guw commented Jan 17, 2024

Closing as duplicate of #86

@guw guw closed this as not planned Won't fix, can't repro, duplicate, stale Jan 17, 2024
@vorburger
Copy link
Contributor Author

@guw perhaps not a dupe of #86, as I still saw this, even with that.

However with enola-dev/enola#426 (after #86 fix) this goes away!

I'm not entirely sure yet I really can upgrade to Java 21... but may be I will temporarily.

Can you think of a better way to workaround the problem than bumping projects to Java 21?

Also, Troubleshooting needs a related update; I'll send a PR.

vorburger added a commit to vorburger/bazel-vscode-java that referenced this issue Jan 17, 2024
Signed-off-by: Michael Vorburger <mike@vorburger.ch>
vorburger added a commit to vorburger/enola that referenced this issue Jan 17, 2024
vorburger added a commit to vorburger/enola that referenced this issue Jan 17, 2024
vorburger added a commit to enola-dev/enola that referenced this issue Jan 17, 2024
guw pushed a commit that referenced this issue Jan 17, 2024
Signed-off-by: Michael Vorburger <mike@vorburger.ch>
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

No branches or pull requests

2 participants