refactor(builtin): drop deprecated BytesView byte-order conversions - #4101
Merged
Merged
Conversation
Removes the ten `#deprecated` + `#doc(hidden)` byte-order helpers on `BytesView`: `to_uint_be/le`, `to_uint64_be/le`, `to_int_be/le`, `to_int64_be/le` and `to_double_be/le`. All of them told callers to use the `u32be`/`u32le`/`u64be`/`u64le` bit patterns instead, and the last four were already thin wrappers around exactly those patterns. No call sites remain in the repository -- the tests in `bytes/view_test.mbt` that once exercised these functions were migrated to bit-pattern matching earlier and only their test names still mention the old spellings. `moon info` produces no `.mbti` diff: the helpers were `#doc(hidden)`, so they never appeared in the generated interface. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the builtin byte utilities by removing deprecated, #doc(hidden) byte-order conversion helpers from BytesView, relying instead on the existing u32be/u32le/u64be/u64le bit-pattern matches as the supported mechanism.
Changes:
- Removed 10 deprecated
BytesViewbyte-order conversion methods (to_uint*,to_int*,to_double*) frombuiltin/bytesview.mbt. - Eliminated the associated hidden documentation blocks for those methods, leaving the remaining
BytesViewAPI intact.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Collaborator
Coverage Report for CI Build 6162Coverage decreased (-0.006%) to 90.686%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions1 previously-covered line in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
4 tasks
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.
Removes the ten
#deprecated+#doc(hidden)byte-order helpers onBytesView:to_uint_be/to_uint_leto_uint64_be/to_uint64_leto_int_be/to_int_leto_int64_be/to_int64_leto_double_be/to_double_leEvery one of them already carried a deprecation pointing at the
u32be/u32le/u64be/u64lebit patterns, and the last six were literally thin wrappers around exactly those patterns.Why it's safe
bytes/view_test.mbtthat used to exercise these were migrated to bit-pattern matching earlier; only their test names still mention the old spellings..mbtidiff.moon info --target wasm,wasm-gc,js,nativeproduces no interface change — the helpers were#doc(hidden), so they never appeared in the generated interface.Verification
moon check --deny-warncleanmoon test --target allgreen on wasm / wasm-gc / js / nativemoon info && moon fmtproduce no further diff🤖 Generated with Claude Code