redhat-developer / redhat-developer/vscode-java
argfile path incorrectly passed to shell
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
Type: Bug
When running SpringBoot application the argfile is generated correctly but wrongly passed to shell so java fails saying the argfile in not found.
When I press Run on Spring Application:
Sun 19 Jan 2025 17:29:17 AEDT
/usr/bin/env /Library/Java/JavaVirtualMachines/amazon-corretto-21.jdk/Contents/Home/bin/java @/var/folders/gj/169h7wq975b_6l3c0v687wz40000gn/T/cp_6p5jtxjkaymno1ghwdpwvy9zj.argfile com.example.Application
example ❯ /usr/bin/env /Library/Java/JavaVirtualMachines/amazon-corretto-21.jdk/Contents/Home/bin/java @/var/folders/gj/169h7wq975b_6l3c0v687wz40000gn/T/cp_6p5jtxymno1ghwdpwvy9zj.ar
gfile com.example.Application
Error: could not open `/var/folders/gj/169h7wq975b_6l3c0v687wz40000gn/T/cp_6p5jtxymno1ghwdpwvy9zj.argfile'
The correct (existing) file is cp_6p5jtxjkaymno1ghwdpwvy9zj.argfile while what is passed to the command is cp_6p5jtxymno1ghwdpwvy9zj.argfile. As we can see some characters ('jka') is removed from the file name.
My work around was to create a symbolic link to from wrong file to the correct file and the am able to run/debug now.
-rw-r--r-- 1 ali staff 7.1K 19 Jan 17:23 /var/folders/gj/169h7wq975b_6l3c0v687wz40000gn/T/cp_6p5jtxjkaymno1ghwdpwvy9zj.argfile
lrwxr-xr-x 1 ali staff 85B 19 Jan 17:22 /var/folders/gj/169h7wq975b_6l3c0v687wz40000gn/T/cp_6p5jtxymno1ghwdpwvy9zj.argfile -> /var/folders/gj/169h7wq975b_6l3c0v687wz40000gn/T/cp_6p5jtxjkaymno1ghwdpwvy9zj.argfile
Extension version: 1.39.2025011708
VS Code version: Code 1.96.4 (Universal) (cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba, 2025-01-16T00:16:19.038Z)
OS version: Darwin arm64 24.1.0
Modes:
System Info
| Item | Value |
|---|---|
| CPUs | Apple M1 Pro (10 x 2400) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: enabled_on direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled webgpu: enabled webnn: disabled_off |
| Load (avg) | 2, 2, 2 |
| Memory (System) | 16.00GB (0.13GB free) |
| Process Argv | . |
| Screen Reader | no |
| VM | 0% |
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
macOS で Run on a Spring Application を使用して失敗を再現し、生成された argfile のパスと Java に渡されるパスを比較します。argfile の生成と起動経路を追跡します。完了の条件は、既存の argfile のパスが変更されずに渡され、アプリケーションが workaround symlink なしで起動することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, spring-boot, typescript, vscode
- 領域
- developer-experience, tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100