redhat-developer / redhat-developer/vscode-java

jdk incubator module cannot be resolved

Aperta
#1,148 5 commenti 5 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

JPMS
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".

Screen Shot 2019-11-15 at 4 46 48 PM
Environment
Steps To Reproduce

In general, create a project use jdk incubator module should see this

Be more specific to this,

  1. Obtain a build for project panama foreign-abi branch
  2. 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>
  1. 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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. 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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.