redhat-developer / redhat-developer/vscode-java
Java extension pack does not work with Micronaut 4 applications.
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
Environment
- Operating System: Ubuntu Linux 22.04, KDE desktop environment
- JDK version: "17.0.3.1" 2022-04-22 LTS
- Visual Studio Code version: 1.79.2
- Java extension version: 0.39.0
Steps To Reproduce
- open the project; install gradle + java extension pack, as suggested by vscode
- wait for the project loading to complete
- display Problems window
Projects created for Micronaut 3.10 (3.9.x) works OK, projects targetting Micronaut 4.x fail to work properly in vscode.
The sample projects are attached: demo4.zip (gradle Micronaut 4.0.1), demom4.zip
(maven Micronaut 4.0.1), demo2.zip(gradle, Micronaut 3.10-SNAPSHOT -- working). During testing and switching projects, the demo4 project appeared to load OK two times, but mostly fails. The seemingly successful opens were:
-
open demo2, then create new window and open demo4 there. Appeared without Problems once (further attempt failed with the reported problem)
-
open demo2, then Close Folder, and Open Folder demo4 in the current vscode (empty) window. (again, once seemed to load OK, other attempts fail)
In both successful cases, I can't say for sure the progress for "Opening Java projects" appeared at all, maybe the extension did not load fully (?) -
demo2.zip -- working
-
demo4.zip -- fails
-
demom4.zip -- fails too
Logs: jdtls.log
Current Result
Rebuild All or Rebuild Project actions fail.
The problems window shows the following messages:
[{
"resource": "/space/tmp/vsc4/src/demom4",
"owner": "_generated_diagnostic_collection_name_#2",
"code": "0",
"severity": 8,
"message": "The project was not built since its build path is incomplete. Cannot find the class file for io.micronaut.inject.visitor.TypeElementVisitor. Fix the build path then try building this project",
"source": "Java",
"startLineNumber": 1,
"startColumn": 1,
"endLineNumber": 1,
"endColumn": 1
}]
[{
"resource": "/space/tmp/vsc4/src/demo4/src/main/java/com/example4/Application.java",
"owner": "_generated_diagnostic_collection_name_#3",
"code": "16777563",
"severity": 8,
"message": "The type io.micronaut.inject.visitor.TypeElementVisitor cannot be resolved. It is indirectly referenced from required type io.micronaut.scheduling.async.validation.AsyncTypeElementVisitor",
"source": "Java",
"startLineNumber": 1,
"startColumn": 1,
"endLineNumber": 1,
"endColumn": 2
}]
The application fails to launch:
Expected Result
No problems :) or just normal code issues.
Additional Informations
Default (system) Java version:
java version "17.0.3.1" 2022-04-22 LTS
Java(TM) SE Runtime Environment (build 17.0.3.1+2-LTS-6)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.3.1+2-LTS-6, mixed mode, sharing)
vscode version:
Version: 1.79.2
Commit: 695af097c7bd098fbf017ce3ac85e09bbc5dda06
Date: 2023-06-14T08:59:55.818Z
Electron: 22.5.7
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Linux x64 5.15.0-58-generic
Installed extensions:
redhat.java@1.20.0
VisualStudioExptTeam.intellicode-api-usage-examples@0.2.7
VisualStudioExptTeam.vscodeintellicode@1.2.30
vscjava.vscode-gradle@3.12.7
vscjava.vscode-java-debug@0.52.0
vscjava.vscode-java-dependency@0.23.0
vscjava.vscode-java-pack@0.25.12
vscjava.vscode-java-test@0.39.0
vscjava.vscode-maven@0.41.0
Suprisingly, opening the projects in Eclipse J2EE IDE shows no problems - screenshots of the Problems window:
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、添付された demo4.zip と demom4.zip のプロジェクトで失敗を再現し、動作する demo2.zip プロジェクトと比較します。欠落している io.micronaut.inject.visitor.TypeElementVisitor クラスに関連して、jdtls.log の出力と Rebuild Project の結果を確認します。Micronaut 4 の Maven および Gradle プロジェクトが、報告された Problems の診断なしに VS Code で読み込まれ、再ビルドできれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, typescript, vscode
- 領域
- developer-experience, devtools
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100