Java printer: a fully qualified package annotation prints by simple name without an import
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
The bug is in how Formatter2Impl prints annotations on a package declaration, and how the import computer treats them. Start by finding the annotation printing path for package-info.java units, then check why a fully qualified package annotation is shortened to its simple name without an import. There is no small reproducer yet, so first build one from the gson package-info.java example. Done means the printed output either keeps the qualified name or adds a matching import, and the gson package-info units compile again.
索引モデルが issue の本文から書いたものです。
説明
Problem
An annotation on a package declaration (package-info.java) that is written fully qualified is printed by its simple name, and no import is added. The printed file fails to resolve: Type 'CheckReturnValue' not found.
gson's com/google/gson/package-info.java:
@com.google.errorprone.annotations.CheckReturnValue
package com.google.gson;
prints as
@CheckReturnValue
package com.google.gson;
Expected
Either keep the qualified name on a package annotation, or add the import. A package-info.java may have imports after the package declaration, so either works, but keeping the qualified name is the simpler of the two.
Seen on
Printing parsed sources with Formatter2Impl (imports computed by the import computer) on maddi 0.9.5-alpha.5. gson loses 5 package-info units this way. I haven't reduced it further: package-info units don't go through the same small round-trip harness as the other reports.
- 主要言語
- Java
- スター
- 1
- フォーク
- 1
- 平均マージ
- 1時間 13分
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CodeLaser/maddi のほかの issue
-
Javadoc warnings are the only noise on an otherwise clean CI run対応中かも @jayeshamundkar06-bit が 5 日前に担当しました。 オープンbuild/ci good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
CodeLaser/maddi#4 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
front-end:csharp
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 61/100
CodeLaser/maddi#185 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 14/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
CodeLaser/maddi の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
NationalSecurityAgency/ghidra#10155 ·
メンテナーはふだん 2 日以内に返信
-
bug web-ui
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
jenkinsci/jenkins#27705 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
mod bug
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
elmital/FixMCStats#65 · コメント 3 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
googleads/googleads-mobile-flutter#1541 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
Julow/Unexpected-Keyboard#1490 ·
メンテナーはふだん 4 日以内に返信