microsoft / microsoft/vscode-java-pack

@Builder annotation fails to work with multi-line comments on fields

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

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

ai-triaged bug lombok
主要言語
TypeScript
スター
352
フォーク
166
平均マージ
17時間 47分
マージ済み PR(30日)
32

説明

Environment:

  • VS Code Version: cursor 0.45.11
  • Extension Version: 0.29.0
  • JDK Type & Version: oracle jdk version: 21
  • OS Type & Version:

Step to Reproduce:
When using the @Builder annotation, if a field has a multi-line comment (/** xx **/), the editor extension fails to generate the builder method, making it unusable. However, if the comment is changed to a single-line comment (// xx), the builder method works as expected.

Image

Image

Expected Behavior:
The @Builder annotation should work as expected even when fields have multi-line comments (/** xx **/), and the builder method should be generated and usable.

Actual Behavior:
The actual behavior is that when using the @Builder annotation with multi-line comments (/** xx **/) above the fields, the editor continuously reports an error, preventing the builder from being generated and used. However, if the comments are removed or changed to single-line comments (// xx), the builder works as expected and the error disappears.

Related Issues:

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

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

調査の方向性

JDK 21 を使用し、@Builder とフィールドレベルの複数行コメントを指定して VS Code Java extension で問題を再現し、その後、1 行コメントの場合と比較します。builder 生成時のエラーパスを追跡し、コメントによってパースまたは生成の動作が変わる箇所を特定します。複数行コメントを対象とする回帰テストがあり、どちらの場合も builder が生成されて使用できれば完了です。

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

評価

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

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

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