Skip to content

refactor(compiler): generate arrow functions for setClassMetadata calls#51637

Closed
crisbeto wants to merge 1 commit intoangular:mainfrom
crisbeto:set-class-metadata-arrow
Closed

refactor(compiler): generate arrow functions for setClassMetadata calls#51637
crisbeto wants to merge 1 commit intoangular:mainfrom
crisbeto:set-class-metadata-arrow

Conversation

@crisbeto
Copy link
Copy Markdown
Member

@crisbeto crisbeto commented Sep 3, 2023

Reworks the setClassMetadata calls to generate arrow functions instead of full anonymous function declarations. While this won't have an effect on production bundle sizes, it's easier to read and it should lead to small parsing time gains in dev mode.

@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 area: compiler Issues related to `ngc`, Angular's template compiler labels Sep 3, 2023
@ngbot ngbot bot modified the milestone: Backlog Sep 3, 2023
@crisbeto crisbeto force-pushed the set-class-metadata-arrow branch from af228eb to 11eb7e2 Compare September 3, 2023 08:48
crisbeto added a commit to crisbeto/angular-cli that referenced this pull request 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.
crisbeto added a commit to crisbeto/angular-cli that referenced this pull request Sep 4, 2023
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.
@crisbeto
Copy link
Copy Markdown
Member Author

crisbeto commented Sep 4, 2023

The file size regressions here are legit. I've sent out angular/angular-cli#25776 to update the CLI to account for IIFEs using arrow functions.

crisbeto added a commit to crisbeto/angular-cli that referenced this pull request 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.
crisbeto added a commit to crisbeto/angular-cli that referenced this pull request Sep 4, 2023
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.
dgp1130 pushed a commit to angular/angular-cli that referenced this pull request Sep 5, 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.
dgp1130 pushed a commit to angular/angular-cli that referenced this pull request Sep 5, 2023
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.
@crisbeto crisbeto modified the milestones: Backlog, v17-candidates Sep 11, 2023
Reworks the `setClassMetadata` calls to generate arrow functions instead of full anonymous function declarations. While this won't have an effect on production bundle sizes, it's easier to read and it should lead to small parsing time gains in dev mode.
@crisbeto crisbeto force-pushed the set-class-metadata-arrow branch from 11eb7e2 to e9a3546 Compare September 20, 2023 15:09
@crisbeto
Copy link
Copy Markdown
Member Author

Looks like the changes from angular/angular-cli#25776 did the trick. Marking as ready to review.

@crisbeto crisbeto marked this pull request as ready for review September 20, 2023 16:41
@pullapprove pullapprove bot requested a review from devversion September 20, 2023 16:41
Copy link
Copy Markdown
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

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

👍

@crisbeto
Copy link
Copy Markdown
Member Author

I want to TGP this one just in case.

@crisbeto crisbeto added the action: global presubmit The PR is in need of a google3 global presubmit label Sep 21, 2023
@AndrewKushnir AndrewKushnir removed the action: review The PR is still awaiting reviews from at least one requested reviewer label Sep 21, 2023
@crisbeto
Copy link
Copy Markdown
Member Author

Passing TGP (except for one unrelated broken target)

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed action: global presubmit The PR is in need of a google3 global presubmit labels Sep 25, 2023
@dylhunn
Copy link
Copy Markdown
Contributor

dylhunn commented Sep 25, 2023

This PR was merged into the repository by commit d6bfebe.

@dylhunn dylhunn closed this in d6bfebe Sep 25, 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 26, 2023
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
…ls (angular#51637)

Reworks the `setClassMetadata` calls to generate arrow functions instead of full anonymous function declarations. While this won't have an effect on production bundle sizes, it's easier to read and it should lead to small parsing time gains in dev mode.

PR Close angular#51637
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: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants