Repository navigation
fix(@angular/build): improve library compilation diagnostics and stylesheet reference tracking - #34441
Open
alan-agius4 wants to merge 1 commit into
Open
fix(@angular/build): improve library compilation diagnostics and stylesheet reference tracking#34441alan-agius4 wants to merge 1 commit into
alan-agius4 wants to merge 1 commit into
Conversation
alan-agius4
force-pushed
the
fix/library-compilation-pipeline
branch
from
October 20, 2026 16:34
1985b2b to
5b09dbc
Compare
alan-agius4
marked this pull request as ready for review
October 21, 2026 06:46
There was a problem hiding this comment.
Code Review
This pull request refactors the Angular library compilation pipeline to improve diagnostic handling, file reference tracking, and caching. Key changes include passing the 'css' language option to inline style bundling for external HTML templates, refining file reference management to preserve references during stylesheet bundling failures, extracting cache updates into a helper function, and wrapping diagnostic steps in try-catch blocks to handle errors gracefully. Comprehensive unit and behavior tests have been added to verify these changes. No review comments were provided, so there is no feedback to address.
alan-agius4
force-pushed
the
fix/library-compilation-pipeline
branch
from
October 21, 2026 06:53
5b09dbc to
8815569
Compare
thekhegay
reviewed
Oct 21, 2026
alan-agius4
force-pushed
the
fix/library-compilation-pipeline
branch
from
October 21, 2026 16:44
a2bafc1 to
b770ba6
Compare
…esheet reference tracking - Forward warnings from `compilationInstance.initialize()` into formatted warnings output. - Run syntactic and option diagnostics (`DiagnosticModes.All & ~DiagnosticModes.Semantic`) when `useTypeChecking` is `false`. - Run `diagnoseFiles` even when `stylesheetErrors.length > 0` so `AotCompilation` drains `affectedFiles` into `diagnosticCache`, and guard `diagnosePromise` against unhandled rejections. - Pass `'css'` for inline `<style>` tags in external `.html` templates in `stylesheetBundler.bundleInline`. - Only clear previous file references for a stylesheet target when stylesheet bundling succeeds.
alan-agius4
force-pushed
the
fix/library-compilation-pipeline
branch
from
October 21, 2026 16:45
b770ba6 to
d620f82
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
warningsfromcompilationInstance.initialize(...)into the formatted warnings output.DiagnosticModes.All & ~DiagnosticModes.Semantic) whenuseTypeCheckingisfalse.diagnoseFileseven whenstylesheetErrors.length > 0soAotCompilationdrainsaffectedFilesintodiagnosticCache(preventing dropped template diagnostics on subsequent watch rebuilds), and ensurediagnosePromisecannot cause an unhandled rejection.'css'as the language for inline<style>tags in external.htmltemplates when callingstylesheetBundler.bundleInline(...).buildState.addFileReferences(...)when stylesheet bundling succeeds on incremental builds, preserving existing transitive references if bundling fails.