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

Make dependencies compatible with "cargo vendor" #563

Merged
merged 1 commit into from
May 4, 2022
Merged

Make dependencies compatible with "cargo vendor" #563

merged 1 commit into from
May 4, 2022

Conversation

ruuda
Copy link
Contributor

@ruuda ruuda commented May 4, 2022

We need to patch all the dependencies from solana-*, to make sure we don't mix packages from crates.io and our fork. Without this, cargo vendor will complain with an error like this:

$ cargo vendor
error: failed to sync

Caused by:
  found duplicate version of package `solana-metrics v1.7.8` vendored from two sources:

  	source 1: registry `crates-io`
  	source 2: https://github.com/ChorusOne/solana?branch=program-test-178#af358e1a

I listed all of these under patches until Cargo stopped complaining.

This is needed in particular to make this work with buildRustPackage in Nix, because it relies on cargo vendor.

@ruuda ruuda requested a review from enriquefynn May 4, 2022 08:45
We need to patch all the dependencies from solana-*, to make sure we
don't mix packages from crates.io and our fork. Without this, "cargo
vendor" will complain about a duplicate source.

This is needed in particular to make this work with buildRustPackage in
Nix, because it relies on "cargo vendor".
Copy link
Member

@enriquefynn enriquefynn left a comment

Choose a reason for hiding this comment

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

LGTM!
We can bump these so we don't need to patch it, as I believe the changes are already in newer versions, maybe create an issue for it?

@ruuda
Copy link
Contributor Author

ruuda commented May 4, 2022

Opened #565 for updating Solana.

@ruuda ruuda merged commit 306308b into main May 4, 2022
@ruuda ruuda deleted the fix-vendor branch May 4, 2022 11:02
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.

2 participants