From 7e77e9e6cb4a447d57a786f19556a2e8d05e7b2f Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 13 Sep 2021 13:14:01 +0200 Subject: [PATCH] fix(wasm-split): Use build_id from commandline (#554) The command line had an option to provide a build_id if there wasn't one in the object already. But this wasn't used and a randomly generated one was always used. --- CHANGELOG.md | 1 + crates/wasm-split/src/main.rs | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd4ec10ca..741b1085e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ ### Fixes - Skip trailing garbage frames after `_start`. ([#514](https://github.com/getsentry/symbolicator/pull/514)) +- Respect the build_id provided on the commandline of wasm-split. ([#554](https://github.com/getsentry/symbolicator/pull/554)) ### Tools diff --git a/crates/wasm-split/src/main.rs b/crates/wasm-split/src/main.rs index f3f98429d..7b404d650 100644 --- a/crates/wasm-split/src/main.rs +++ b/crates/wasm-split/src/main.rs @@ -100,9 +100,14 @@ fn main() -> Result<(), anyhow::Error> { } } - // if we do have to build a new one, just roll a random uuid v4 as build id. + // if we do have to build a new one, use the one from the command line or fall back to + // a random uuid v4 as build id. let build_id = build_id.unwrap_or_else(|| { - let new_id = Uuid::new_v4().as_bytes().to_vec(); + let new_id = cli + .build_id + .unwrap_or_else(Uuid::new_v4) + .as_bytes() + .to_vec(); should_write_main_module = true; module .sections