Closed
Description
I encountered a slight annoyance when using both alloy
and forge bind --alloy
.
forge bind --alloy-version "v0.11.0"
would depend ongit+https://github.com/alloy-rs/alloy?rev=v0.11.0#f4d34d4039270b9e2da2b62cc84351f1145ef3a5
alloy = 0.11.0
would depend on the one artifacts on crates-io
and cargo will treat them as two versions as you will see two entries in Cargo.lock
:
name = "alloy"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5295219c9bc87cfa2497131423921e8ea136ee7e2ab338967078995168431d5"
name = "alloy"
version = "0.11.0"
source = "git+https://github.com/alloy-rs/alloy?rev=v0.11.0#f4d34d4039270b9e2da2b62cc84351f1145ef3a5"
This will have many compiler complains about type incompatibility.
While I can live with alloy = { git = "https://github.com/alloy-rs/alloy", rev = "v0.11.0" }
explicitly in my crates for now. It's not ideal.
Proposal
update forge bind
behavior so that the populated Cargo.toml
file declare its alloy dependency
--alloy-version
will useversion
instead ofrev
.- add a separate flags
--alloy-rev
to meanrev
Metadata
Metadata
Assignees
Type
Projects
Status
Completed