dts: Ivy members are matched to classes by name only (wrong component metadata, renamed `X$1` left plain)
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
- 43/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- javascript, typescript
- Bereich
- build-system, tooling
Rechercherichtung
Start in vite-plugin/index.ts, in generateBundle and the byClassName lookup described in the issue. Trace how declaration classes are collected and matched to bundled .d.ts files, especially when names collide or gain $N suffixes. Reproduce the two cases with rolldown-plugin-dts or tsdown; done means each declaration receives only its own component metadata, and a plain class is not given another module's metadata.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Found while reviewing #683. Older than it (the asset path has always done this), but #683 makes it reachable for rolldown-plugin-dts / tsdown, where bundling and renames happen.
The dts plugin (vite-plugin/index.ts, generateBundle, byClassName) keys the collected declarations by class name only (last one wins), and injects them into every .d.ts in the bundle by the name it finds there. The source module is never compared.
case 1: same name, two modules, one bundled .d.ts
src/b/card.component.ts class Card (b-card, input title)
src/c/card.component.ts class Card (c-card, input size)
second.ts: export { Card as BCard } from './b/…'; export { Card as CCard } from './c/…'
second.d.ts (rolldown-plugin-dts renames the clash):
declare class Card { title…; static ɵcmp: ComponentDeclaration<Card, "c-card", …{size}…> } <- wrong component
declare class Card$1 { size… } <- no members → NG2012
(which module wins changes between runs: wrong metadata in 8 of 12 identical builds)
case 2: same name in another entry
angular.ts → @Component({selector:'lib-button'}) class Button
utils.ts → plain class Button { label = 'x' }
utils.d.ts: import * as i0 from "@angular/core"; class Button { static ɵfac…; static ɵcmp<Button, "lib-button"…> }
Possible direction: match by source module (the chunk's module ids, the rolldown-plugin-dts $N renames), or at least skip and warn on names that come from more than one module rather than write another class's metadata.
- Vorherrschende Sprache
- Rust
- Sterne
- 245
- Forks
- 26
- Ø Merge
- 1 T. 42 Min.
- Gemergte PRs (30 T.)
- 83
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
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
voidzero-dev/oxc-angular-compiler#686 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
voidzero-dev/oxc-angular-compiler#694 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
voidzero-dev/oxc-angular-compiler#693 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
voidzero-dev/oxc-angular-compiler#692 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 72/100
voidzero-dev/oxc-angular-compiler#690 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in voidzero-dev/oxc-angular-compiler
Ähnliche Issues
-
bug good first issue help wanted linux macos testing
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
area: app type: test
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug priority: medium
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
storytold/photocraft#12706 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
IngvarConsulting/unica#2822 ·
Maintainer antworten meist innerhalb von 1 Tag