redhat-developer / redhat-developer/vscode-java
jdk incubator module cannot be resolved
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 547
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 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".
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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从附带的 sample.zip 及其 Maven 工具链设置开始;使用列出的 Project Panama JDK,在 VSCode 中重现未解析的 jdk.incubator 导入。将 Maven 构建的模块处理与扩展的工作区行为进行比较,然后验证 package 和 API 能够解析,并确认简单项目可以提供 --add-modules/--add-exports。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, vscode
- 领域
- devtools
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100