Skip to content

Commit 6d78c58

Browse files
authoredSep 27, 2024
Drop Caml runtimes and primitives (rescript-lang#6984)
* remove Caml io/formatting/converting stuffs * remove Lexing/Parsing/Parser completely * remove Caml_sys completely * remove hash/digest/Hashtbl * format jscomp/test again * restore Hashtbl.hash * update lib artifacts * remove stale tests * remove Caml compile time constants * remove (almost) Caml String/Bytes/Char/Stream * remove floatarray * remove Caml int32/int64/nativeint * remove uint32 liternal which has never exposed * migrate caml_{type}_compare/min/max primitives * Drop OCaml `Array` module * drop other OCaml DS modules * fix hashtbl size hint * rename promise primitive * remove unused code * update artifacts * remove unused module * Drop `%lazy_force` primitive * remove unused code * remove/replace all remain `caml_*` primitives * Remove unwanted float primitives * remote unused/unnecessary exn primitives * migrate dict primitive * rename #import to %import * migrate obj and option primitives * migrate hash primitives * remove unused code path * remove unused internal primitives * migrate already ones from internal primitives * specialize every primitives in a path * drop/rename more interfaces * merge exn primitive modules * move curry primitive module * move util primitives * update artifacts * fix gentype test * add empty modules for core OCamlCompat * rename ref primitives * bring back a few primitives for Core compatibility * bring back error reporting on unknown #prim * add more compat * Js_runtime_modules -> Primitive_modules * Remove unused code path * Remove unused code path (floatarray) in frontend * remove unused builtin types * fix binding * refactor primitive externs * bring back Array module accessing pattern * more compat, deprecation, and migrate stdlib-406 dir completely * cleanup ninja dependencies Now the only `runtime` dir is the built-in primitive literally Removed dependency hacks from `ninja.js` and make the dependency graph clearly `others` -> `runtime` Removed `Belt_internals` module, use compiler primitive instead Removed `runtime/js`, so made `others/js` only source of JS bindings Primitives shouldn't rely on JS any binding * add deprecation on pervasives * tmp: try fix * clean a bit * added %modfloat primitive, added Pervasives.mod_float compat * added Pervasive string conversion compat * do not mention Js module * add clean-rewatch recipe
1 parent 9c4af76 commit 6d78c58

File tree

1,082 files changed

+10742
-107105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,082 files changed

+10742
-107105
lines changed
 

‎Makefile

+5-3
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,18 @@ checkformat:
8282
clean-gentype:
8383
make -C jscomp/gentype_tests/typescript-react-example clean
8484

85+
clean-rewatch:
86+
cargo clean --manifest-path rewatch/Cargo.toml && rm -f rewatch/rewatch
87+
8588
clean:
8689
dune clean
87-
cargo clean --manifest-path rewatch/Cargo.toml && rm -f rewatch/rewatch
8890
./scripts/ninja.js clean && rm -f ninja/ninja
8991

90-
clean-all: clean clean-gentype
92+
clean-all: clean clean-gentype clean-rewatch
9193

9294
dev-container:
9395
docker build -t rescript-dev-container docker
9496

9597
.DEFAULT_GOAL := build
9698

97-
.PHONY: build watch rewatch ninja bench dce test test-syntax test-syntax-roundtrip test-gentype test-all lib playground playground-cmijs playground-release artifacts format checkformat clean-gentype clean clean-all dev-container
99+
.PHONY: build watch rewatch ninja bench dce test test-syntax test-syntax-roundtrip test-gentype test-all lib playground playground-cmijs playground-release artifacts format checkformat clean-gentype clean-rewatch clean clean-all dev-container
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
We've found a bug for you!
3-
/.../fixtures/modules2.res:1:9-14
3+
/.../fixtures/modules2.res:1:9-19
44

5-
1 │ let b = List.b
5+
1 │ let b = Belt.List.b
66
2 │
77

8-
The value b can't be found in List
8+
The value b can't be found in Belt.List

0 commit comments

Comments
 (0)
Please sign in to comment.