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

Move util/launcher/src/migrate.rs to an independent crate #4235

Conversation

eval-exec
Copy link
Collaborator

@eval-exec eval-exec commented Nov 17, 2023

What problem does this PR solve?

This PR want to move util/launcher/src/migrate.rs related module into an independent crate, this will help resolve ckb's dependency cycles issue.

In the production build: ckb-launcher need ckb-chain.
But in dev build: ckb-chain need ckb-launcher's SharedPackage and SharedBuilder.

If we move util/launcher/src/migrate.rs to an independent crate, then SharedPackage and SharedBuilder can be moved to ckb-shared. Then we won't need ckb-launcher to build shared in ckb's unit tests anymore.

On develop branch:

flowchart TD
    subgraph ckb-launcher
        Launcher
        Migrate
    end
Loading

After this PR:

flowchart TD
    subgraph ckb-launcher
        Launcher

    end

    subgraph ckb-migrate
        Migrate
    end
    ckb-launcher --> ckb-migrate
Loading

What's Changed:

Related changes

  • Move util/launcher/src/migrate.rs related module into an independent crate (ckb-migrate)

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

Title Only: Include only the PR title in the release note.

@eval-exec eval-exec requested a review from a team as a code owner November 17, 2023 09:01
@eval-exec eval-exec requested review from doitian, chenyukang, zhangsoledad and EthanYuan and removed request for a team November 17, 2023 09:01
@eval-exec eval-exec added the dependencies Pull requests that update a dependency file label Nov 17, 2023
@eval-exec eval-exec marked this pull request as draft November 17, 2023 09:05
@eval-exec
Copy link
Collaborator Author

Fixing cargo clippy...

@EthanYuan
Copy link
Collaborator

If we move util/launcher/src/migrate.rs to an independent crate, then SharedPackage and SharedBuilder can be moved to ckb-shared. Then we won't need ckb-launcher to build shared in ckb's unit tests anymore.

Will this PR include moving SharedPackage and SharedBuilder to ckb-shared?

@eval-exec
Copy link
Collaborator Author

eval-exec commented Nov 20, 2023

Will this PR include moving SharedPackage and SharedBuilder to ckb-shared?

No, this PR only move struct Migrate related code in ckb-launcher crate to a new independent crate (ckb-migrate).

"Moving SharedBuilder and SharedPackage to ckb-shared crate" can be found in next pr: #4236

@quake quake merged commit 4779635 into nervosnetwork:develop Nov 20, 2023
33 checks passed
@doitian doitian mentioned this pull request Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants