Fix error handling when looking for toolchain components #2021
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The perf collector failed weirdly in rust-lang/rust#134297 (comment). It failed when the collector was trying to gather PGO data, with a very terse error:
collector error: Cannot read lib dir to find components
.So this PR:
fill_libraries
get_lib_dir_from_rustc
which didn't check thatrustc --print sysroot
successfully returned the sysroot, it'll print the exit status and stderr.With these we can see that the error was a cute one, the stage2 rustc panicked when asked to print the sysroot. So the error in the CI logs would now look like:
Once this lands, I'll bump the submodule in the rust repo so that CI has the new error handling, in case it happens again in the PRs trying to land the same changes that may currently cause a miscompile 😓.