redhat-developer / redhat-developer/vscode-java
OpenJDK 17 --enable-preview breaks error reporting
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 547
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 pom.xml 中的 compilerArgs 设置以及在 Ubuntu 20.04 上使用 OpenJDK 17 和 --enable-preview 复现时的 Syntax Server 输出开始。调查服务器连接关闭的情况,并比较启用和不启用该设置时的错误报告;当启用 preview 后编译器错误和警告仍然可用时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, vscode
- 领域
- devtools
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100