-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Dependency Version Mismatch for alloy-rpc-types in foundry-common #6772
Comments
fyi, this same error is for all alloy crates, not just for alloy-rpc-types |
As alloy has not yet released version 0.1.0 on crates.io, foundry directly specifies the https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section Lines 203 to 231 in d2372db
Or just define it in the [dependencies]
alloy-providers = { version = "0.1.0", git = "https://github.com/alloy-rs/alloy" }
alloy-pubsub = { version = "0.1.0", git = "https://github.com/alloy-rs/alloy" }
alloy-network = { version = "0.1.0", git = "https://github.com/alloy-rs/alloy" }
alloy-rpc-client = { version = "0.1.0", git = "https://github.com/alloy-rs/alloy" }
alloy-transport-http = { version = "0.1.0", git = "https://github.com/alloy-rs/alloy" }
alloy-rpc-types = { version = "0.1.0", git = "https://github.com/alloy-rs/alloy" }
... |
Doing this
|
You also need to specify version |
Error
|
It's not working for me . error[E0308]: mismatched types
error[E0277]: a value of type error[E0308]: mismatched types error[E0631]: type mismatch in function arguments error[E0308]: mismatched types Some errors have detailed explanations: E0046, E0053, E0107, E0191, E0277, E0308, E0407, E0599, E0631.
|
trying to clean cache maybe that 's the problem |
cargo new test
cd test
cargo add foundry-evm --git https://github.com/foundry-rs/foundry
# Paste [patch] from foundry-rs/foundry/Cargo.toml into local Cargo.toml
cargo r |
|
I see, don't know how I managed to make it work initially but #6799 should fix it |
Component
Chisel
Have you ensured that all of these are up to date?
What version of Foundry are you on?
No response
What command(s) is the bug in?
No response
Operating System
macOS (Apple Silicon)
Describe the bug
When adding chisel as a dependency from the foundry-rs GitHub repository, I encountered a version mismatch error for alloy-rpc-types. The required version ^0.1.0 is not available on crates.io, which leads to a failure when building my project.
Steps to Reproduce
[dependencies]
chisel = { git = "https://github.com/foundry-rs/foundry", package = "chisel" }
Run cargo build.
Expected Behavior
The project should fetch the required alloy-* crates from the specified git repositories and build successfully.
Current Behavior
Cargo fails to find the required ^0.1.0 version of alloy-rpc-types, as it seems to be unavailable on crates.io. The error message suggests there might be a version that was updated and not re-vendored.
Error
Possible Solutions
If alloy-rpc-types is an internal dependency or is located in a different repository, could you please advise on how to include it correctly?
If the version ^0.1.0 is supposed to be available on crates.io, could there be a missing publish step?
If this is an issue with vendoring, would it be possible to get instructions on how to vendor the necessary crates for chisel?
The text was updated successfully, but these errors were encountered: