-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustc should open the output file as soon as it starts compiling #6518
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
Comments
Although this makes sense to me, it may not be causing the behavior you are seeing now. The library build dependencies are mostly driven by a bunch of 0-byte dummy files that the makefiles Assuming that we fixed that problem though, implementing this still seems problematic since the final artifact is generated by the linker, not rustc itself. If we were to touch the |
Yeah, I can see how the names being unstable make this quite tricky. Regarding the second issue (the linker generating the final artifact), I guess there aren't object files or anything generated directly by the compiler? |
This happened to me recently too. It wasn't too annoying for me, but I could see it being a nasty surprise for someone who wasn't paying attention. Nominating for production-ready. But, even without linking, if rustc keeps the output file open the whole time, won't it still get timestamped at the point when it closes the file descriptor (and hence still be too late)? Another problem about that would be you couldn't run two rustcs at once on different versions of the same source files, which I do occasionally just for the sake of getting quicker error messages (not caring about the actual output). One probably-pretty-dangerous solution would be to re-timestamp the output files backwards in time to the point at which all the source files were read. I wonder if we could have rustc record the "source-file-reading time" in the files it generates, and have it later check against that? Seems like you'd need to hack around 'make' though. |
This is still relevant. |
Just a bug (hopefully will go away with rustpkg) |
Still an issue, though I'm not sure how it could be fixed. |
Visiting for triage. This is still a problem, but it's never happened to me. |
You can pass explicit timestamps to the |
Or better still, grab a separate timestamp at each point that we invoke |
…cation. Strategy: If the end goal is to touch e.g. `stamp.std`, then we first touch `stamp.std.start_time` before doing anything else. Then when the receipe finishes, we touch `stamp.std` using the timestamp from `stamp.std.start_time` as the reference time, and remove `stamp.std.start_time`. Fix rust-lang#6518.
…edits, r=nikomatsakis Make build timestamp files robust in face of concurrent source modification. Strategy: If the end goal is to touch e.g. `stamp.std`, then we first touch `stamp.std.start_time` before doing anything else. Then when the receipe finishes, we touch `stamp.std` using the timestamp from `stamp.std.start_time` as the reference time, and remove `stamp.std.start_time`. Fix #6518.
Ensure `Copy` exception in trait definition for `wrong_self_conventio… Add a test case to ensure `Copy` exception is preserved also in trait definition, when passing `self` by value. Follow up of rust-lang#6316 changelog: none
Consider the following sequence of actions:
make
, which runsrustc
.rustc
is compiling.rustc
finishes compiling.What I expect is that, if I run
make
again, the changes will get detected andrustc
will be invoked again. What actually happens is thatmake
reports that there's nothing to be done.This is probably because
rustc
is waiting way too long to open the output file, so updates to source files while the compiler's running appear to "happen before" the output file frommake
's point of view.The text was updated successfully, but these errors were encountered: