redhat-developer / redhat-developer/vscode-java

jdk incubator module cannot be resolved

オープン
#1,148 コメント 5 件 リアクション 5 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

JPMS
主要言語
TypeScript
スター
2.3k
フォーク
546
平均マージ
20時間 1分
マージ済み PR(30日)
11

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

添付された sample.zip とその Maven ツールチェーン設定から始め、記載されている Project Panama JDK を使って VSCode で未解決の jdk.incubator インポートを再現します。Maven ビルドのモジュール処理と Extension の workspace の動作を比較し、その後、package と API が解決されること、および単純なプロジェクトで --add-modules/--add-exports を指定できることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java, vscode
領域
devtools
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。