Partial mode: NgModule-declared components get no dependencies, so their directives never match
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- angular, rust, typescript
- 領域
- compilers
調査の方向性
Start by comparing partial and full component compilation in the compiler entry points, then trace how NgModule scope information reaches ɵɵngDeclareComponent and how the Angular linker handles its dependencies. The issue identifies no files or tests; use the reproduction with DepModule and App as the starting case. Done means linked partial output includes the NgModule-scoped directive so D matches in App's template, with an approach compatible with the linker.
索引モデルが issue の本文から書いたものです。
説明
Summary
In partial compilation, a component declared in an NgModule (standalone: false) gets no dependencies in ɵɵngDeclareComponent. After linking, App.ɵcmp.directiveDefs is null, so no directive from the NgModule scope matches in its template. Full mode works, because there dependencies is ɵɵgetComponentDepsFactory(App), which is resolved at runtime.
Found while re-checking #623.
Reproduction
// dep.ts
@Directive({selector: '[d]', standalone: false}) export class D {}
@NgModule({declarations: [D], exports: [D]}) export class DepModule {}
// main.ts
import {DepModule} from './dep';
@Component({selector: 'app', template: '<div d></div>', standalone: false}) export class App {}
@NgModule({declarations: [App], imports: [DepModule]}) export class AModule {}
Compiled with compilationMode: 'partial', linked with linkAngularPackageSync, and run with @angular/core 22.2:
App.ɵcmp.directiveDefs |
|
|---|---|
| oxc full | [D, App] |
| oxc partial + link | null, so D never matches |
| ngtsc partial | dependencies: [{kind: "directive", type: i1.D, selector: "[d]"}] |
Notes
ngtsc builds this list from the NgModule scope, which comes from the whole program. One way to do it one file at a time is to emit something in partial mode that resolves at runtime, as full mode does with ɵɵgetComponentDepsFactory. Angular's linker would also have to accept that output, so this needs a design decision.
- 主要言語
- Rust
- スター
- 244
- フォーク
- 26
- 平均マージ
- 23時間 41分
- マージ済み PR(30日)
- 106
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
voidzero-dev/oxc-angular-compiler のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
voidzero-dev/oxc-angular-compiler#654 ·
メンテナーはふだん 1 日以内に返信
-
Constructor param typed by a same-file interface is injected as a token (ReferenceError at runtime)オープン
難易度 3/5 1〜2日 初心者へのやさしさ 73/100
voidzero-dev/oxc-angular-compiler#653 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 28/100
voidzero-dev/oxc-angular-compiler#623 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Support useDefineForClassFields: false (Class Field Lowering)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
voidzero-dev/oxc-angular-compiler#73 · コメント 11 件 ·
メンテナーはふだん 1 日以内に返信
-
Angular 21.2.0 + @oxc-angular/vite 0.0.7 SSR runtime parity regressions (RouterLinkActive, Forms DI, Apollo DI) require app-level shims再び着手できるかも @Brooooooklyn が 240 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
voidzero-dev/oxc-angular-compiler#61 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
voidzero-dev/oxc-angular-compiler の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
compiler P4 perf
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
HerringtonDarkholme/hd-lang#1044 ·
メンテナーはふだん 1 日以内に返信
-
good first issue help wanted r-docs
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
servo/rust-smallvec#824 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
akitaonrails/ai-usagebar#552 ·
メンテナーはふだん 1 日以内に返信