Skip to content

fix(compiler-cli): report diagnostic instead of crashing on malformed… - #69441

Merged
kirjs merged 1 commit into
angular:mainfrom
aparzi:fix-angular-language-service-69106
Jun 24, 2026
Merged

fix(compiler-cli): report diagnostic instead of crashing on malformed…#69441
kirjs merged 1 commit into
angular:mainfrom
aparzi:fix-angular-language-service-69106

Conversation

@aparzi

@aparzi aparzi commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

parseHostBindings throws plain Errors for malformed host bindings (e.g. a property binding with a non-static value, as can happen while editing in the language service). These were uncaught during directive analysis, crashing the compiler and the Angular Language Service.

Wrap the call and surface the error as a FatalDiagnosticError so it becomes a diagnostic and analysis can complete normally.

Fixes #69106

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

Issue Number: #69106

Does this PR introduce a breaking change?

  • Yes
  • No

@pullapprove
pullapprove Bot requested a review from crisbeto June 19, 2026 10:53
@angular-robot angular-robot Bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Jun 19, 2026
@ngbot ngbot Bot added this to the Backlog milestone Jun 19, 2026
Comment thread packages/compiler-cli/src/ngtsc/incremental/src/incremental.ts Outdated
@crisbeto
crisbeto requested a review from atscott June 19, 2026 13:28
Comment thread packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts Outdated
… host binding

`parseHostBindings` throws plain `Error`s for malformed host bindings
(e.g. a property binding with a non-static value, as can happen while
editing in the language service). These were uncaught during directive
analysis, crashing the compiler and the Angular Language Service.

Wrap the call and surface the error as a `FatalDiagnosticError` so it
becomes a diagnostic and analysis can complete normally.

Fixes angular#69106
@aparzi
aparzi force-pushed the fix-angular-language-service-69106 branch from deb5ce7 to e376ee7 Compare June 23, 2026 12:43
@aparzi
aparzi requested review from atscott and crisbeto June 23, 2026 12:44
@atscott atscott added the target: patch This PR is targeted for the next patch release label Jun 23, 2026
@JeanMeche JeanMeche added the action: merge The PR is ready for merge by the caretaker label Jun 24, 2026
@JeanMeche
JeanMeche removed the request for review from crisbeto June 24, 2026 06:19
@kirjs
kirjs merged commit 8b2785b into angular:main Jun 24, 2026
26 checks passed
@kirjs

kirjs commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

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

@angular-automatic-lock-bot

Copy link
Copy Markdown

This pull request has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Jul 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Anglar Language Service (vscode) crash when modify component's host property for host binding.

5 participants