Skip to content

fix(compiler-cli): resolve import alias in defer blocks#63966

Closed
SkyZeroZx wants to merge 1 commit intoangular:mainfrom
SkyZeroZx:fix-defer-alias
Closed

fix(compiler-cli): resolve import alias in defer blocks#63966
SkyZeroZx wants to merge 1 commit intoangular:mainfrom
SkyZeroZx:fix-defer-alias

Conversation

@SkyZeroZx
Copy link
Copy Markdown
Contributor

@SkyZeroZx SkyZeroZx commented Sep 20, 2025

Fixes an error where using an alias in a defer block caused the compiler CLI when parsing. The resolution logic in ComponentDecoratorHandler was updated to correctly handle deferred dependencies with aliased imports.

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:

What is the current behavior?

Issue Number: #63965

What is the new behavior?

@defer block now works correctly with import aliases.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@pullapprove pullapprove bot requested a review from devversion September 20, 2025 19:12
@angular-robot angular-robot bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Sep 20, 2025
@ngbot ngbot bot added this to the Backlog milestone Sep 20, 2025
Copy link
Copy Markdown
Member

@JeanMeche JeanMeche left a comment

Choose a reason for hiding this comment

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

Q: Is there a difference to capture in the compliance test with this change in ? (see packages/compiler-cli/test/compliance/README.md more info on our compiler compliance tests)

@SkyZeroZx
Copy link
Copy Markdown
Contributor Author

Yes , Modified the import resolution to support aliases and added a corresponding test

@SkyZeroZx
Copy link
Copy Markdown
Contributor Author

SkyZeroZx commented Sep 20, 2025

Reopened, rebased and close by mistake

@JeanMeche
Copy link
Copy Markdown
Member

the force-push screwed-up the PR. You'll have to open a new one.

@SkyZeroZx SkyZeroZx reopened this Sep 20, 2025
@SkyZeroZx
Copy link
Copy Markdown
Contributor Author

SkyZeroZx commented Sep 20, 2025

Re-opened, I rebased incorrectly.

Fixes an error where using an alias in a defer block caused the compiler CLI to fail when parsing. The resolution logic in ComponentDecoratorHandler was updated to correctly handle deferred dependencies with aliased imports.
Copy link
Copy Markdown
Contributor

@thePunderWoman thePunderWoman left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for fixing this!

@thePunderWoman thePunderWoman added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Sep 22, 2025
@thePunderWoman thePunderWoman removed the request for review from devversion September 22, 2025 15:07
thePunderWoman pushed a commit that referenced this pull request Sep 22, 2025
Fixes an error where using an alias in a defer block caused the compiler CLI to fail when parsing. The resolution logic in ComponentDecoratorHandler was updated to correctly handle deferred dependencies with aliased imports.

PR Close #63966
@thePunderWoman
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 issue 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 Oct 23, 2025
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.

3 participants