jextract/jni: Enum case record names can collide with enclosing types
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 57/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
調査の方向性
Read the jextract/jni enum extraction code and its generated Java output for the Message example. Trace how Swift case names determine record names, payload accessors, and case dispatch; check the generated output with a case that collides with an enclosing type. Done means the generated record avoids the collision and its accessor and dispatch names stay consistent.
索引モデルが issue の本文から書いたものです。
説明
Problem
JNI enum extraction capitalizes each Swift case name to generate a nested Java record. That record can have the same name as its enum, another enclosing type, or the generated Case interface. Java rejects these declarations because a nested type cannot share an enclosing type's name.
Example
public enum Message {
case message(Int64)
}
The generated Java code contains a record named Message inside Message.Case. This conflicts with the enclosing Message type and causes Java compilation to fail.
The generated record name should avoid collisions with enclosing types. Its payload accessor and case dispatch should use the same name consistently.
Reference workaround implementation: https://github.com/qoncept/swift-java/pull/7
- 主要言語
- Swift
- スター
- 1.3k
- フォーク
- 127
- 平均マージ
- 2日 14時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
swiftlang/swift-java のほかの issue
-
wrap-java: Optional convenience methods can fail to compile when a parameter shadows the method nameオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
swiftlang/swift-java#945 ·
メンテナーはふだん 1 日以内に返信
-
android
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
swiftlang/swift-java#663 · コメント 4 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
swiftlang/swift-java#949 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
swiftlang/swift-java#948 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 54/100
swiftlang/swift-java#947 ·
メンテナーはふだん 1 日以内に返信
swiftlang/swift-java の issue をすべて見る
似ている issue
-
area:docs phase:release priority:p0 type:test
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
enhancement impact:U1 P3 reach:R2 size:S
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
Follow-ups: #35163 Agent chat: a sent prompt glides into place from the bottom and from an up-scrollオープンarea: agents follow-up
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
manaflow-ai/cmux#35868 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
mozilla-mobile/firefox-ios#36439 ·
メンテナーはふだん 1 日以内に返信