Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upDon't rely on Hash for Package deduplicating #1709
Conversation
rust-highfive
assigned
huonw
Jun 12, 2015
This comment has been minimized.
This comment has been minimized.
|
r? @brson |
rust-highfive
assigned
brson
and unassigned
huonw
Jun 12, 2015
This comment has been minimized.
This comment has been minimized.
rust-highfive
commented
Jun 12, 2015
|
r? @huonw (rust_highfive has picked a reviewer for you, use r? to override) |
alexcrichton
referenced this pull request
Jun 12, 2015
Merged
Use Cargo's target directory sharing. #6306
This comment has been minimized.
This comment has been minimized.
|
@bors r+ |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Jun 12, 2015
This comment has been minimized.
This comment has been minimized.
|
|
bors
merged commit 06a0605
into
rust-lang:master
Jun 12, 2015
alexcrichton
deleted the
alexcrichton:fix-some-overrides
branch
Jun 15, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
alexcrichton commentedJun 12, 2015
The fix in #1697 was to alter the
Hashimplementation ofPackageto takeinto account the source root instead of just the package id (so packages at the
same source would have the same hash). There's a spot, however, where we
normalize some paths and not others, causing two paths which logically point the
same location end up having different hashes, so the same package ended up being
stored multiple times, later leading to an assertion that there was only one
stored.
This commit alters the behavior of read_packages to keep a hash map of ID =>
Package instead of just a hash set of Package as the deduplication/equality
needs to be based on the ID, not the literal path to the source root.
This specific bug shows up when you have an override and a normal dependency
pointing at the same location (and the override has some inter-dependencies).
Not exactly a normal use case, but it showed up in Servo's build!