Remove runtime APIs deprecated for ReScript 13 - #8564
Conversation
Signed-off-by: Christoph Knittel <ck@cca.io>
Signed-off-by: Christoph Knittel <ck@cca.io>
Signed-off-by: Christoph Knittel <ck@cca.io>
Signed-off-by: Christoph Knittel <ck@cca.io>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8564 +/- ##
==========================================
- Coverage 75.79% 75.76% -0.03%
==========================================
Files 476 476
Lines 62680 62680
==========================================
- Hits 47506 47489 -17
- Misses 15174 15191 +17 🚀 New features to boost your workflow:
|
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
tsnobip
left a comment
There was a problem hiding this comment.
I only have one comment, except from that it looks good to me!
| return size | ||
| })(obj$1, v => push_back(queue, v)); | ||
| s = hash_mix_int(s, (size$1 << 10) | 0); | ||
| s = hash_mix_int(s, (size$1 << 10)); |
There was a problem hiding this comment.
why are we losing the | 0 part here?
There was a problem hiding this comment.
The source previously used lor(lsl(size, 10), 0). Since x | 0 is a no-op here and JavaScript's << already coerces its operands and returns a signed 32-bit integer, size << 10 has the same behavior. So losing the trailing | 0 is intentional.
| return size | ||
| }`)(obj, v => push_back(queue, v)) | ||
| s.contents = hash_mix_int(s.contents, lor(lsl(size, 10), 0)) /* tag */ | ||
| s.contents = hash_mix_int(s.contents, Int.shiftLeft(size, 10)) /* tag */ |
There was a problem hiding this comment.
why did we did not replace lor here?
| s.contents = hash_mix_int(s.contents, Int.shiftLeft(size, 10)) /* tag */ | |
| s.contents = hash_mix_int(s.contents, Int.bitwiseOr(Int.shiftLeft(size, 10), 0)) /* tag */ |
There was a problem hiding this comment.
We could preserve the mechanical translation with Int.bitwiseOr(Int.shiftLeft(size, 10), 0), but the bitwiseOr(..., 0) is redundant: Int.shiftLeft already has the required int32 semantics. I simplified it to Int.shiftLeft(size, 10) rather than retaining the no-op.
Summary
CharmoduleObjoperationsPervasiveshelpersArray.unsafe_getObj.magicandArray.getUnsaferemain available.Motivation
These APIs were scheduled for removal in ReScript 13. Removing them now completes that deprecation cycle and updates internal callers to the supported standard-library equivalents.
Validation
make testmake libyarn workspace @tests/belt rescript buildgit diff --check