redhat-developer / redhat-developer/vscode-java
jdk incubator module cannot be resolved
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 2.3k
- Fork
- 546
- Merge medio
- 20h 1m
- PR unite (30g)
- 11
Descrizione
Trying to use OpenJDK project Panama's new incubator module for native memory/function access, VSCode shows "The import jdk.incubator cannot be resolved".
Environment
- Operating System: MacOS
- JDK version: Local build of Project Panama (https://openjdk.java.net/projects/panama/)
- Visual Studio Code version: 1.40.1
- Java extension version: 0.53.1
Steps To Reproduce
In general, create a project use jdk incubator module should see this
Be more specific to this,
- Obtain a build for project panama foreign-abi branch
- Set up maven toolchain
<toolchains>
<!-- JDK toolchains -->
<toolchain>
<type>jdk</type>
<provides>
<version>14</version>
<vendor>panama.mem</vendor>
</provides>
<configuration>
<jdkHome>path to the build here</jdkHome>
</configuration>
</toolchain>
</toolchains>
- Open attached sample project
attach a sample project sample.zip
Current Result
maven build works fine, but VSCode shows "The import jdk.incubator cannot be resolved" on import lines and code using API from the module are shown as cannot be resolved.
Expected Result
Package and APIs are resolved
Additional Informations
It would be helpful be able to tweak javac options like --add-modules, --add-exports in workspace setting for simple projects like testing.
Set java.home just is not enough.
In order for this project to build with VSCode, I am forced to create maven project so that I can add this compiler options.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con il sample.zip allegato e la relativa configurazione della toolchain Maven; riproduci gli import jdk.incubator non risolti in VSCode usando il Project Panama JDK indicato. Confronta la gestione dei moduli della build Maven con il comportamento del workspace dell’estensione, quindi verifica che il package e le API vengano risolti e che sia possibile fornire --add-modules/--add-exports per progetti semplici.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, vscode
- Ambito
- devtools
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100