-
Notifications
You must be signed in to change notification settings - Fork 469
Drop Caml runtimes and primitives #6984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
b1e6dce
remove Caml io/formatting/converting stuffs
cometkim 3239d8c
remove Lexing/Parsing/Parser completely
cometkim cc79430
remove Caml_sys completely
cometkim be09d3a
remove hash/digest/Hashtbl
cometkim f3d626e
format jscomp/test again
cometkim f574f7d
restore Hashtbl.hash
cometkim 59746f5
update lib artifacts
cometkim 75e30c4
remove stale tests
cometkim be60efc
remove Caml compile time constants
cometkim 42a8ec7
remove (almost) Caml String/Bytes/Char/Stream
cometkim f8ba2ad
remove floatarray
cometkim be1b9d9
remove Caml int32/int64/nativeint
cometkim 778e0b4
remove uint32 liternal which has never exposed
cometkim f70cf16
migrate caml_{type}_compare/min/max primitives
cometkim 770e085
Drop OCaml `Array` module
cometkim 2856654
drop other OCaml DS modules
cometkim 12cfb6d
fix hashtbl size hint
cometkim 587b790
rename promise primitive
cometkim 4b8b0e0
remove unused code
cometkim ea7db4f
update artifacts
cometkim dfbe7a8
remove unused module
cometkim d995fb5
Drop `%lazy_force` primitive
cometkim 10956a1
remove unused code
cometkim 53aadd5
remove/replace all remain `caml_*` primitives
cometkim b1368b0
Remove unwanted float primitives
cometkim 8d03ff5
remote unused/unnecessary exn primitives
cometkim f2a4b5b
migrate dict primitive
cometkim 071e475
rename #import to %import
cometkim efc71be
migrate obj and option primitives
cometkim 1c1697f
migrate hash primitives
cometkim 6afedf9
remove unused code path
cometkim c395c12
remove unused internal primitives
cometkim 65dc00a
migrate already ones from internal primitives
cometkim c409df8
specialize every primitives in a path
cometkim b2c3190
drop/rename more interfaces
cometkim 374df82
merge exn primitive modules
cometkim a3a8f45
move curry primitive module
cometkim 0f4d56e
move util primitives
cometkim 67e2df4
update artifacts
cometkim acec61c
fix gentype test
cometkim 59ba709
add empty modules for core OCamlCompat
cometkim 0c1b57e
rename ref primitives
cometkim d0c8a47
bring back a few primitives for Core compatibility
cometkim b9b9757
bring back error reporting on unknown #prim
cometkim 2d6438f
add more compat
cometkim d013585
Js_runtime_modules -> Primitive_modules
cometkim acaae4f
Remove unused code path
cometkim 8362f1b
Remove unused code path (floatarray) in frontend
cometkim d8d7419
remove unused builtin types
cometkim 1a5c2fb
fix binding
cometkim 59911ad
refactor primitive externs
cometkim eb640dd
bring back Array module accessing pattern
cometkim fa90cee
more compat, deprecation, and migrate stdlib-406 dir completely
cometkim 7642ebf
cleanup ninja dependencies
cometkim 65813ad
add deprecation on pervasives
cometkim 7c591f6
tmp: try fix
cometkim 075493d
clean a bit
cometkim 0142f10
added %modfloat primitive, added Pervasives.mod_float compat
cometkim 3e2f715
added Pervasive string conversion compat
cometkim 1fe36e0
do not mention Js module
cometkim dc06a5b
add clean-rewatch recipe
cometkim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
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
6 changes: 3 additions & 3 deletions
6
jscomp/build_tests/super_errors/expected/modules2.res.expected
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
|
||
[1;31mWe've found a bug for you![0m | ||
[36m/.../fixtures/modules2.res[0m:[2m1:9-14[0m | ||
[36m/.../fixtures/modules2.res[0m:[2m1:9-19[0m | ||
|
||
[1;31m1[0m [2m│[0m let b = [1;31mList.b[0m | ||
[1;31m1[0m [2m│[0m let b = [1;31mBelt.List.b[0m | ||
2 [2m│[0m | ||
|
||
The value b can't be found in List | ||
The value b can't be found in Belt.List |
17 changes: 10 additions & 7 deletions
17
jscomp/build_tests/super_errors/expected/primitives7.res.expected
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
|
||
[1;31mWe've found a bug for you![0m | ||
[36m/.../fixtures/primitives7.res[0m:[2m3:24[0m | ||
[36m/.../fixtures/primitives7.res[0m:[2m3:23[0m | ||
|
||
1 [2m│[0m /* Wanted list(float), found list(int) */ | ||
2 [2m│[0m let a = list{1, 2, 3} | ||
[1;31m3[0m [2m│[0m List.map(n => n +. 2., [1;31ma[0m) | ||
[1;31m3[0m [2m│[0m a->Belt.List.map(n => [1;31mn[0m +. 2.) | ||
4 [2m│[0m | ||
|
||
This has type: [1;31mlist<int>[0m | ||
But this function argument is expecting: [1;33mlist<float>[0m | ||
|
||
The incompatible parts: | ||
[1;31mint[0m vs [1;33mfloat[0m | ||
This has type: [1;31mint[0m | ||
But it's being used with the [1;33m+.[0m operator, which works on: [1;33mfloat[0m | ||
|
||
Floats and ints have their own mathematical operators. This means you cannot add a float and an int without converting between the two. | ||
|
||
Possible solutions: | ||
- Ensure all values in this calculation has the type [1;33mfloat[0m. You can convert between floats and ints via [1;33mBelt.Float.toInt[0m and [1;33mBelt.Int.fromFloat[0m. | ||
- Change the operator to [1;33m+[0m, which works on [1;33mint[0m | ||
|
||
You can convert [1;33mint[0m to [1;33mfloat[0m with [1;33mBelt.Int.toFloat[0m. | ||
If this is a literal, try a number with a trailing dot (e.g. [1;33m20.[0m). |
34 changes: 0 additions & 34 deletions
34
jscomp/build_tests/super_errors/expected/warnings3.res.expected
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
let b = List.b | ||
let b = Belt.List.b |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
/* Wanted list(float), found list(int) */ | ||
let a = list{1, 2, 3} | ||
List.map(n => n +. 2., a) | ||
a->Belt.List.map(n => n +. 2.) |
This file was deleted.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to keep this.
make clean
should clean everything including the rewatch build.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then what's different with
make clean-all
?It's inconvenient to rebuild
rewatch
every time I runmake clean test
. we can addmake clean-rewatch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this is a good question. 😄 This Makefile has grown organically.
I guess it's also fine to have
clean-rewatch
and put that intoclean-all
, too.