Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Partial mode: NgModule-declared components get no dependencies, so their directives never match

オープン
#655 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

voidzero-dev/oxc-angular-compiler のほかの issue

voidzero-dev/oxc-angular-compiler の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。