Skip to content

refactor(@angular-devkit/schematics): remove UpdateBuffer and rename UpdateBuffer2 to UpdateBuffer #24035

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 7, 2022
Merged

refactor(@angular-devkit/schematics): remove UpdateBuffer and rename UpdateBuffer2 to UpdateBuffer #24035

merged 1 commit into from
Oct 7, 2022

Conversation

kyubisation
Copy link
Contributor

@kyubisation kyubisation commented Oct 7, 2022

This PR removes the internally built UpdateBuffer and renames UpdateBuffer2 (based on magic-string) to UpdateBuffer. This should have little to no impact for consumers.

BREAKING CHANGE:
The depracated UpdateBuffer has been removed and UpdateBuffer2 is renamed to UpdateBuffer. With this change the related and deprecated symbols ContentCannotBeRemovedException and Chunk have also been removed.

PR Checklist

Please check to confirm 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
  • Other... Please describe:

What is the current behavior?

The deprecated UpdateBuffer instance is being used per default.

Issue Number: N/A

What is the new behavior?

The magic-string based UpdateBuffer2 is being used per default.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

See #21209 and #21110

@kyubisation kyubisation changed the title refactor: switch the default update buffer to UpdateBuffer2 refactor(@angular-devkit/schematics): switch the default update buffer to UpdateBuffer2 Oct 7, 2022
Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

Thanks for this.

However, this needs some more work if you are up to it.

  • Delete the legacy UpdateBuffer
  • Rename UpdateBuffer2 to UpdateBuffer
  • Add a breaking change note in the commit message?

@alan-agius4 alan-agius4 added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews target: major This PR is targeted for the next major release labels Oct 7, 2022
@alan-agius4 alan-agius4 added this to the v15 Feature Freeze milestone Oct 7, 2022
@kyubisation
Copy link
Contributor Author

I was unsure whether to directly delete the UpdateBuffer. If you think it's ok to remove, then I will do that and update it with a breaking change description. I will also remove the NG_UPDATE_BUFFER_LEGACY flag, as it would have no effect this way.

@kyubisation
Copy link
Contributor Author

Should I also merge UpdateBufferBase with the renamed UpdateBuffer?

@alan-agius4
Copy link
Collaborator

alan-agius4 commented Oct 7, 2022

Should I also merge UpdateBufferBase with the renamed UpdateBuffer?

No, as UpdateBufferBase is part of the public API while UpdateBuffer is private.

@kyubisation kyubisation changed the title refactor(@angular-devkit/schematics): switch the default update buffer to UpdateBuffer2 refactor(@angular-devkit/schematics): remove UpdateBuffer and rename UpdateBuffer2 to UpdateBuffer Oct 7, 2022
@kyubisation
Copy link
Contributor Author

LinkedList is no longer used, but was not marked as deprecated, so I left it in (but added deprecation note).
Is the PR fine like this or should I change something else?

Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution. One comment about the LinkedList otherwise LGTM

…e `UpdateBuffer2` to `UpdateBuffer`

This PR removes the internally built `UpdateBuffer` and renames
`UpdateBuffer2` (based on magic-string) to `UpdateBuffer`. This
should have little to no impact for consumers.

BREAKING CHANGE:
The depracated `UpdateBuffer` has been removed and `UpdateBuffer2`
is renamed to `UpdateBuffer`. With this change the related and
deprecated symbols `ContentCannotBeRemovedException` and `Chunk`
have also been removed.
@angular-robot angular-robot bot requested a review from alan-agius4 October 7, 2022 13:30
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Oct 7, 2022
@clydin clydin merged commit 9b07b46 into angular:main Oct 7, 2022
@kyubisation kyubisation deleted the refactor-switch-update-buffer branch October 7, 2022 16:07
kyubisation added a commit to sbb-design-systems/sbb-angular that referenced this pull request Nov 7, 2022
Upstream UpdateBuffer change has been merged (angular/angular-cli#24035)
which allows us to remove the UpdateBuffer patching.
@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 Nov 7, 2022
@kyubisation kyubisation restored the refactor-switch-update-buffer branch November 10, 2022 18:08
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 flag: breaking change 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