Repository navigation
fix: Also fix VLQ bug during encoding - #144
Merged
Merged
Conversation
Comment on lines
+362
to
+363
| let rv = generate_vlq_segment(&[u32::MIN as i64]).unwrap(); | ||
| assert_eq!(rv.as_str(), "B"); |
There was a problem hiding this comment.
Encode test uses u32::MIN instead of i32::MIN, so it fails
generate_vlq_segment(&[u32::MIN as i64]) encodes 0 as "A", but the assertion expects "B"; the input should be i32::MIN as i64 to match the new encode path and the decode test.
Evidence
- Decode test asserts
parse_vlq_segment("B") == [i32::MIN as i64]andencode_vlqspecial-cases onlynum == i32::MIN as i64to emit digit1("B"). - Added encode test passes
u32::MIN as i64, which is0, noti32::MIN as i64(-2147483648). - For
0,encode_vlqtakes thenum << 1branch and emits"A", soassert_eq!(rv.as_str(), "B")fails deterministically.
Identified by Warden · code-review · CUZ-BYT
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a0758d2. Configure here.
Dav1dde
approved these changes
Nov 26, 2026
kdy1
added a commit
to swc-project/swc-sourcemap
that referenced
this pull request
Nov 27, 2026
## Summary Merge upstream `getsentry/rust-sourcemap` `master` (head `499ada5`) into the fork. The merge uses a merge commit. Merged upstream commits: - `f80828d` feat: Support for parsing scopes (getsentry#142) - `499ada5` fix: Also fix VLQ bug during encoding (getsentry#144) ## Conflict resolution - `src/types/mod.rs`: The fork's `Cow` and `BytesStr` changes stay. The upstream `BTreeMap` import and `scopes` field are added. The upstream removal of `#[allow(clippy::ptr_arg)]` on `create_ranges` is applied. - `src/types/scope.rs`: `OriginalScope::get_name` and `OriginalScope::get_kind` now return `Option<&BytesStr>`. This matches the fork's `SourceMap::get_name` API. ## Validation Local checks on the merge commit: `cargo build --all-targets` and `cargo test --all-features` pass. `cargo fmt --check` passes after formatting. `cargo clippy` is not installed for the local toolchain, so it did not run. CI has not run yet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Same bug as was fixed in #143, but in encoding instead of decoding.