setClassMetadata ctorParams emits a type for type-only annotations — should be undefined
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
- 55/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- angular, rust, typescript
Línea de trabajo
Start in ngtsc/annotations/common/src/metadata.ts, especially ctorParameterToMetadata, and compare how it handles unavailable type-value references with OXC’s setClassMetadata output. Run the named class-metadata and full-file fixtures and their comparison tests. Done means type-only annotations emit type: undefined, while value-space symbols still emit their type, and the listed fixtures no longer differ.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Found via #561 (live setClassMetadata comparison in e2e/compare).
For a constructor param whose type annotation is type-only — an interface, type alias, or type parameter — ngtsc emits type: undefined in setClassMetadata ctorParams (ctorParameterToMetadata in ngtsc/annotations/common/src/metadata.ts emits LiteralExpr(undefined) when param.typeValueReference.kind === TypeValueReferenceKind.UNAVAILABLE).
OXC emits the annotation's name regardless:
import { Injectable, Inject, InjectionToken } from '@angular/core';
interface ApiConfig { baseUrl: string }
export const API_CONFIG = new InjectionToken<ApiConfig>('apiConfig');
@Injectable({ providedIn: 'root' })
export class TestableService {
constructor(@Inject(API_CONFIG) private apiConfig: ApiConfig) {}
}
OXC emits ctorParams: () => [{ type: ApiConfig, decorators: [...] }] — ApiConfig is an interface, erased at compile time, so evaluating the thunk throws ReferenceError. ngtsc emits type: undefined.
Fix: the ctorParams metadata builder should only emit type: when the annotation names a value-space symbol (class, enum, imported value binding); otherwise undefined. Fixtures currently surfacing this: class-metadata/class-metadata-injectable, class-metadata/class-metadata-with-inject, full-file/component-with-services (declared as known differences until this is fixed).
- Lenguaje dominante
- Rust
- Estrellas
- 232
- Forks
- 21
- Merge medio
- 1 d 18 h
- PR fusionados (30 d)
- 59
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 voidzero-dev/oxc-angular-compiler
-
e2e compare: setClassMetadata extraction regex never matches (ɵɵ vs ɵ) — classMetadataDiffs is dead codePosiblemente ocupada @Brooooooklyn la tomó hoy. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
voidzero-dev/oxc-angular-compiler#561 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
voidzero-dev/oxc-angular-compiler#506 ·
Los mantenedores suelen responder en 1 día
-
fix(directive): input names with lone surrogates are emitted in oxc's internal U+FFFD encodingAbiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
voidzero-dev/oxc-angular-compiler#505 ·
Los mantenedores suelen responder en 1 día
-
bug rust
Dificultad 4/5 3-5 días Aptitud para principiantes 56/100
voidzero-dev/oxc-angular-compiler#313 ·
Los mantenedores suelen responder en 1 día
-
Support useDefineForClassFields: false (Class Field Lowering)Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
voidzero-dev/oxc-angular-compiler#73 · 11 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de voidzero-dev/oxc-angular-compiler
Issues similares
-
[Feature] 设置里面的同步功能Abiertoenhancement user-priority/P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
agent:triaged bug bughunt pm:npm priority:p1
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
SocketDev/socket-patch#1127 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día