Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(wasm-split): Use build_id from commandline #554

Merged
merged 2 commits into from
Sep 13, 2021
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
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