redhat-developer / redhat-developer/vscode-java

Support delegated compilation

Open
#1,373 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

compile ux
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no source file or test; start by tracing how the Java extension derives .classpath and handles Maven or javac compilation and main-method launches. Done means compilation and compiler errors can be delegated for newer JDK levels while language tooling remains at the supported level, and resulting classes run on the configured JDK.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
build-system, developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.