mirror of
https://github.com/angular/angular.git
synced 2026-11-22 22:55:25 -05:00
Bundler integrations and workspace reconfigurations can change how module specifiers resolve without editing any individual source file—for example when alias tables, export conditions, or package layouts change between builds. While `invalidate_module_resolution` re-runs previously failed resolutions after file creation or deletion, callers also need a way to flush positive cached resolutions without discarding parsed ASTs. Add `ResolutionCache::clear_all` and `QueryEngine::clear_resolution_cache` to clear both host-internal and engine-level resolution caches and evict queries derived from any importer's resolutions while preserving cached `ParseFile` results. Expose `clear_resolution_cache` on `Analyzer`, `TestAnalyzer`, `WasmAnalyzer`, and the sidecar JSON-RPC server, returning the deduplicated list of stale module IDs while preserving virtual module IDs verbatim instead of normalizing backslashes. Surface `clearResolutionCache` on `IAnalyzer`, `WasmAnalyzer`, `NapiAnalyzer`, `SidecarAnalyzer`, and `HybridCompiler`. In `HybridCompiler`, sequence `clearResolutionCache` through the serialized update queue so evicted analyses are dropped from the TypeScript file cache, recorded for incremental emit, and refreshed on the following delta pass.
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.