fix(cl): temporary cglm macro redefinitions emit duplicate Go constants
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
Línea de trabajo
Start in cl/preprocessor.go, in loadMacro, where repeated macro values are tolerated but a new constant is otherwise emitted. Reproduce by running llcppg over the cglm include tree, focusing on include/cglm/io.h where m and n are defined, undefined and redefined. Done when the cglm generation no longer panics with M redeclared and the macro handling is consistent for undefined and redefined macros.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Observed failure
The cglm recursive installed-header generation panics because the temporary C macro m is emitted twice as Go constant M with different values.
panic: .../include/cglm/io.h:168:9: M redeclared in this block
previous declaration at .../include/cglm/io.h:125:9
.../cl/preprocessor.go:88
Confirmed Linux amd64 job, from migration PR #43. The Linux arm64 job in the same run also has the same generation failure. Formula testing, input preparation, and the LLGo/llcppg builds passed; macOS jobs were still pending when this report was prepared.
Input and versions
- llcppg:
8fc0f987e41ffe4b4f608e9541422b460ea89fea; LLGo:afe9a5407260348b18c7104e98d76cb5cdf48b29; LLVM 21. - Actual source: recp/cglm
v0.9.6, commit 144d1e7c29b3b0c6dede7917a0476cc95248559c, not the Formula's older floor tag. - Failed index head:
8a37735.
{
"Name": "cglm",
"Language": "c",
"Dir": "./include/...",
"FuncPrefix": ["glm_"],
"LLGoPackage": "link: $(pkg-config --libs cglm)"
}
The CI stages the entire installed include tree, initializes the source Go module, and runs llcppg -v ./generated ./source without a Files allowlist.
Macro sequence
In include/cglm/io.h, the matrix-print helpers use this legal define/undef/redefine sequence inside their function bodies:
#define m 4
#define n 4
/* first helper body */
#undef m
#undef n
/* later helper */
#define m 3
#define n 3
The source uses lowercase m; the diagnostic names its generated uppercase Go constant M. This sequence is not two simultaneously active C definitions. Source inspection shows cl/preprocessor.go is unchanged between the CI pin and main aab6dbf0baedc47b42f9576a65dd79ce6715e31a: loadMacro tolerates a repeated value but otherwise emits a new constant. Latest main has not been executed for this report.
The same generation log has earlier diagnostics for undeclared glms_aabb2d_size and missing ../common.h in the handed quaternion headers. Their origin has not been established, and this issue does not claim the macro failure explains those diagnostics.
Expected behavior
Handle temporary/undefined/redefined macros consistently instead of creating colliding top-level Go declarations and panicking. No MacroIgnore, header exclusions, or native-header changes have been applied to hide the failure.
- Lenguaje dominante
- Go
- Estrellas
- 39
- Forks
- 13
- Merge medio
- 1 h 28 min
- PR fusionados (30 d)
- 256
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 goplus/llcppg
-
bug
Dificultad 5/5 Más de una semana Aptitud para principiantes 28/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
Los mantenedores suelen responder en 1 día
-
feature proposal
Dificultad 5/5 Más de una semana Aptitud para principiantes 18/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
-
Architecture-Design feature to be confirm
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
Todos los issues de goplus/llcppg
Issues similares
-
perf(translator): Claude→Responses stream re-validates the whole request body on every SSE chunkAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
router-for-me/CLIProxyAPI#6665 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
superplanehq/superplane#8557 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
copilot-api domain:platform go
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
docs: clarify gh api -f vs -F and @-file expansion in the gh skillPosiblemente ocupada @MatiasOlivera la tomó hoy. Abiertoenhancement
Dificultad 2/5 Medio día Aptitud para principiantes 62/100
cli/cli#14701 · 2 comentarios ·
Los mantenedores suelen responder en 1 día