Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8531 +/- ##
==========================================
- Coverage 74.70% 74.59% -0.11%
==========================================
Files 458 458
Lines 62366 62302 -64
==========================================
- Hits 46593 46477 -116
- Misses 15773 15825 +52
🚀 New features to boost your workflow:
|
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
|
Developer playground preview: https://rescript-lang.github.io/rescript/dev-playground/?version=pr-8531 |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b86c7c52fe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a5dbf08614
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! 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". |
| @@ -1 +1 @@ | |||
|
|
|||
There was a problem hiding this comment.
Weird document. Is this even still relevant?
There was a problem hiding this comment.
Maybe not, but I'd do a separate cleanup for that.
| /*** The ReScript standard library. | ||
|
|
||
| Belt is currently mostly covering collection types. It has no string or date functions yet, although Belt.String is in the works. In the meantime, use [Js.String](js/string) for string functions and [Js.Date](js/date) for date functions. | ||
| Belt mostly covers collection types. Use the top-level `String` and `Date` modules for string and date functions. |
There was a problem hiding this comment.
Maybe it should also be mentioned that Belt functions needs some more runtime space, but are often faster?
There was a problem hiding this comment.
Maybe, but also not really in the scope of this PR.
Summary
Remove the deprecated
Jsnamespace and its associated runtime modules in preparation for ReScript 13.Js.Array2,Js.String2,Js.Dict, andJs.PromiseJs_OOtoPrimitive_js_externJs.BlobandJs.Filestubs toBlobandFileas temporary compatibility typesJs-to-stdlib migration rulesBreaking change
Code using the deprecated
Jsnamespace must migrate to the corresponding standard-library APIs, for example:Js.Array2→ArrayJs.String2→StringJs.Dict→DictJs.Promise/Js.Promise2→PromiseJs.Json→JSONJs.Nullable→NullableJs.File→FileJs.Blob→BlobThe
Js.undefined<'a>type can be replaced withundefined<'a>. TheJs.Undefinedmodule has no direct replacement. Depending on the operation and intended semantics, code may need to useNullable,option, or its own JavaScript interop binding.The
FileandBlobtypes remain opaque compatibility stubs. They do not introduce new Web API bindings and are expected to move out of the standard library in favor of the separate WebAPI package.Syntax tests and benchmarks
We also replaced
Js.*references in the syntax-test and benchmark fixtures. This was not required for the tests and benchmarks to work because these fixtures test parsing and formatting, not type-checking.We updated them so that:
Js.*references gives meaningful resultsThe changes preserve the syntax each fixture is intended to exercise. The corresponding expected output was updated where necessary.
The syntax-test script now checks that
Js.*references are not reintroduced into syntax-test or benchmark fixtures.CI note
The Sury PPX fixture is temporarily disabled on Intel macOS because the current
sury-ppxpackage only ships an ARM64 macOS binary. The fixture remains enabled on other supported platforms and can be re-enabled on Intel macOS once Sury restores an x64 binary.