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(ivy): deduplicate imported module in r3_injector #27102

Conversation

ocombe
Copy link
Contributor

@ocombe ocombe commented Nov 14, 2018

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

The r3_injector doesn't deduplicate imported modules, meaning that you can import the same module multiple times and the providers will be overwritten everytime

What is the new behavior?

We deduplicate imports, only the first one matters like it is the case with the current renderer.
This also enables the tests from platform-server for ivy.

Does this PR introduce a breaking change?

  • No

@ocombe ocombe added type: bug/fix action: review The PR is still awaiting reviews from at least one requested reviewer effort1: hours target: major This PR is targeted for the next major release comp: ivy risk: low labels Nov 14, 2018
@ocombe ocombe requested a review from alxhub November 14, 2018 20:16
@ngbot ngbot bot added this to the Backlog milestone Nov 14, 2018
@ocombe ocombe force-pushed the fix/ivy/testbed-platform-server/r3_injector branch from 516ceeb to 534be63 Compare November 14, 2018 21:05
packages/core/src/di/r3_injector.ts Outdated Show resolved Hide resolved
packages/core/src/di/r3_injector.ts Outdated Show resolved Hide resolved
@ocombe ocombe force-pushed the fix/ivy/testbed-platform-server/r3_injector branch from 534be63 to 6dc9304 Compare November 15, 2018 09:07
@mary-poppins
Copy link

You can preview 6dc9304 at https://pr27102-6dc9304.ngbuilds.io/.

@angular angular deleted a comment from mary-poppins Nov 15, 2018
@angular angular deleted a comment from mary-poppins Nov 15, 2018
Copy link
Member

@alxhub alxhub left a comment

Choose a reason for hiding this comment

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

The only thing I would suggest is splitting this into two commits, where one implements the changes to R3Injector and the other enables the tests.

packages/core/src/di/r3_injector.ts Outdated Show resolved Hide resolved
packages/core/src/di/r3_injector.ts Outdated Show resolved Hide resolved
packages/platform-server/test/BUILD.bazel Show resolved Hide resolved
@ocombe ocombe force-pushed the fix/ivy/testbed-platform-server/r3_injector branch 3 times, most recently from e6098f1 to 225c659 Compare November 16, 2018 15:42
@angular angular deleted a comment from mary-poppins Nov 16, 2018
@angular angular deleted a comment from mary-poppins Nov 16, 2018
@ocombe ocombe force-pushed the fix/ivy/testbed-platform-server/r3_injector branch from 225c659 to 4d91d18 Compare November 16, 2018 15:52
@mary-poppins
Copy link

You can preview 4d91d18 at https://pr27102-4d91d18.ngbuilds.io/.

@angular angular deleted a comment from mary-poppins Nov 16, 2018
Copy link
Contributor

@IgorMinar IgorMinar 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 making the changes.

@ocombe ocombe added action: merge The PR is ready for merge by the caretaker PR action: time-zone and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Nov 18, 2018
@mhevery
Copy link
Contributor

mhevery commented Nov 19, 2018

@mhevery mhevery closed this in cf1ebdc Nov 19, 2018
@ocombe ocombe deleted the fix/ivy/testbed-platform-server/r3_injector branch November 21, 2018 16:16
FrederikSchlemmer pushed a commit to FrederikSchlemmer/angular that referenced this pull request Jan 3, 2019
FrederikSchlemmer pushed a commit to FrederikSchlemmer/angular that referenced this pull request Jan 3, 2019
ngfelixl pushed a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019
ngfelixl pushed a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019
@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 Sep 14, 2019
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 cla: yes effort1: hours risk: low target: major This PR is targeted for the next major release type: bug/fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants