-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Bump bootstrap to 1.52 beta #83530
Bump bootstrap to 1.52 beta #83530
Conversation
r? @kennytm (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
d79e9b2
to
4f9c25e
Compare
This comment has been minimized.
This comment has been minimized.
Hm, that seems unexpected. I can't trivially reproduce locally; trying a full test run now... |
I can reproduce in the docker container locally. Core does get documented:
But it doesn't look like it exists in the doc/core directory or the stage2-std directory afterwards, which is downright odd. std and alloc both do. It seems like I can reproduce with |
@jyn514 would you by chance have a chance to take a look at this? I am not sure that there's a clear explanation for why core isn't getting copied over, and I unfortunately don't have a lot of time to investigate - no worries if you can't though, I can try to find some time. |
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.
Off the top of my head nothing looks suspicious. Maybe there was a rustdoc regression in 1.52? Is stage2 normally documented using stage0 or stage 1?
This comment has been minimized.
This comment has been minimized.
b793db3
to
d7a682b
Compare
This comment has been minimized.
This comment has been minimized.
Failures here are likely caused by rust-lang/cargo#8640 which is deleting the target/$host/doc directory during the cargo doc -p core run, causing rustbuild to delete the directory before the alloc run (as it considers it stale, missing the .stamp file as added by rustbuild before running Cargo). I'm still trying to figure out a solution to this... it may be that we need to document core twice or something like that as an easy stopgap. |
cc @rust-lang/cargo would be good to get a heads up on future deletions/modifications to how we cache state, though I don't know that I'd call this a 'bug' in cargo (we don't really imply stability I guess). May be good to add to the release notes for 1.52 though. |
An alternate solution to rust-lang/cargo#8640 is for cargo to pass |
1.52 Cargo adds rust-lang/cargo#8640 which means that cargo will try to purge the doc directory caches for us. In theory this may mean that we can jettison the clear_if_dirty for rustdoc versioning entirely, but for now just workaround the effects of this change in a less principled but more local way.
b69ff65
to
f06efd2
Compare
r? @jyn514 since you did a bit of review previously, hopefully CI will pass now |
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.
r=me with CI passing
// output directory will be deleted by us (as cargo will purge the stamp | ||
// file during the first slot's run), and core is relatively fast to | ||
// build so works OK to fill this 'dummy' slot. | ||
let krates = ["core", "core", "alloc", "std", "proc_macro", "test"]; |
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.
Core is unfortunately pretty chunky until #83278 lands :/ but this seems ok as a workaround. I do think it's worth it for cargo to stop deleting the doc directory though (#83530 (comment)), I'll open an issue if someone from the team doesn't comment soon.
$ x.py doc --stage 1 library/core
Documenting stage1 std (x86_64-unknown-linux-gnu)
Documenting core v0.0.0 (/home/joshua/rustc2/library/core)
Finished release [optimized] target(s) in 8.74s
@bors r+ rollup=never |
📌 Commit f06efd2 has been approved by |
@bors p=6 |
☀️ Test successful - checks-actions |
Hm, I'm sorry this has caused you trouble. I'm having trouble reproducing the error, can you provide any insight on how to reproduce it? I tried a few things, the most direct was checking out the latest version of master (39eee17), removing the change in f06efd2, and running Can you maybe outline what went wrong?
I can try harder to anticipate what is going to cause problems with rustbuild. I usually try to consider that, and sometimes run test builds when I'm uncertain, but I didn't do that in this case. In cases where I know bootstrap will need to change, I do try to notify you. I'm not sure if it is feasible to alert on every change to the target directory. Almost every release has some changes to the fingerprints or target structure or build behavior. The vast majority shouldn't affect rustbuild. If you want, I can maybe try to add some semi-automated test to my cargo updates that will run tests with the latest master-cargo? I'd probably want to run them in docker, is there a particular docker image that would be a good representative image? Maybe |
There may be a faster way, but for me The problem, as I understand it, is that rustbuild currently tries to basically do the exact same thing cargo does, but rustbuild (obviously) does it before it runs cargo. Specifically, the sequence of events is:
Hopefully that helps with understanding things! Yeah, it's no big deal when this happens, realistically it's quite rare that anything actually breaks. Getting some smoke tests running with nightly cargo has been on my 'would love this' list for a while, just not something I've gotten around to personally. I'd personally say that if you wanted to test - and I want to be clear that by no means do I think this is necessary, and is likely too high a burden - then any of the docker test builders would likely be good candidates. I personally usually have a bunch of problems getting those to run nicely (e.g., IPv6 tests in std regularly fail due to problems with my network configuration locally), but if they work OK then that seems reasonable. dist builders are likely not particularly interesting with respect to cargo updates, as they don't do more interesting builds than a test build (and do less of them). I think the most practical thing may be to just deal with it when I encounter it, and I might be a bit more eager to ping asking if there were any particular changes in the future (as it so happens I think I recall glancing at the cargo PR but I also didn't connect it to breakage). |
I see, thanks! I'm able to reproduce it. I probably had a pre-existing fingerprint which prevented it from being cleared. I'll try to think of some way to avoid this problem. My concern is that this could affect other users doing similar unusual things. I'm not sure if the risk is enough to revert it or not.
I regularly run docker images locally. For this particular issue, running |
Hm, yeah, I'll look into that. It might be a good fix. |
beta: revert #8640 - rustdoc versioning checks #8640 has been causing some problems with rustbuild (see rust-lang/rust#83914 and rust-lang/rust#83530 (comment)). In order to give more time to figure out a solution, this reverts the change on beta. Will need to take some time to figure out what to do on master. Also cherry picked the following to get tests passing: * #9316 — Fix semver docs for 1.51. * #9307 — tests: Tolerate "exit status" in error messages
This includes the standard bump, but also a workaround for new cargo behavior around clearing out the doc directory when the rustdoc version changes.