setClassMetadata ctorParams emits a type for type-only annotations — should be undefined
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 55/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- angular, rust, typescript
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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).
- Vorherrschende Sprache
- Rust
- Sterne
- 232
- Forks
- 21
- Ø Merge
- 1 T. 18 Std.
- Gemergte PRs (30 T.)
- 59
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus voidzero-dev/oxc-angular-compiler
-
e2e compare: setClassMetadata extraction regex never matches (ɵɵ vs ɵ) — classMetadataDiffs is dead codeEvtl. vergeben @Brooooooklyn hat das heute übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 38/100
voidzero-dev/oxc-angular-compiler#561 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 68/100
voidzero-dev/oxc-angular-compiler#506 ·
Maintainer antworten meist innerhalb von 1 Tag
-
fix(directive): input names with lone surrogates are emitted in oxc's internal U+FFFD encodingOffenbug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 68/100
voidzero-dev/oxc-angular-compiler#505 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug rust
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 56/100
voidzero-dev/oxc-angular-compiler#313 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Support useDefineForClassFields: false (Class Field Lowering)Evtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
voidzero-dev/oxc-angular-compiler#73 · 11 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in voidzero-dev/oxc-angular-compiler
Ähnliche Issues
-
status:needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
agentic-os-org/ANOLISA#6742 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
git-ai-project/git-ai#2406 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 90/100
Kc1t/alethe-agents#312 ·
Maintainer antworten meist innerhalb von 3 Tagen