redhat-developer / redhat-developer/vscode-java
Support delegated compilation
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 546
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
Given java.home is set to a JDK 15 ea build, and I have a project with maven.compiler.release set to 15, then the derived .classpath file will specify JavaSE-14, because that's the latest supported version.
However, what I would like to happen in this case, is that compilation (and the reporting of any compilation errors that goes with it), is delegated. This delegation could be to the build tool (by using mvn compile) or to javac directly. Any other features such as autocompletion would still happen as normal, using the JDT tooling at language level 14.
Environment
- Operating System: Windows 10
- JDK version: 15-ea+17-717
- Visual Studio Code version: 1.44.0
- Java extension version: 0.59.1
Steps To Reproduce
These are just some examples:
- text blocks are standard in JDK 15, but even though my
java.homeis set to a JDK 15, I still see compilation errors as long as I don't enable preview features - when
java.homeis set to a JDK 15 with preview features enabled, and I run a main method, the JVM fails to launch, because the compilation used something like--enable-preview --release 14, but the resultant classfiles have a version which is incompatible with the JDK 15 JVM
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
该 issue 未指定源文件或测试;首先跟踪 Java extension 如何推导 .classpath,以及如何处理 Maven 或 javac 编译和 main 方法启动。完成标准是:可以将较新 JDK 级别的编译和编译器错误委托出去,同时语言工具仍保持在受支持的级别,并且生成的类可以在配置的 JDK 上运行。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, vscode
- 领域
- build-system, developer-experience, tooling
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100