Skip to content

Commit 0a3df48

Browse files
committed
Update bsb and run tests
1 parent 561f809 commit 0a3df48

File tree

7 files changed

+11
-73
lines changed

7 files changed

+11
-73
lines changed

compiler/bsb/bsb_build_schemas.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ let react_jsx = "react-jsx"
5151
let jsx = "jsx"
5252
let jsx_version = "version"
5353
let jsx_module = "module"
54-
let jsx_mode = "mode"
5554
let cut_generators = "cut-generators"
5655
let generators = "generators"
5756
let command = "command"

compiler/bsb/bsb_jsx.ml

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
type version = Jsx_v4
22
type module_ = React | Generic of {moduleName: string}
3-
type mode = Classic | Automatic
43
type dependencies = string list
54

6-
type t = {version: version option; module_: module_ option; mode: mode option}
5+
type t = {version: version option; module_: module_ option}
76

87
let encode_no_nl jsx =
98
(match jsx.version with
109
| None -> ""
1110
| Some Jsx_v4 -> "4")
12-
^ (match jsx.module_ with
13-
| None -> ""
14-
| Some React -> "React"
15-
| Some (Generic {moduleName}) -> moduleName)
1611
^
17-
match jsx.mode with
12+
match jsx.module_ with
1813
| None -> ""
19-
| Some Classic -> "Classic"
20-
| Some Automatic -> "Automatic"
14+
| Some React -> "React"
15+
| Some (Generic {moduleName}) -> moduleName
2116

2217
let ( .?() ) = Map_string.find_opt
2318
let ( |? ) m (key, cb) = m |> Ext_json.test key cb
@@ -33,7 +28,6 @@ let get_list_string s = get_list_string_acc s []
3328
let from_map map =
3429
let version : version option ref = ref None in
3530
let module_ : module_ option ref = ref None in
36-
let mode : mode option ref = ref None in
3731
map
3832
|? ( Bsb_build_schemas.jsx,
3933
`Obj
@@ -59,18 +53,5 @@ let from_map map =
5953
Bsb_exception.config_error x
6054
"Unexpected input (jsx module name) for jsx module"
6155
| None -> ()) )
62-
|? ( Bsb_build_schemas.jsx,
63-
`Obj
64-
(fun m ->
65-
match m.?(Bsb_build_schemas.jsx_mode) with
66-
| Some (Str {loc; str}) -> (
67-
match str with
68-
| "classic" -> mode := Some Classic
69-
| "automatic" -> mode := Some Automatic
70-
| _ -> Bsb_exception.errorf ~loc "Unsupported jsx mode %s" str)
71-
| Some x ->
72-
Bsb_exception.config_error x
73-
"Unexpected input (expect classic or automatic) for jsx mode"
74-
| None -> ()) )
7556
|> ignore;
76-
{version = !version; module_ = !module_; mode = !mode}
57+
{version = !version; module_ = !module_}

compiler/bsb/bsb_ninja_rule.ml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,6 @@ let make_custom_rules ~(gentype_config : Bsb_config_types.gentype_config)
167167
| Some React -> Ext_buffer.add_string buf " -bs-jsx-module react"
168168
| Some (Generic {moduleName}) ->
169169
Ext_buffer.add_string buf (" -bs-jsx-module " ^ moduleName));
170-
(match jsx.mode with
171-
| None -> ()
172-
| Some Classic -> Ext_buffer.add_string buf " -bs-jsx-mode classic"
173-
| Some Automatic -> Ext_buffer.add_string buf " -bs-jsx-mode automatic");
174170

175171
Ext_buffer.add_char_string buf ' ' bsc_flags;
176172
Ext_buffer.add_string buf " -absname -bs-ast -o $out $i";

lib/es6/JsxPPXReactSupport.js

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

lib/js/JsxPPXReactSupport.js

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

tests/build_tests/jsx_settings_inheritance/node_modules/a/src/A.mjs

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/build_tests/super_errors/input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const fixtures = fs
1212
.filter(fileName => path.extname(fileName) === ".res");
1313

1414
// const runtime = path.join(__dirname, '..', '..', 'runtime')
15-
const prefix = `${bsc} -w +A -bs-jsx 4 -bs-jsx-mode automatic`;
15+
const prefix = `${bsc} -w +A -bs-jsx 4`;
1616

1717
const updateTests = process.argv[2] === "update";
1818

0 commit comments

Comments
 (0)