Skip to content

Account for new compiler output in custom tranformers#25776

Merged
dgp1130 merged 4 commits intoangular:mainfrom
crisbeto:arrow-function-elide
Sep 5, 2023
Merged

Account for new compiler output in custom tranformers#25776
dgp1130 merged 4 commits intoangular:mainfrom
crisbeto:arrow-function-elide

Conversation

@crisbeto
Copy link
Copy Markdown
Member

@crisbeto crisbeto commented Sep 4, 2023

There's some new output coming from the Angular compiler. These changes update the various custom transformers to account for it. It includes:

  1. Emitting calls to setClassMetadataAsync instead of setClassMetadata for components that use the new defer block syntax.
  2. Using arrow functions instead of function expressions for IIFEs. This isn't merged yet, but is being explored in refactor(compiler): generate arrow functions for setClassMetadata calls angular#51637.

@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: major This PR is targeted for the next major release merge: preserve commits When the PR is merged, a rebase and merge should be performed labels Sep 4, 2023
@crisbeto crisbeto marked this pull request as ready for review September 4, 2023 09:16
@crisbeto crisbeto requested a review from alan-agius4 September 4, 2023 09:18
@alan-agius4 alan-agius4 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 Sep 4, 2023
Updates the logic for removing Angular metadata and pure top-level functions to account for arrow-function-based IIFEs. Currently Angular doesn't generate arrow functions, but it's being explored in angular/angular#51637.
Updates the logic for removing Angular JIT calls to account for arrow-function-based IIFEs. Currently Angular doesn't generate arrow functions, but it's being explored in angular/angular#51637.
Updates the logic that elides `setClassMetadata` calls to also elide `setClassMetadataAsync`. The latter will be emitted when the component uses the new `defer` block syntax.
Updates the logic that remove `setClassMetadata` calls to also elide `setClassMetadataAsync`. The latter will be emitted when the component uses the new `defer` block syntax.
@crisbeto crisbeto force-pushed the arrow-function-elide branch from 0139e82 to f525115 Compare September 4, 2023 12:26
@dgp1130 dgp1130 merged commit 89f21ac into angular:main Sep 5, 2023
@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 6, 2023
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 merge: preserve commits When the PR is merged, a rebase and merge should be performed target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants