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

Cargo vendor with c-kzg crate(s) #4440

Closed
realbigsean opened this issue Jun 28, 2023 · 3 comments
Closed

Cargo vendor with c-kzg crate(s) #4440

realbigsean opened this issue Jun 28, 2023 · 3 comments
Assignees
Labels

Comments

@realbigsean
Copy link
Member

realbigsean commented Jun 28, 2023

Description

Since we import the same dependency twice with different features enabled in kzg, we are no longer able to vendor lighthouse deps due to this issue: rust-lang/cargo#10310

It looks like there was previously a --no-merge-sources flag, but when vendor was added as a subcommand to cargo this was removed. There still exists cargo-vendor vendor --no-merge-sources but I think this requires using rust edition 2018. I wonder if separately publishing the kzg crate or publishing a mainnet and minimal version of the c-kzg bindings might let us workaround this?

@realbigsean
Copy link
Member Author

realbigsean commented Aug 10, 2023

The only workaround I've been able to find in the wild is to publish the same source with different features enabled based on the package name: https://github.com/bodil/im-rs/blob/71331eadac64654bc56f598647ab544197cb1319/build.rs#L14

We would have to make a similar change to the c-kzg-4844 rust bindings

cargo vendor de-dupes based on package name + version which is why this works

@realbigsean
Copy link
Member Author

this will be resolved when we can integrate these changes: ethereum/c-kzg-4844#363

bors bot pushed a commit that referenced this issue Oct 27, 2023
## Issue Addressed

resolves #4440

## Proposed Changes

restore our `cargo vendor` test in CI

changes to `c-kzg` here mean we no longer have to compile it twice and get duplicate source errors: #4862

Co-authored-by: realbigsean <[email protected]>
bors bot pushed a commit that referenced this issue Oct 27, 2023
## Issue Addressed

resolves #4440

## Proposed Changes

restore our `cargo vendor` test in CI

changes to `c-kzg` here mean we no longer have to compile it twice and get duplicate source errors: #4862

Co-authored-by: realbigsean <[email protected]>
bors bot pushed a commit that referenced this issue Oct 27, 2023
## Issue Addressed

resolves #4440

## Proposed Changes

restore our `cargo vendor` test in CI

changes to `c-kzg` here mean we no longer have to compile it twice and get duplicate source errors: #4862

Co-authored-by: realbigsean <[email protected]>
@realbigsean
Copy link
Member Author

resolved in #4886

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants