[draft] fix: Better error message when there is cross-pollination between typegpu versions

Abierto
#3,146 1 comentario 0 reacciones 0 asignados Ver en GitHub

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
55/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript
Área
tooling

Línea de trabajo

Start by locating isData, the accessor path that calls schemaOrConstructor, and other checks for whether a value belongs to this typegpu instance. Trace how values carrying a symbol whose description starts with typegpu: are handled, then verify that these cases produce the cross-instance error instead of a function-call error.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

[!caution]
DRAFT

There's an opportunity to have better errors from isData failures. In my recent example, an accessor saw a value that wasn't recognised as a schema, assumed it was a function, and called it, giving schemaOrConstructor is not a function. If the value carries a symbol from another typegpu copy (description starts with typegpu:), an error saying "this schema comes from a different typegpu instance" could be thrown instead. The same check would help everywhere typegpu tests whether a value is one of its own objects.

Lenguaje dominante
TypeScript
Estrellas
3.3k
Forks
141
Merge medio
3 d 7 h
PR fusionados (30 d)
66

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de software-mansion/TypeGPU

Todos los issues de software-mansion/TypeGPU

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.