From e8ee23e62f96c7549ee0a73acb4c770a00b0e596 Mon Sep 17 00:00:00 2001 From: Steven Malis Date: Fri, 28 Feb 2025 14:05:23 -0500 Subject: [PATCH 1/2] Lower the binary size gate's threshold --- xtask/src/tasks/verify_size.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xtask/src/tasks/verify_size.rs b/xtask/src/tasks/verify_size.rs index d88d022bc..8b1055bc1 100644 --- a/xtask/src/tasks/verify_size.rs +++ b/xtask/src/tasks/verify_size.rs @@ -93,8 +93,8 @@ impl Xtask for VerifySize { println!("Total difference: {total_diff} KiB."); - if total_diff > 100 { - anyhow::bail!("{} size verification failed: The total difference ({} KiB) is greater than the allowed difference ({} KiB).", self.new.display(), total_diff, 100); + if total_diff > 50 { + anyhow::bail!("{} size verification failed: The total difference ({} KiB) is greater than the allowed difference ({} KiB).", self.new.display(), total_diff, 50); } Ok(()) From 89cf96001ed2f51c76c2a164dadce54a71045a9a Mon Sep 17 00:00:00 2001 From: Steven Malis Date: Fri, 28 Feb 2025 15:48:32 -0500 Subject: [PATCH 2/2] feedback --- xtask/src/tasks/verify_size.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xtask/src/tasks/verify_size.rs b/xtask/src/tasks/verify_size.rs index 8b1055bc1..1a9aa8c4a 100644 --- a/xtask/src/tasks/verify_size.rs +++ b/xtask/src/tasks/verify_size.rs @@ -93,8 +93,15 @@ impl Xtask for VerifySize { println!("Total difference: {total_diff} KiB."); - if total_diff > 50 { - anyhow::bail!("{} size verification failed: The total difference ({} KiB) is greater than the allowed difference ({} KiB).", self.new.display(), total_diff, 50); + const ALLOWED: u64 = 50; + if total_diff > ALLOWED { + anyhow::bail!( + "{} size verification failed: \ + The total difference ({} KiB) is greater than the allowed difference ({} KiB).", + self.new.display(), + total_diff, + ALLOWED + ); } Ok(())