Skip to content

fix(ng-update): material update fails due to circular dependency #16538

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

Conversation

devversion
Copy link
Member

@devversion devversion commented Jul 16, 2019

Currently running ng update for both Material and CDK fails because there
is a circular dependency in the CDK schematics that cause the update-tool
exports to be not available to the Material ng-update schematic.

Without putting to much effort into ensuring no circular dependencies, this
commit also sets up Madge to avoid such issues in the future.

test

Currently running `ng update` for both Material and CDK fails because there
is a circular dependency in the CDK schematics that cause the update-tool
exports to be not available to the Material ng-update schematic.

Without putting to much effort into ensuring no circular dependencies, this
commit also sets up Madge to avoid such issues in the future.
@devversion devversion requested a review from jelbourn as a code owner July 16, 2019 18:28
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jul 16, 2019
@@ -312,6 +312,10 @@ jobs:
- run: yarn gulp ci:build-release-packages
- run: yarn check-release-output

# TODO(devversion): replace this with bazel tests that run Madge. This is
# cumbersome and doesn't guarantee no circular deps for other entry-points.
- run: yarn madge --circular dist/releases/cdk/schematics/index.js
Copy link
Member Author

Choose a reason for hiding this comment

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

I decided to just add this one-liner as that command helped me finding the circular dependency that broke the Material update. Long-term solution should definitely be different.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Jul 16, 2019
@jelbourn jelbourn merged commit ec8d430 into angular:master Jul 16, 2019
jelbourn pushed a commit that referenced this pull request Jul 16, 2019
)

Currently running `ng update` for both Material and CDK fails because there
is a circular dependency in the CDK schematics that cause the update-tool
exports to be not available to the Material ng-update schematic.

Without putting to much effort into ensuring no circular dependencies, this
commit also sets up Madge to avoid such issues in the future.
@devversion
Copy link
Member Author

To clarify: I did various manual testings after the ng-update rework but such issues are not easy to test with packages which are not published on NPM as ng update behaves differently if it installs packages through NPM or uses local ones.

Ideally we'll have some real integration tests for this. And next time I'll make sure to push the schematics to a NPM package for manual testing (even though it's way more effort..)

@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 11, 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 PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants