Skip to content

fix(core): remove duplicated EMPTY_ARRAY constant#40991

Closed
cexbrayat wants to merge 1 commit intoangular:masterfrom
cexbrayat:fix/duplicate-empty-array-symbol
Closed

fix(core): remove duplicated EMPTY_ARRAY constant#40991
cexbrayat wants to merge 1 commit intoangular:masterfrom
cexbrayat:fix/duplicate-empty-array-symbol

Conversation

@cexbrayat
Copy link
Member

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.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

The codebase currently contains several EMPTY_ARRAY constants,
and they can end up in the bundle of an application.
A recent commit 6fbe219 tipped us off
as it introduced several noop occurrences in the golden symbol files.

What is the new behavior?

After investigating, we decided to remove the duplicated symbols.

This probably shaves only a few bytes,
but this commit removes the duplicated functions,
by always using the one in core/src/utils/empty.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

This is a followup to PR #40587 as @AndrewKushnir needed a fresh PR to land it (see #40587 (comment)).

The codebase currently contains several `EMPTY_ARRAY` constants,
and they can end up in the bundle of an application.
A recent commit 6fbe219 tipped us off
as it introduced several `noop` occurrences in the golden symbol files.
After investigating with @petebacondarwin,
we decided to remove the duplicated symbols.

This probably shaves only a few bytes,
but this commit removes the duplicated functions,
by always using the one in `core/src/utils/empty`.
@google-cla google-cla bot added the cla: yes label Feb 25, 2021
@pullapprove pullapprove bot requested a review from jessicajaniuk February 25, 2021 10:16
@zarend zarend added the area: core Issues related to the framework runtime label Feb 25, 2021
@ngbot ngbot bot added this to the Backlog milestone Feb 25, 2021
@zarend zarend added target: patch This PR is targeted for the next patch release action: review The PR is still awaiting reviews from at least one requested reviewer labels Feb 25, 2021
Copy link
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.

LGTM, thanks for re-creating this PR @cexbrayat 👍

I've verified that the changes are the same as cabe8be that was reviewed and merged originally, so no further reviews are needed.

Will update g3 status once I have it.

Thank you.

@AndrewKushnir AndrewKushnir added PullApprove: disable action: presubmit The PR is in need of a google3 presubmit and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Feb 25, 2021
@AndrewKushnir AndrewKushnir removed the request for review from jessicajaniuk February 25, 2021 17:52
@AndrewKushnir AndrewKushnir added target: major This PR is targeted for the next major release and removed target: patch This PR is targeted for the next patch release labels Feb 25, 2021
@AndrewKushnir
Copy link
Contributor

@cexbrayat FYI presubmits look good, so I'm adding this PR to the merge queue. Thank you.

@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 risk: medium and removed action: presubmit The PR is in need of a google3 presubmit labels Feb 25, 2021
@AndrewKushnir
Copy link
Contributor

Note to Caretaker: originally this change was submitted and rolled back due to g3 issues. g3 was updated as needed and recent TGP looks good. However it might make sense to sync this change individually to have an option of an easy rollback if needed. Thank you.

This was referenced Mar 15, 2021
@angular-automatic-lock-bot
Copy link

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 Apr 1, 2021
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 cla: yes merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note PullApprove: disable risk: medium 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