redhat-developer / redhat-developer/vscode-java
OpenJDK 17 --enable-preview breaks error reporting
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
I wanted to use the new switch syntax that's still a preview in 17. I changed my maven pom.xml to have
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<compilerArgs>--enable-preview</compilerArgs>
</configuration>
</plugin>
In the Syntax Server output window it has,
[Error - 1:49:59 PM] Connection to server got closed. Server will not be restarted.
It stops highlighting compiler errors/warnings in the editor. Removing the --enable-preview stuff from pom.xml solves the problem, but then I lose the error reporting.
It breaks regardless of whether or not my code uses any preview features.
Environment
- Operating System: Ubuntu 20.04
- JDK version: openjdk version "17.0.3" 2022-04-19
- Visual Studio Code version: 1.69.2
- Java extension version:
Steps To Reproduce
- [step 1]
- [step 2]
[Please attach a sample project reproducing the error]
Please attach logs
Current Result
Expected Result
Additional Informations
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the pom.xml compilerArgs setting and the Syntax Server output while reproducing on Ubuntu 20.04 with OpenJDK 17 and --enable-preview. Investigate the server connection closure and compare error reporting with and without the setting; done means compiler errors and warnings remain available when preview is enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100