Skip to content

fix(@angular/build): skip semantic diagnostics for declaration files#33400

Open
arturovt wants to merge 1 commit into
angular:mainfrom
arturovt:fix/aot_compilation_skip_semantics
Open

fix(@angular/build): skip semantic diagnostics for declaration files#33400
arturovt wants to merge 1 commit into
angular:mainfrom
arturovt:fix/aot_compilation_skip_semantics

Conversation

@arturovt

Copy link
Copy Markdown
Contributor

Declaration files don't produce semantic or template diagnostics, so calling getSemanticDiagnostics() on them was just wasted work. Move the isDeclarationFile guard to before that call so .d.ts files are skipped entirely.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request optimizes the AOT compilation process by moving the check for declaration files (sourceFile.isDeclarationFile) to occur before retrieving semantic diagnostics. This avoids unnecessary processing and profiling for declaration files, which do not contain semantic or template diagnostics. There are no review comments, so I have no feedback to provide.

@JoostK

JoostK commented Jun 17, 2026

Copy link
Copy Markdown
Member

I don't think this holds for skipLibCheck: false

Declaration files don't produce semantic or template diagnostics, so
calling getSemanticDiagnostics() on them was just wasted work. Move
the isDeclarationFile guard to before that call so .d.ts files are
skipped entirely.
@arturovt arturovt force-pushed the fix/aot_compilation_skip_semantics branch from 2be4035 to 2eef0c7 Compare June 17, 2026 21:53
@arturovt

Copy link
Copy Markdown
Contributor Author

@JoostK does update make sense?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants