Occasional non-reproducibility when building librls and libcargo #68608
Labels
A-reproducibility
Area: Reproducible / deterministic builds
C-bug
Category: This is a bug.
S-needs-repro
Status: This issue has no reproduction and needs a reproduction to make progress.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Occasionally (perhaps 1/3 of the time, so it's not that rare) when doing multiple builds with
extended = true
(and hence building tools including rls and cargo), I get different libcargo.rlib and librls.rlib files.During a normal build, libcargo gets built once (reproducibly for me), but on these bad builds it gets built twice. The command line is slightly different the second time, as it has
,artifacts
appended to its--json
argument (due to this code). This difference gets propagated to librls, which depends on libcargo.I believe this is due to rustc's bootstrap compiler invoking cargo separately for each tool. If the cargo build finishes early enough, the rls build can use its result. But if it does not, the rls build seems to fire off its own compile, which causes the above issue.
Note that this is a part of #34902.
The text was updated successfully, but these errors were encountered: