Skip to content
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

fix(core): mutation bug in getDependenciesFromInjectable #52450

Conversation

AleksanderBodurri
Copy link
Member

Previously, we would modified dep.flags directly to convert injection flags to booleans. This caused a mutation bug where subsequent calls to getDependenciesFromInjectable would result in the flags object containing false for every injection flag.

Now, we stop modifying dep.flags directly and instead assign the converted flags to a new object.

@AleksanderBodurri AleksanderBodurri added target: patch This PR is targeted for the next patch release core: di labels Oct 30, 2023
Previously, we would modified `dep.flags` directly to convert injection flags to booleans. This caused a mutation bug where subsequent calls to `getDependenciesFromInjectable` would result in the flags object containing false for every injection flag.

Now, we stop modifying `dep.flags` directly and instead assign the converted flags to a new object.
@AndrewKushnir AndrewKushnir added the action: presubmit The PR is in need of a google3 presubmit label Oct 30, 2023
@AndrewKushnir
Copy link
Contributor

Presubmit.

@AndrewKushnir AndrewKushnir added this to the v17-final milestone Oct 30, 2023
@ngbot ngbot bot removed this from the v17-final milestone Oct 30, 2023
@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker target: rc This PR is targeted for the next release-candidate and removed action: presubmit The PR is in need of a google3 presubmit target: patch This PR is targeted for the next patch release labels Oct 30, 2023
@AndrewKushnir
Copy link
Contributor

AndrewKushnir commented Oct 30, 2023

@AleksanderBodurri FYI this change has merge conflicts with 16.2.x branch (so it'd be merged into 17.0.x and main branches only), please create a new PR for 16.2.x if needed.

@AndrewKushnir AndrewKushnir added this to the v17-final milestone Oct 30, 2023
@ngbot ngbot bot removed this from the v17-final milestone Oct 30, 2023
@AndrewKushnir AndrewKushnir added this to the v17-final milestone Oct 30, 2023
@ngbot ngbot bot removed this from the v17-final milestone Oct 30, 2023
@AndrewKushnir AndrewKushnir added the area: core Issues related to the framework runtime label Oct 30, 2023
@ngbot ngbot bot added this to the Backlog milestone Oct 30, 2023
@AndrewKushnir AndrewKushnir modified the milestones: Backlog, v17-final Oct 30, 2023
@alxhub
Copy link
Member

alxhub commented Oct 31, 2023

This PR was merged into the repository by commit 078ebea.

alxhub pushed a commit that referenced this pull request Oct 31, 2023
Previously, we would modified `dep.flags` directly to convert injection flags to booleans. This caused a mutation bug where subsequent calls to `getDependenciesFromInjectable` would result in the flags object containing false for every injection flag.

Now, we stop modifying `dep.flags` directly and instead assign the converted flags to a new object.

PR Close #52450
@alxhub alxhub closed this in 078ebea Oct 31, 2023
@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 Dec 1, 2023
tbondwilkinson pushed a commit to tbondwilkinson/angular that referenced this pull request Dec 6, 2023
…2450)

Previously, we would modified `dep.flags` directly to convert injection flags to booleans. This caused a mutation bug where subsequent calls to `getDependenciesFromInjectable` would result in the flags object containing false for every injection flag.

Now, we stop modifying `dep.flags` directly and instead assign the converted flags to a new object.

PR Close angular#52450
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
…2450)

Previously, we would modified `dep.flags` directly to convert injection flags to booleans. This caused a mutation bug where subsequent calls to `getDependenciesFromInjectable` would result in the flags object containing false for every injection flag.

Now, we stop modifying `dep.flags` directly and instead assign the converted flags to a new object.

PR Close angular#52450
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: di target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants