-
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
Fix dep info showing up with a build script #4711
Conversation
r? @matklad (rust_highfive has picked a reviewer for you, use r? to override) |
cc @nirbheek |
This is also small and relatively seriously enough that I think I'll backport this when landed |
if let Some(output) = context.build_state.outputs.lock().unwrap().get(&key) { | ||
for path in &output.rerun_if_changed { | ||
deps.insert(path.into()); | ||
// Add rerun-if-changed dependencies |
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 am probably reading this incorrectly, but shouldn't this be outside of if not custom_build
if? Looks like rerun-if-changed
is specifically about custom builds.
Cargo would erroneously bail out early and accidentally forget to emit a dep info file if any dependency used a build script, so this fixes that!
4f9d626
to
9e4f4d1
Compare
@matklad updated! |
@bors r+ +1 to backporting this. Did the original version manage to get through the tests? If so, we could add a test case here :) |
📌 Commit 9e4f4d1 has been approved by |
⌛ Testing commit 9e4f4d1 with merge a3ad53d249f733cd22e33c02ef9b18865156cdf4... |
@matklad ah yeah I think this just never worked with build scripts (by accident!), but I updated a test in this PR which exercises this behavior |
And what about the original version of this PR, where |
Nah I don't think it matters where that code went, it just felt more future-proof to leave it on the outside. I don't think it needs to, for today, go on the outside for correctness. |
@bors: retry |
Fix dep info showing up with a build script Cargo would erroneously bail out early and accidentally forget to emit a dep info file if any dependency used a build script, so this fixes that!
☀️ Test successful - status-appveyor, status-travis |
[beta] Fix dep info showing up with a build script This is a backport of #4711
Cargo would erroneously bail out early and accidentally forget to emit a
dep info file if any dependency used a build script, so this fixes that!