Skip to content

build-manifest: make not finding toolstate info not fatal #64542

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/tools/build-manifest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,18 @@ impl Builder {
}
// Return the 2nd piece, the JSON.
Some(pieces.next().expect("malformed toolstate line").to_owned())
})
.expect("failed to find toolstate for rust commit");
});
let toolstate = match toolstate {
None => {
eprintln!(
"failed to find toolstate for rust commit {}; \
going on without that information",
rev,
);
return;
}
Some(toolstate) => toolstate,
};
let toolstate: HashMap<String, String> =
serde_json::from_str(&toolstate).expect("toolstate is malformed JSON");
// Mark some tools as missing based on toolstate.
Expand Down