redhat-developer / redhat-developer/vscode-java

Support delegated compilation

未关闭
#1,373 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

compile ux
主要语言
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.home is set to a JDK 15, I still see compilation errors as long as I don't enable preview features
  • when java.home is 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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 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

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。