Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(compiler-cli): avoid fatal diagnostics for invalid module schemas #61220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

clydin
Copy link
Member

@clydin clydin commented May 8, 2025

In the event of an invalid schemas field for an Angular module, an empty schema array will now be used instead of a fatal error occurring. A build will still fail in this case with the error reported as a diagnostic. However, for the language service, this allows the module to exist in the compiler registry and prevents cascading diagnostics within an IDE due to "missing" modules/components. The originating schema related errors will still be reported in the IDE.

In the event of an invalid `schemas` field for an Angular module, an
empty schema array will now be used instead of a fatal error occurring.
A build will still fail in this case with the error reported as a
diagnostic. However, for the language service, this allows the module
to exist in the compiler registry and prevents cascading diagnostics
within an IDE due to "missing" modules/components. The originating
schema related errors will still be reported in the IDE.
@clydin clydin requested a review from devversion May 8, 2025 18:03
@clydin clydin added the target: rc This PR is targeted for the next release-candidate label May 8, 2025
@angular-robot angular-robot bot added the area: compiler Issues related to `ngc`, Angular's template compiler label May 8, 2025
@ngbot ngbot bot added this to the Backlog milestone May 8, 2025
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label May 8, 2025
@clydin clydin 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 May 12, 2025
@alxhub
Copy link
Member

alxhub commented May 12, 2025

This PR was merged into the repository by commit f03ff5a.

The changes were merged into the following branches: main, 20.0.x

@alxhub alxhub closed this in f03ff5a May 12, 2025
alxhub pushed a commit that referenced this pull request May 12, 2025
…#61220)

In the event of an invalid `schemas` field for an Angular module, an
empty schema array will now be used instead of a fatal error occurring.
A build will still fail in this case with the error reported as a
diagnostic. However, for the language service, this allows the module
to exist in the compiler registry and prevents cascading diagnostics
within an IDE due to "missing" modules/components. The originating
schema related errors will still be reported in the IDE.

PR Close #61220
@clydin clydin deleted the compiler/non-fatal-module-schemas branch May 12, 2025 23:14
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 target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants