Open jmpesp opened 1 year ago
My apologies, I've pushed commits to that branch since I opened this issue. The commit that fails to build is https://github.com/jmpesp/omicron/commit/8155cb2ad393a0dc40d887e16abe66d6519e42aa.
Thanks for the detailed report and bug tracing! And sorry for the extremely late reply.
Unfortunately I don't have any helpful answer here 😞. Here is another issue https://github.com/rust-lang/cargo/issues/7497 proposing Cargo to include actual commit hash when referencing a Git dependency, but from another angle — they want Cargo knows different refs are actually on the same commit. If that helps.
Problem
Attempting to compile https://github.com/jmpesp/omicron/tree/update_crucible_and_propolis results in
Steps
This happens every time I
cargo build
the linked branch.Possible Solution(s)
Adding the following trace:
output the following related message for
internal-dns
just before the unexpected cargo error (indenting added by me):cargo
can't find theinternal-dns
package in 7f772b32a0cd02dac075669cb2ece41d1cc1ddf2 because it didn't exist there! It was added in a later commit.Strangely, it's searching a checkout of 7f772b32a0cd02dac075669cb2ece41d1cc1ddf2 for the corresponding package source
https://github.com/oxidecomputer/omicron?branch=main#bd6c6280
.sources
is backed by the following HashMap:I think this is caused by the Hash and Eq impls for SourceId not including the
precise
field:https://github.com/rust-lang/cargo/blob/383a68e7948520f4ccb355b027ff14fe6a7bf248/src/cargo/core/source/source_id.rs#L499-L500
https://github.com/rust-lang/cargo/blob/383a68e7948520f4ccb355b027ff14fe6a7bf248/src/cargo/core/source/source_id.rs#L592-L600
This would cause
insert
s of sources with different Omicron revs to clobber each other.The following test fails:
with
Notes
No response
Version