Skip to content

fix(compiler-cli): support extendedConfigCache in readConfiguration - #71034

Merged
atscott merged 1 commit into
angular:mainfrom
alan-agius4:compiler-extended-config-cache
Sep 29, 2026
Merged

atscott merged 1 commit into
angular:mainfrom
alan-agius4:compiler-extended-config-cache

Conversation

@alan-agius4

@alan-agius4 alan-agius4 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Pass extendedConfigCache to ts.parseJsonConfigFileContent and consult the cache in readConfigFile when reading configuration files.

In Angular CLI watch mode, re-reading and re-parsing extended tsconfig files on every file change causes unnecessary disk I/O and CPU overhead. Reusing TypeScript's extendedConfigCache avoids adding extended config files to watchers and eliminates redundant configuration parsing on rebuilds.

Additionally, simplify readConfiguration by invoking ts.parseJsonConfigFileContent before readAngularCompilerOptions, caching merged angularCompilerOptions on extendedConfigCache entries, and utilizing the resolved extendedConfigPath to bypass redundant module resolution.

Related to angular/angular-cli#34192

@pullapprove
pullapprove Bot requested a review from kirjs September 29, 2026 07:14
@angular-robot angular-robot Bot added detected: feature PR contains a feature commit area: compiler Issues related to `ngc`, Angular's template compiler labels Sep 29, 2026
@ngbot ngbot Bot added this to the Backlog milestone Sep 29, 2026
@alan-agius4
alan-agius4 requested review from JeanMeche and removed request for kirjs September 29, 2026 07:21
@alan-agius4 alan-agius4 added target: patch This PR is targeted for the next patch release action: review The PR is still awaiting reviews from at least one requested reviewer labels Sep 29, 2026
@alan-agius4
alan-agius4 force-pushed the compiler-extended-config-cache branch from 25951b4 to 1d9ef6c Compare September 29, 2026 07:22
@alan-agius4 alan-agius4 changed the title feat(compiler-cli): support extendedConfigCache in readConfiguration fix(compiler-cli): support extendedConfigCache in readConfiguration Sep 29, 2026
@alan-agius4
alan-agius4 force-pushed the compiler-extended-config-cache branch 2 times, most recently from 5d95eaf to cf16f42 Compare September 29, 2026 09:06
Pass `extendedConfigCache` to `ts.parseJsonConfigFileContent` and consult the cache in `readConfigFile` when reading configuration files.

In Angular CLI watch mode, re-reading and re-parsing extended tsconfig files on every file change causes unnecessary disk I/O and CPU overhead. Reusing TypeScript's `extendedConfigCache` avoids adding extended config files to watchers and eliminates redundant configuration parsing on rebuilds.

Additionally, simplify `readConfiguration` by invoking `ts.parseJsonConfigFileContent` before `readAngularCompilerOptions`, caching merged `angularCompilerOptions` on `extendedConfigCache` entries, and utilizing the resolved `extendedConfigPath` to bypass redundant module resolution.
@alan-agius4
alan-agius4 force-pushed the compiler-extended-config-cache branch from cf16f42 to 20b6888 Compare September 29, 2026 09:12
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Sep 29, 2026
@atscott
atscott merged commit 0f1e216 into angular:main Sep 29, 2026
25 checks passed
@atscott

atscott commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

This PR was merged into the repository. The changes were merged into the following branches:

@alan-agius4
alan-agius4 deleted the compiler-extended-config-cache branch September 29, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: compiler Issues related to `ngc`, Angular's template compiler detected: feature PR contains a feature commit target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants