"unable to get packages from source" due to SourceId hash collision #12233
Labels
A-crate-dependencies
Area: [dependencies] of any kind
A-git
Area: anything dealing with git
C-bug
Category: bug
S-needs-design
Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
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:cargo/src/cargo/core/source/source_id.rs
Lines 499 to 500 in 383a68e
cargo/src/cargo/core/source/source_id.rs
Lines 592 to 600 in 383a68e
This would cause
insert
s of sources with different Omicron revs to clobber each other.The following test fails:
with
Notes
No response
Version
The text was updated successfully, but these errors were encountered: