mirror of
https://github.com/angular/angular.git
synced 2026-11-22 22:55:25 -05:00
Bundler-backed AnalysisHost implementations resolve dependencies into both in-bundle modules and bundle-external dependencies, distinguish runtime imports from type-only imports, and assign opaque virtual module IDs that are not filesystem paths. Previously, the query engine assumed every extracted specifier had uniform type-only semantics, treated resolved modules as in-project paths unless they ended in .d.ts, and computed relative paths across emitted imports and debug metadata. Classify extracted static imports, re-exports, dynamic import() expressions, and TSImportType queries with exact ImportKind and type_only flags and forward both on ResolveRequest. Track authoritative external module flags in FileIdInterner and QueryEngine so external modules pass external = true to AnalysisHost::load, stay out of ProgramFiles, coordinator roots, and core compilation, and preserve or rebase their original OwningReference specifiers instead of emitting paths to resolved external files. Propagate IdKind onto AnalysisResult, FileUpdate, FileInvalidation, and WASM ModuleRef entry points. When either side of a reference or a compiled file carries IdKind::Virtual, emit the module ID verbatim across cross-file import emission, class debug info, and HMR identifiers without path diffing or rootDir stripping.
Rust-based Compiler Preprocessor
Caution
Prototype — External Contributions Not Accepted
The Rust-based compiler preprocessor code in this directory is an early-stage prototype under active development by the Angular team.
We are not accepting issues, bug reports, feature requests, or pull requests for this package from external contributors at this time. Any issues or PRs opened for this code will be closed.
Overview
This directory contains a native AST analysis preprocessor and typecheck block (TCB) generation pipeline designed for high-performance Angular compilation and developer tooling integration. It combines Rust-based AST analysis (ng-analyze) using oxc with a TypeScript-based typechecking coordination layer.