From 4a1a8389949314300574f352926f5c2347d8f5e5 Mon Sep 17 00:00:00 2001 From: firestar99 Date: Tue, 22 Sep 2026 15:58:10 +0200 Subject: [PATCH 1/4] xtask headers: improve logging --- xtask/src/headers.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/xtask/src/headers.rs b/xtask/src/headers.rs index 6e534d9..c10b5c7 100644 --- a/xtask/src/headers.rs +++ b/xtask/src/headers.rs @@ -45,7 +45,7 @@ impl HeadersUpdate { } else { let branch = SubmoduleBranches::fetch(repo, SUBMODULE_PATH, BRANCH_PREFIX)? .highest_semver_branch(BRANCH_PREFIX)?; - println!("Newest SPIR-V header version is `{branch}`"); + println!("Resolved newest SPIR-V header version `{branch}`"); branch }; @@ -57,12 +57,13 @@ impl HeadersUpdate { &format!("submodule.{SUBMODULE_PATH}.branch"), ]) .context("reading submodule branch from .gitmodules")?; - if old_branch.trim() == branch { + let old_branch = old_branch.trim(); + if old_branch == branch { println!("SPIR-V headers is already set to `{branch}`, skipping"); return Ok(()); } - println!("Setting SPIR-V headers to `{branch}`"); + println!("Updating SPIR-V headers from `{old_branch}` to `{branch}`"); repo.git(&[ "submodule", "set-branch", @@ -114,11 +115,11 @@ fn set_workspace_sdk_version(repo: &GitRepo, branch: &str) -> anyhow::Result<()> let base = old_version.split('+').next().unwrap_or(old_version); let new_version = format!("{base}+sdk-{sdk_version}"); if old_version == new_version { - println!("Workspace version already `{new_version}`"); + println!("Workspace version already set to `{new_version}`"); return Ok(()); } - println!("Setting workspace version to `{new_version}`"); + println!("Updating workspace version from `{old_version}` to `{new_version}`"); let content = content.replacen(old_version, &new_version, 1); fs::write(&path, content).context("writing Cargo.toml")?; Ok(()) From cebbf4e45833b4ca13220697621935dccde85df2 Mon Sep 17 00:00:00 2001 From: firestar99 Date: Tue, 22 Sep 2026 16:17:51 +0200 Subject: [PATCH 2/4] xtask headers: also update changelog when updating vulkan sdk --- xtask/src/headers.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/xtask/src/headers.rs b/xtask/src/headers.rs index c10b5c7..5fa5b8f 100644 --- a/xtask/src/headers.rs +++ b/xtask/src/headers.rs @@ -36,6 +36,9 @@ pub struct HeadersUpdate { /// Skip updating the workspace version `+sdk-` suffix #[clap(long)] skip_version: bool, + /// Skip updating the changelog + #[clap(long)] + skip_changelog: bool, } impl HeadersUpdate { @@ -79,6 +82,10 @@ impl HeadersUpdate { .context("updating workspace sdk version suffix")?; } + if !self.skip_changelog { + update_changelog(repo, &branch).context("updating changelog")?; + } + if !self.skip_autogen { println!("Running `cargo autogen`"); let status = Command::new("cargo") @@ -125,6 +132,19 @@ fn set_workspace_sdk_version(repo: &GitRepo, branch: &str) -> anyhow::Result<()> Ok(()) } +/// Update the changelog to include a sdk update message +fn update_changelog(repo: &GitRepo, branch: &str) -> anyhow::Result<()> { + const UNRELEASED_TAG: &str = "## [Unreleased]\n"; + let path = repo.root.join("CHANGELOG.md"); + let replacement = format!( + "{UNRELEASED_TAG}- Update Vulkan sdk to [{branch}](https://github.com/KhronosGroup/Vulkan-Headers/tree/{branch})\n" + ); + let content = fs::read_to_string(&path).context("reading CHANGELOG.md")?; + let content = content.replacen(UNRELEASED_TAG, &replacement, 1); + fs::write(&path, content).context("writing CHANGELOG.md")?; + Ok(()) +} + /// List the release branches of the SPIR-V headers repo #[derive(Clone, Debug, Parser)] pub struct HeadersList {} From 39ea06b2552c097f016aa90a08978fc67b0bff90 Mon Sep 17 00:00:00 2001 From: firestar99 Date: Tue, 22 Sep 2026 16:26:35 +0200 Subject: [PATCH 3/4] xtask headers: add --force arg --- xtask/src/headers.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/xtask/src/headers.rs b/xtask/src/headers.rs index 5fa5b8f..4c4f7eb 100644 --- a/xtask/src/headers.rs +++ b/xtask/src/headers.rs @@ -30,6 +30,9 @@ pub struct HeadersUpdate { /// Branch or revision to point the submodule at. Defaults to the branch /// with the highest semver matching `vulkan-sdk-*.*.*`. rev: Option, + /// Proceed updating things anyway, even if the version didn't change. Useful if submodules are in a weird state. + #[clap(long)] + force: bool, /// Skip running autogen to update generated files #[clap(long)] skip_autogen: bool, @@ -61,7 +64,7 @@ impl HeadersUpdate { ]) .context("reading submodule branch from .gitmodules")?; let old_branch = old_branch.trim(); - if old_branch == branch { + if !self.force && old_branch == branch { println!("SPIR-V headers is already set to `{branch}`, skipping"); return Ok(()); } @@ -78,7 +81,7 @@ impl HeadersUpdate { repo.git(&["submodule", "update", "--remote", SUBMODULE_PATH])?; if !self.skip_version { - set_workspace_sdk_version(repo, &branch) + set_workspace_sdk_version(repo, &branch, self.force) .context("updating workspace sdk version suffix")?; } @@ -102,7 +105,7 @@ impl HeadersUpdate { } /// Update the workspace version `+sdk-` appendix -fn set_workspace_sdk_version(repo: &GitRepo, branch: &str) -> anyhow::Result<()> { +fn set_workspace_sdk_version(repo: &GitRepo, branch: &str, force: bool) -> anyhow::Result<()> { let sdk_version = { let (major, minor, patch) = parse_branch_semver(branch, BRANCH_PREFIX).context("failed to parse branch")?; @@ -121,7 +124,7 @@ fn set_workspace_sdk_version(repo: &GitRepo, branch: &str) -> anyhow::Result<()> .context("no workspace `version` line found")?; let base = old_version.split('+').next().unwrap_or(old_version); let new_version = format!("{base}+sdk-{sdk_version}"); - if old_version == new_version { + if !force && old_version == new_version { println!("Workspace version already set to `{new_version}`"); return Ok(()); } From f46db4d95cae0064fa1af25f39d8efa12ac1a738 Mon Sep 17 00:00:00 2001 From: firestar99 Date: Tue, 22 Sep 2026 16:29:23 +0200 Subject: [PATCH 4/4] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84f7acd..ff58418 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,5 +6,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +- Update Vulkan sdk to [vulkan-sdk-1.4.363](https://github.com/KhronosGroup/Vulkan-Headers/tree/vulkan-sdk-1.4.363) ## [0.1.0+sdk-1.4.357](https://github.com/Rust-GPU/rspirv2/releases/tag/v0.1.0+sdk-1.4.357) - 2026-07-29 - Initial release of rspirv2