-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Intern PackageId #6332
Intern PackageId #6332
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
2724c07
to
d26c43f
Compare
Interning |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Damn, it's the same tests that failed. Well at least I know where to look now. |
FWIW this looks good to me so far! |
@alexcrichton / @Eh2406 Could you help me understand the failure here, please? I've been studying and debugging
( The new sha for the HEAD of the |
Indeed, the same thing on master show the sha changing:
|
So I think what is going on is that we end up with the two different I don't know how we solve this. Is there some way to let the interning know the "real" hash/eq for the I do have one (probably bad) idea. A |
☔ The latest upstream changes (presumably #6347) made this pull request unmergeable. Please resolve the merge conflicts. |
@Eh2406 is right in that these are two I think the |
d26c43f
to
cf87962
Compare
cf87962
to
a73c517
Compare
That fixed the git tests, but now random other tests are failing:
I think this needs a rethink. This "sometimes equals, sometimes not" strategy is bound to leave holes. Can we not have distinct types for the different use cases? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love the idea of getting away from "sometimes equals, sometimes not" mess. I don't know how infectious a new type would be, how many things have a PackageId
as a field and sow would also need a new type, I honestly don't know. Worth a try as a separate PR, or at least a tracking issue.
Nice one, @Eh2406! The test suite now passes. |
Looks correct. The test pass, and Alex said (on the other PR) to trust the tests. So: |
📌 Commit efd03bd has been approved by |
☀️ Test successful - status-appveyor, status-travis |
remove clones made redundant by Intern PackageId This is a follow up to #6332. I used clippy to find all the places we called `.clone()` on a `PackageId` or where we passed `&PackageId`. Yes that touches 44 files and 400+ lines, that is way we wanted `PackageId` to be `copy`.
Update cargo, rls 26 commits in b3d0b2e545b61d4cd08096911724b7d49d213f73..5e85ba14aaa20f8133863373404cb0af69eeef2c 2018-11-15 19:13:04 +0000 to 2018-12-02 14:37:25 +0000 - ConflictStoreTrie: Faster filtered search (rust-lang/cargo#6366) - Remove `cmake` as a requirement (rust-lang/cargo#6368) - progress: display "Downloading 1 crate" instead of "Downloading 1 crates" (rust-lang/cargo#6369) - Use expect over unwrap, for panic-in-panic aborts (rust-lang/cargo#6364) - Switch to pretty_env_logger, under --features pretty-env-logger (rust-lang/cargo#6362) - use allow-dirty option in `cargo package` to skip vcs checks (rust-lang/cargo#6280) - remove clones made redundant by Intern PackageId (rust-lang/cargo#6352) - docs: correct profile usage of `cargo test --release` (rust-lang/cargo#6345) - Improve doc for `cargo install` (rust-lang/cargo#6354) - Intern PackageId (rust-lang/cargo#6332) - Clean only release artifacts if --release option is set (rust-lang/cargo#6349) - remove clones made redundant by Intern SourceId (rust-lang/cargo#6347) - Intern SourceId (rust-lang/cargo#6342) - Tweak Layout to allow for non json file targets with internal "." (rust-lang/cargo#6255) - Correct Target Directory command-line option (rust-lang/cargo#6343) - Persistent data structures by im-rs (rust-lang/cargo#6336) - Move command prelude into main library (rust-lang/cargo#6335) - Distinguish custom build invocations (rust-lang/cargo#6331) - Allow crate_type=bin examples to run (rust-lang/cargo#6330) - Make verify-project honour unstable features (rust-lang/cargo#6326) - Make autodiscovery disable inferred targets (rust-lang/cargo#6329) - Add `c` alias for `check` (rust-lang/cargo#6218) - Allow user aliases to override built-in aliases (rust-lang/cargo#6259) - Fix renaming directory project using build scripts with cross-compiling. (rust-lang/cargo#6328) - Fix add_plugin_deps-related tests. (rust-lang/cargo#6327) - Add a glossary. (rust-lang/cargo#6321)
Refs #6207