Skip to content
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

[beta] Hash Kind in metadata for crates #4169

Merged
merged 1 commit into from
Jun 14, 2017

Conversation

alexcrichton
Copy link
Member

This fixes what is now a bug in Cargo discovered when attempting to land
rust-lang/rust#42495 where Cargo will compile both host and target artifacts
with the same -C metadata flag. This means that the compile can load two
crates with the same SVH that are supposed to be distinct, which causes weird
bugs with crate loading and whatnot.

This commit throws in the Kind into the metadata calculation to resolve this
to ensure that host/target artifacts always have a different -C metadata

This fixes what is now a bug in Cargo discovered when attempting to land
rust-lang/rust#42495 where Cargo will compile both host and target artifacts
with the same `-C metadata` flag. This means that the compile can load two
crates with the same SVH that are supposed to be distinct, which causes weird
bugs with crate loading and whatnot.

This commit throws in the `Kind` into the metadata calculation to resolve this
to ensure that host/target artifacts always have a different `-C metadata`
@alexcrichton
Copy link
Member Author

@bors: r+

@bors
Copy link
Contributor

bors commented Jun 14, 2017

📌 Commit 7177f56 has been approved by alexcrichton

@rust-highfive
Copy link

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive
Copy link

warning Warning warning

  • Pull requests are usually filed against the master branch for this repo, but this one is against rust-1.19.0. Please double check that you specified the right target!

@bors
Copy link
Contributor

bors commented Jun 14, 2017

⌛ Testing commit 7177f56 with merge 56f4979...

@bors
Copy link
Contributor

bors commented Jun 14, 2017

💔 Test failed - status-appveyor

@Mark-Simulacrum
Copy link
Member

Seems spurious, but I don't think I can retry -- might as well try, I guess.

@bors retry

error: failed to run custom build command for `libz-sys v1.0.13`
process didn't exit successfully: `C:\projects\cargo\target\debug\build\libz-sys-7b5eea371d27baa2\build-script-build` (exit code: 1)
--- stdout
running: "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\amd64\\nmake.exe" "/nologo" "/f" "C:\\projects\\cargo\\target\\debug\\build\\libz-sys-0598af38eaebd697\\out\\build/win32/Makefile.msc" "zlib.lib"
command did not execute successfully, got: exit code: 2

@alexcrichton
Copy link
Member Author

@bors: retry

This'll require #4171 to go in first but that should likely land. @Mark-Simulacrum want to add yourself to Cargo reviewers?

@bors
Copy link
Contributor

bors commented Jun 14, 2017

⌛ Testing commit 7177f56 with merge cd8455c...

bors added a commit that referenced this pull request Jun 14, 2017
[beta] Hash `Kind` in metadata for crates

This fixes what is now a bug in Cargo discovered when attempting to land
rust-lang/rust#42495 where Cargo will compile both host and target artifacts
with the same `-C metadata` flag. This means that the compile can load two
crates with the same SVH that are supposed to be distinct, which causes weird
bugs with crate loading and whatnot.

This commit throws in the `Kind` into the metadata calculation to resolve this
to ensure that host/target artifacts always have a different `-C metadata`
@bors
Copy link
Contributor

bors commented Jun 14, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing cd8455c to rust-1.19.0...

@bors bors merged commit 7177f56 into rust-lang:rust-1.19.0 Jun 14, 2017
alexcrichton added a commit to brson/rust that referenced this pull request Jun 15, 2017
Pulls in two beta fixes for cargo:

* rust-lang/cargo#4169
* rust-lang/cargo#4170
@alexcrichton alexcrichton deleted the beta-next branch June 15, 2017 14:09
@ehuss ehuss added this to the 1.19.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants