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

chore: remove deps cycle #3929

Closed

Conversation

chenyukang
Copy link
Collaborator

@chenyukang chenyukang commented Apr 11, 2023

What problem does this PR solve?

Remove deps cycle in Cargo.toml.

Problem Summary:

rust-analyzer is blaming for it:

image

And if we remove the deps cycle, we could use cargo deps to visualize deps graph.

devtools/ci/check-cyclic-dependencies.py in CI is not working, do we need to enable it to check the dep order name?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code ci-runs-only: [ quick_checks,linters ]

Side effects

  • None

Release note

None: Exclude this PR from the release note.

@chenyukang chenyukang requested a review from a team as a code owner April 11, 2023 10:46
@chenyukang chenyukang requested review from zhangsoledad and removed request for a team April 11, 2023 10:46
@chenyukang chenyukang force-pushed the yukang/fix-dep-cycle branch from aba2d2c to edae6a8 Compare April 11, 2023 10:52
@@ -59,7 +59,7 @@ case $GITHUB_WORKFLOW in
make check-whitespaces
make check-dirty-rpc-doc
make check-dirty-hashes-toml
devtools/ci/check-cyclic-dependencies.py
devtools/ci/check-cyclic-dependencies.py --dev
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we didn't check the exit code of this script, should we fix it?

Copy link
Member

Choose a reason for hiding this comment

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

Yes it should be fixed

@chenyukang
Copy link
Collaborator Author

ckb

A good way to understand the whole repo.

@chenyukang chenyukang force-pushed the yukang/fix-dep-cycle branch from edae6a8 to 3048cc2 Compare April 11, 2023 11:09
@@ -36,7 +36,6 @@ ckb-reward-calculator = { path = "../util/reward-calculator", version = "= 0.110
ckb-tx-pool = { path = "../tx-pool", version = "= 0.110.0-pre", features = ["internal"] }
ckb-jsonrpc-types = { path = "../util/jsonrpc-types", version = "= 0.110.0-pre" }
ckb-network = { path = "../network", version = "= 0.110.0-pre" }
ckb-launcher = { path = "../util/launcher", version = "= 0.110.0-pre" }
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we should remove ckb-launcher from [dev-dependencies], because there are some unit tests in ckb-chain need ckb-launcher.

Copy link
Member

@quake quake left a comment

Choose a reason for hiding this comment

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

I think the deps cyclic is related to dev-dependencies only, some unit test will failed if you remove it. Could you try the unit test on your local env to verify the result?

@chenyukang
Copy link
Collaborator Author

I think the deps cyclic is related to dev-dependencies only, some unit test will failed if you remove it. Could you try the unit test on your local env to verify the result?

Yes, I can reproduce it in my local env.
Got it, seems some UI test are a little bit like integrated test, so we have rev-order deps.

@chenyukang
Copy link
Collaborator Author

According to rust-lang/rust-analyzer#14167
Even rust-analyzer has a warning on it, we could ignore it safely.
Closing this PR.

@chenyukang chenyukang closed this Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants