Skip to content

refactor(core): make timer-related @defer logic tree-shakable - #52042

Closed
AndrewKushnir wants to merge 1 commit into
angular:mainfrom
AndrewKushnir:tree-shake-timer-scheduling
Closed

AndrewKushnir wants to merge 1 commit into
angular:mainfrom
AndrewKushnir:tree-shake-timer-scheduling

Conversation

@AndrewKushnir

@AndrewKushnir AndrewKushnir commented Oct 5, 2023 •

Copy link
Copy Markdown
Contributor

This commit updates @defer logic related to handling after and minimum parameters to be tree-shakable.

If after or minimum was used on a @loading or @placeholder blocks, compiler generates an extra argument for the ɵɵdefer instruction. This extra argument is a reference to a function that brings timer-related code.

PR Type

What kind of change does this PR introduce?

  • Refactoring (no functional changes, no api changes)

Does this PR introduce a breaking change?

  • Yes
  • No

@AndrewKushnir AndrewKushnir added state: WIP area: core Issues related to the framework runtime target: major This PR is targeted for the next major release core: defer Issues related to @defer blocks. labels Oct 5, 2023
@ngbot ngbot Bot added this to the Backlog milestone Oct 5, 2023
@AndrewKushnir AndrewKushnir changed the title Tree shake timer scheduling refactor(core): make timer-related @defer logic tree-shakable Oct 5, 2023
@AndrewKushnir
AndrewKushnir force-pushed the tree-shake-timer-scheduling branch 2 times, most recently from 906b509 to 0de6145 Compare October 6, 2023 01:21
@AndrewKushnir AndrewKushnir added action: review The PR is still awaiting reviews from at least one requested reviewer and removed state: WIP labels Oct 6, 2023
@AndrewKushnir
AndrewKushnir marked this pull request as ready for review October 6, 2023 01:22

@jessicajaniuk jessicajaniuk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@AndrewKushnir AndrewKushnir modified the milestones: Backlog, v17-candidates Oct 6, 2023
@AndrewKushnir AndrewKushnir removed the action: review The PR is still awaiting reviews from at least one requested reviewer label Oct 6, 2023
@AndrewKushnir
AndrewKushnir force-pushed the tree-shake-timer-scheduling branch from 0de6145 to 8503ea7 Compare October 6, 2023 19:22
@pullapprove
pullapprove Bot requested review from alxhub and dylhunn October 6, 2023 19:23
@AndrewKushnir
AndrewKushnir force-pushed the tree-shake-timer-scheduling branch 2 times, most recently from 1025257 to b1e19c9 Compare October 6, 2023 21:54
@AndrewKushnir

Copy link
Copy Markdown
Contributor Author

Presubmit.

@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Oct 6, 2023
This commit updates `@defer` logic related to handling `after` and `minimum` parameters tree-shakable.

If `after` or `minimum` was used on a `@loading` or `@placeholder` blocks, compiler generates an extra argument for the `ɵɵdefer` instruction. This extra argument is a reference to a function that brings timer-related code.
@AndrewKushnir
AndrewKushnir force-pushed the tree-shake-timer-scheduling branch from b1e19c9 to 9d6a4b3 Compare October 9, 2023 19:41
@AndrewKushnir AndrewKushnir removed action: merge The PR is ready for merge by the caretaker action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note labels Oct 9, 2023
@AndrewKushnir AndrewKushnir added the action: presubmit The PR is in need of a google3 presubmit label Oct 9, 2023
@AndrewKushnir

Copy link
Copy Markdown
Contributor Author

Presubmit #2 (after rebase and resolving conflicts).

@AndrewKushnir

Copy link
Copy Markdown
Contributor Author

Caretaker note: presubmit is "green" (only pre-existing failures), the size-tracking review can be skipped, since there was a reduction in payload size (which was the goal of this PR). This PR is ready for merge.

@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note and removed action: presubmit The PR is in need of a google3 presubmit labels Oct 9, 2023
@atscott

atscott commented Oct 9, 2023

Copy link
Copy Markdown
Contributor

This PR was merged into the repository by commit 2eebd47.

@atscott atscott closed this in 2eebd47 Oct 9, 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 Nov 9, 2023
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
…lar#52042)

This commit updates `@defer` logic related to handling `after` and `minimum` parameters tree-shakable.

If `after` or `minimum` was used on a `@loading` or `@placeholder` blocks, compiler generates an extra argument for the `ɵɵdefer` instruction. This extra argument is a reference to a function that brings timer-related code.

PR Close angular#52042
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: core Issues related to the framework runtime core: defer Issues related to @defer blocks. merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note 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