Skip to content

Commit

Permalink
fix(wasm-split): Use build_id from commandline (#554)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Floris Bruynooghe committed Sep 13, 2021
1 parent 6fd6e55 commit 7e77e9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 7 additions & 2 deletions crates/wasm-split/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7e77e9e

Please sign in to comment.