deferredImports: partial output never loads the block, and the Angular 22.2 named form does not compile
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
調査の方向性
Start with component/decorator.rs, transform/control_flow.rs, and partial/component.rs, which the issue identifies as the parsing, trigger, and partial emit paths. Compare the array and named forms against the reproduction and the ngtsc 22.2 behavior described in the issue. The work is done when the intended array-form behavior is decided and both forms compile and emit deferred dependencies correctly in full and partial modes.
索引モデルが issue の本文から書いたものです。
説明
Summary
Two problems with @Component.deferredImports:
- With the array form, partial compilation emits no
deferBlockDependenciesand nodependencies. After linking, the block isɵɵdefer(1, 0), and the deferred component never loads or renders. - The Angular 22.2 named form (
deferredImports: {blk: [ChildCmp]}with@defer (name blk)) does not compile at all. It fails withUnrecognized trigger.
Found while re-checking #623.
Reproduction
// (i) array form. ngtsc 22.2 rejects it in full and partial mode.
@Component({
selector: 'app',
// @ts-ignore
deferredImports: [ChildCmp],
template: '@defer { <child-cmp /> }',
})
export class App {}
// (ii) named form, Angular 22.2
@Component({
selector: 'app',
deferredImports: {blk: [ChildCmp]},
template: '@defer (name blk) { <child-cmp /> }',
})
export class App {}
ChildCmp is imported from ./child.
| ngtsc 22.2.3 | oxc (main 5780233) | |
|---|---|---|
| (i) full | error: 'deferredImports' must be an object mapping block names to dependency arrays. |
accepted. The deps fn is inline, but import {ChildCmp} is kept, so the code is not split |
| (i) partial | same error | no deferBlockDependencies. After linking: ɵɵdefer(1, 0), and <child-cmp> never renders |
| (ii) full | const App_Defer_1_DepsFn = () => [import("./child").then(m => m.ChildCmp)], and the import is removed |
Unrecognized trigger. The source is returned untouched |
| (ii) partial | deferBlockDependencies: [() => [import("./child")…]] and ngDeclareClassMetadataAsync |
Unrecognized trigger |
Where
- The object form is not parsed:
component/decorator.rs(extract_identifier_array). nameis rejected as a trigger:transform/control_flow.rs.- Partial emit skips
deferBlockDependencies:partial/component.rs.
One question is a product call: should oxc keep accepting the array form, which ngtsc 22.2 rejects?
- 主要言語
- Rust
- スター
- 244
- フォーク
- 26
- 平均マージ
- 23時間 41分
- マージ済み PR(30日)
- 106
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
voidzero-dev/oxc-angular-compiler のほかの issue
-
Partial mode: NgModule-declared components get no dependencies, so their directives never matchオープン
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
voidzero-dev/oxc-angular-compiler#655 ·
メンテナーはふだん 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 が 239 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
voidzero-dev/oxc-angular-compiler#61 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
voidzero-dev/oxc-angular-compiler の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
o8 next debug build aborts on Glass to Dark appearance switch (nil identifier messaged before check)オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
hurttlocker/o8#5112 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
memory_patch_page drops the `#` of headings like `## Notes on C#`対応中かも @viniciusdsandrade が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
akitaonrails/ai-memory#1859 ·
メンテナーはふだん 1 日以内に返信