fix: Ignore declarations used by code snippets that will never end up in the WGSL code
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- computer-graphics
Línea de trabajo
The reproduction is a test that calls tgpu.resolve([fn]) and checks the output with toMatchInlineSnapshot; run it first and compare the generated WGSL against the snapshot. The issue is that helper is emitted even though its only use sits in a branch that never reaches the output. Find where the resolver collects dependent declarations and where it decides which ones to emit. Done means helper is omitted in that case and the snapshot is updated.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
[!NOTE]
This might not be worth the effort
This is not super urgent, it's mostly a cosmetic issue, but we might be able to (in rare cases) reduce the amount of code we generate.
test('...', ({ root }) => {
const helper = () => {
'use gpu';
return 0;
};
const fn = () => {
'use gpu';
if (std.typeOf(helper()) === d.i32) {
return 1;
} else {
return 0;
}
};
expect(tgpu.resolve([fn])).toMatchInlineSnapshot(`
"fn helper() -> i32 {
return 0;
}
fn fn_1() -> i32 {
return 1;
}"
`);
});
- Lenguaje dominante
- TypeScript
- Estrellas
- 3.3k
- Forks
- 135
- Merge medio
- 4 d 1 h
- PR fusionados (30 d)
- 64
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin 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 software-mansion/TypeGPU
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
software-mansion/TypeGPU#3219 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
texture.write(VideoFrame) uses the padded coded size instead of the visible sizePosiblemente ocupada @RaphaelFakhri la tomó hace 1 día. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
software-mansion/TypeGPU#3213 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
impr: Error message in examplesAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
software-mansion/TypeGPU#3008 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
software-mansion/TypeGPU#2948 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
docs: Fix camera orientation in "Monocular Light Injection" examplePosiblemente ocupada @pullfrog la tomó hace 62 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
software-mansion/TypeGPU#2890 · 1 comentario ·
Los mantenedores suelen responder en 2 días
Todos los issues de software-mansion/TypeGPU
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
paperclipai/paperclip#17151 ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
AgoraIO-Extensions/agent-infra#3159 ·
Los mantenedores suelen responder en 1 día
-
blocklist addition
Dificultad 1/5 Menos de una hora Aptitud para principiantes 66/100
MetaMask/eth-phishing-detect#304596 ·
Los mantenedores suelen responder en 1 día
-
friction
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
kentcdodds/kody#4142 ·
-
[Bug] Statistics | Task statistics are always empty on MikroORM with MySQL or SQLitePosiblemente ocupada @NdekoCode la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ever-co/ever-gauzy#11214 ·
Los mantenedores suelen responder en 1 día