Uh oh!
There was an error while loading. Please reload this page.
Warn when rustc output conflicts with existing directories - #47203
Conversation
rust-highfive
commented
Jan 5, 2018
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
OK so why the existing directory part ends with a single quote?
There was a problem hiding this comment.
An inadvertent stylistic experiment... Fixed.
kennytm
commented
Jan 5, 2018
The |
There was a problem hiding this comment.
This code was able to limp along without a comment before since it was singly-purposed. But if you're going to generalize it with a higher-order function, you should add documentation stating what it does. (E.g. something like "Runs f on every potential output file path, returning this first for which f returns non-none, or None if f is none for all paths.")
pnkfelix
commented
Jan 5, 2018
As @kennytm notes, the From what I can tell, this is happening because your code is (reasonably?) assuming that the paths enumerated by the However, from what I can tell, when the |
pnkfelix
commented
Jan 5, 2018
However you decide to resolve this, it would probably be good to ensure that |
varkor
commented
Jan 7, 2018
Thanks for the pointers @pnkfelix — they were helpful in getting on the right track. I've only got a line or so of documentation for the two new functions at the moment — let me know if you think it's still too sparse! This uncovered (the same) bug in the "don't overwrite the input file" check too, so it was helpful to run into it here. |
There was a problem hiding this comment.
I'd personally use if let Some(ref input_path) = *input_path { ... } here, especially since the None branch is empty.
There was a problem hiding this comment.
(oh but I guess the pre-existing code that you're refactoring used match. Fine to leave it as is to ease reading the diff here, I guess.)
There was a problem hiding this comment.
It turns out the diffing algorithm doesn't catch on anyway, so I'll change it (considering the change is currently breaking on x86_64-pc-windows-msvc).
pnkfelix
commented
Jan 8, 2018
@bors r+ |
bors
commented
Jan 8, 2018
📌 Commit eba03fa has been approved by |
bors
commented
Jan 8, 2018
⌛ Testing commit eba03fa06e2550a62135c8f4d094fa3fb1ab3724 with merge 0dd43d7a6794e3f5aeb9d4559cbea953e48ede21... |
bors
commented
Jan 8, 2018
💔 Test failed - status-appveyor |
kennytm
commented
Jan 8, 2018
bors
commented
Jan 9, 2018
⌛ Testing commit eba03fa06e2550a62135c8f4d094fa3fb1ab3724 with merge 72c51266f24476d376160243aed05d1f36fae8cc... |
bors
commented
Jan 9, 2018
💔 Test failed - status-appveyor |
kennytm
commented
Jan 9, 2018
Likely legit error on |
I guess The failing |
kennytm
commented
Jan 17, 2018
Hi @varkor,
Have you checked the problem, or is it ready to be r+'ed again? |
a23fb80 to
9a2f02dComparevarkor
commented
Jan 29, 2018
@pnkfelix: I think the latest changes should fix the issues on Windows! Do you think you could have a quick look over? |
emilyalbini
commented
Feb 5, 2018
@pnkfelix and @rust-lang/compiler, ping from triage! This PR needs a review. |
estebank
commented
Feb 5, 2018
@bors r+ |
bors
commented
Feb 5, 2018
📌 Commit e92bdb9 has been approved by |
bors
commented
Feb 6, 2018
…y, r=estebank Warn when rustc output conflicts with existing directories When the compiled executable would conflict with a directory, display a rustc error instead of a verbose and potentially-confusing linker error. This is a usability improvement, and doesn’t actually change behaviour with regards to compilation success. This addresses the concern in #35887. Fixes#13098.
bors
commented
Feb 6, 2018
💥 Test timed out |
kennytm
commented
Feb 6, 2018
@bors retry The macs were not scheduled to start. |
bors
commented
Feb 6, 2018
…y, r=estebank Warn when rustc output conflicts with existing directories When the compiled executable would conflict with a directory, display a rustc error instead of a verbose and potentially-confusing linker error. This is a usability improvement, and doesn’t actually change behaviour with regards to compilation success. This addresses the concern in #35887. Fixes#13098.
bors
commented
Feb 6, 2018
☀️ Test successful - status-appveyor, status-travis |
When the compiled executable would conflict with a directory, display a
rustc error instead of a verbose and potentially-confusing linker
error. This is a usability improvement, and doesn’t actually change
behaviour with regards to compilation success. This addresses the
concern in #35887. Fixes#13098.