Skip to content

Commit f25a373

Browse files
authored
Remove refmt.exe / Reason syntax support (#5683)
* Remove bsrefmt * Remove refmt.exe * Remove "refmt": 3 * Remove ast_reason_pp module and re/rei file extensions * Remove leftover js_refmt_compiler * Remove refmt_main3.ml * Fix moveArtifacts script * Clean up literals.ml * Update CHANGELOG
1 parent 8b57da6 commit f25a373

File tree

72 files changed

+256
-117094
lines changed

Some content is hidden

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

72 files changed

+256
-117094
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
jscomp/js_cmj_datasets.ml binary
22
jscomp/bin/reactjs_ppx_v2.ml binary
3-
jscomp/bin/refmt_main3.ml binary
43
docs/Manual.html binary
54
docs/Manual.pdf binary

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ jscomp/bin/*.exe
7373
# so that `npm install && npm intall -g .`
7474
# the second install would use the cached ninja.exe (instead of being ignored)
7575
#
76-
!bin/bsrefmt
77-
78-
7976
#ninja
8077
.ninja_log
8178
.ninja_deps

.vscode/tasks.json

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,6 @@
7474
"fileLocation": "autoDetect",
7575
"owner": "globalUnused"
7676
}
77-
},
78-
{
79-
"label": "check unused refmt",
80-
"command": "node",
81-
"options": {
82-
"cwd": "${workspaceRoot}/lib"
83-
},
84-
"args": ["../scripts/checkUnused.js", "refmt_main3"],
85-
"problemMatcher": {
86-
"base": "$ocamlc",
87-
"fileLocation": "autoDetect",
88-
"owner": "globalUnused"
89-
}
9077
}
9178
]
9279
}

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@
1010
> - :house: [Internal]
1111
> - :nail_care: [Polish]
1212
13-
# 10.1.0-rc.1
13+
# 11.0.0-alpha.1
14+
15+
#### :boom: Breaking Change
16+
17+
- Remove support for the legacy Reason syntax. Existing Reason code can be converted to ReScript syntax using ReScript 9 as follows:
18+
- `npm i -g rescript@9`
19+
- `rescript convert <reason files>`
20+
- Remove obsolete built-in project templates and the "rescript init" functionality. This will be replaced by the create-rescript-app project that is maintained separately.
1421

1522
# 10.1.0-alpha.2
1623

bsrefmt

Lines changed: 0 additions & 16 deletions
This file was deleted.

darwin/refmt.exe

-8.49 MB
Binary file not shown.

darwinarm64/refmt.exe

-8.49 MB
Binary file not shown.

docs/docson/build-schema.json

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -354,19 +354,6 @@
354354
"additionalProperties": false,
355355
"required": ["version"]
356356
},
357-
"refmt-specs": {
358-
"oneOf": [
359-
{
360-
"type": "number",
361-
"enum": [2, 3],
362-
"description": "Reason syntax version to use. Prefer 3. Default: 2, for backward-compatiblity"
363-
},
364-
{
365-
"type": "string",
366-
"description": "(Usually not needed) Alternative path to `refmt`, the Reason syntax binary. Default: path to the `refmt.exe` ReScript provides out of the box"
367-
}
368-
]
369-
},
370357
"bsc-flags": {
371358
"oneOf": [
372359
{

jscomp/bsb/bsb_db_util.ml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,10 @@ let add_basename ~(dir : string) (map : t) ?error_on_invalid_suffix basename : t
8181
(match () with
8282
| _ when file_suffix = Literals.suffix_ml -> ()
8383
| _ when file_suffix = Literals.suffix_res -> syntax_kind := Res
84-
| _ when file_suffix = Literals.suffix_re -> syntax_kind := Reason
8584
| _ when file_suffix = Literals.suffix_mli -> info := Intf
8685
| _ when file_suffix = Literals.suffix_resi ->
8786
info := Intf;
8887
syntax_kind := Res
89-
| _ when file_suffix = Literals.suffix_rei ->
90-
info := Intf;
91-
syntax_kind := Reason
9288
| _ -> invalid_suffix := true);
9389
let info = !info in
9490
let syntax_kind = !syntax_kind in

jscomp/bsb/bsb_ninja_file_groups.ml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ let handle_generators oc (group : Bsb_file_groups.file_group) custom_rules =
4040

4141
type suffixes = { impl : string; intf : string }
4242

43-
let re_suffixes = { impl = Literals.suffix_re; intf = Literals.suffix_rei }
44-
4543
let ml_suffixes = { impl = Literals.suffix_ml; intf = Literals.suffix_mli }
4644

4745
let res_suffixes = { impl = Literals.suffix_res; intf = Literals.suffix_resi }
@@ -52,7 +50,6 @@ let emit_module_build (rules : Bsb_ninja_rule.builtin)
5250
let has_intf_file = module_info.info = Impl_intf in
5351
let config, ast_rule =
5452
match module_info.syntax_kind with
55-
| Reason -> (re_suffixes, rules.build_ast_from_re)
5653
| Ml -> (ml_suffixes, rules.build_ast)
5754
| Res -> (res_suffixes, rules.build_ast_from_re)
5855
(* FIXME: better names *)

0 commit comments

Comments
 (0)