Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,10 @@ dependencies = [
"anyhow",
"build_helper",
"curl",
"hex",
"indexmap",
"serde",
"sha2",
"toml 0.8.23",
]

Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ pub(crate) fn maybe_download_rustfmt<'a>(
return Some(PathBuf::new());
}

let VersionMetadata { date, version } = dwn_ctx.stage0_metadata.rustfmt.as_ref()?;
let VersionMetadata { date, version, .. } = dwn_ctx.stage0_metadata.rustfmt.as_ref()?;
let channel = format!("{version}-{date}");

let host = dwn_ctx.host_target;
Expand Down
14 changes: 14 additions & 0 deletions src/build_helper/src/stage0_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ pub struct Stage0 {

#[derive(Default, Clone)]
pub struct VersionMetadata {
pub channel_manifest_hash: String,
pub git_commit_hash: String,
pub date: String,
pub version: String,
}
Expand Down Expand Up @@ -50,9 +52,21 @@ pub fn parse_stage0_file() -> Stage0 {
"git_merge_commit_email" => stage0.config.git_merge_commit_email = value.to_owned(),
"nightly_branch" => stage0.config.nightly_branch = value.to_owned(),

"compiler_channel_manifest_hash" => {
stage0.compiler.channel_manifest_hash = value.to_owned()
}
"compiler_git_commit_hash" => stage0.compiler.git_commit_hash = value.to_owned(),
"compiler_date" => stage0.compiler.date = value.to_owned(),
"compiler_version" => stage0.compiler.version = value.to_owned(),

"rustfmt_channel_manifest_hash" => {
stage0.rustfmt.get_or_insert(VersionMetadata::default()).channel_manifest_hash =
value.to_owned();
}
"rustfmt_git_commit_hash" => {
stage0.rustfmt.get_or_insert(VersionMetadata::default()).git_commit_hash =
value.to_owned();
}
"rustfmt_date" => {
stage0.rustfmt.get_or_insert(VersionMetadata::default()).date = value.to_owned();
}
Expand Down
Loading
Loading