[Compiler][Swift] recursive unions with any poison the Equatable cache; nested ref targets stay value structs; keyword packages produce invalid identifiers
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 22/100
Línea de trabajo
The issue names three separate Swift codegen bugs: a poisoned Equatable cache for recursive unions, wrong ref-target lineage for nested messages, and keyword package names producing invalid backtick identifiers. Start with the repro in the issue (union Wrapper and message Node) and the Equatable cache in the Swift generator, then check the package-component escaping that joins with _. Pull request #4159 is already open against this issue, so coordinate with it before starting. Done means the generated Swift for the repro compiles and the nested ref and Any package cases produce valid identifiers.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Three Swift codegen bugs in the compiler:
- When a union's Equatable check visits a message that refers back to the in-progress union, the message's provisional result is cached permanently. A later case of the same union (e.g.
any) overturns the union's answer, but the poisoned cache entry survives, so the message is emitted asstruct Node: Equatablewhose only stored property is non-Equatable — the generated Swift does not compile.
Repro:
union Wrapper { string note; Node node; any extra; }
message Node { Wrapper wrapper = 1; }
-
ref-target resolution inside nested messages uses the wrong parent lineage, so areffield in a nested message cannot resolve a sibling nested type; the target silently stays a value struct instead of being promoted tofinal class, breaking reference identity / wire-level ref-flag compatibility with Java and C++ (the identical top-level shape is promoted correctly). -
Package components are backtick-escaped individually and then joined with
_, so a package likeany(PascalCaseAny, a Swift keyword) produces identifiers like`Any`_Userand gRPC symbols like`Any`_GreeterProvider— backticks embedded mid-identifier are invalid Swift, so flatten-style and service output for such packages does not compile.
- Lenguaje dominante
- Java
- Estrellas
- 4.6k
- Forks
- 470
- Merge medio
- 9 h 28 min
- PR fusionados (30 d)
- 33
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/fory
-
[Python] Compatible xlang read silently drops fields when the peer writes camelCase/PascalCase namesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
[Build] Add ASF license headers to config files that allow commentsQuizá libre de nuevo @Swatantra-66 la tomó hace 27 días y no hay ningún pull request abierto. Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/fory#4124 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
xlang: the snake_case conversion of field names is not specified, and the runtimes do not agreeQuizá libre de nuevo @dhruv-dagar la tomó hace 15 días y no hay ningún pull request abierto. Abiertobug
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
apache/fory#4187 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
[Rust] Add an option to use Rust native enumPosiblemente ocupada @BaldDemian la tomó hace 19 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
apache/fory#4177 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Untyped read collapses a number literal that does not fit a doublePosiblemente ocupada @mohitjoshi-hey la tomó hace 21 días. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
apache/fory#4170 · 3 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/fory
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
a2aproject/a2a-java#1275 ·
Los mantenedores suelen responder en 1 día
-
module/ftp Type/Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ballerina-platform/ballerina-library#9476 ·
Los mantenedores suelen responder en 1 día
-
[Feature] 为世界管理页面添加打开存档文件夹按钮Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
HMCL-dev/HMCL#7175 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
anwilli5/coin-collection-android-US#515 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
FasterXML/jackson-databind#6398 ·
Los mantenedores suelen responder en 1 día