Skip to content

Commit 6e84a90

Browse files
committed
tweak
1 parent ea28fec commit 6e84a90

File tree

13 files changed

+108
-108
lines changed

13 files changed

+108
-108
lines changed

jscomp/common/js_config.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ let no_version_header = ref false
5353
let cross_module_inline = ref false
5454

5555
let get_cross_module_inline () = !cross_module_inline
56-
let set_cross_module_inline b =
57-
cross_module_inline := b
56+
(* let set_cross_module_inline b =
57+
cross_module_inline := b *)
5858

5959

6060
let diagnose = ref false
@@ -65,8 +65,8 @@ let get_diagnose () = !diagnose
6565

6666
(* let get_packages_info () = !packages_info *)
6767

68-
let no_builtin_ppx_ml = ref false
69-
let no_builtin_ppx_mli = ref false
68+
let no_builtin_ppx = ref false
69+
7070

7171

7272
let debug_file = ref ""

jscomp/common/js_config.mli

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ val get_package_name : unit -> string option *)
4848

4949
(** cross module inline option *)
5050
val cross_module_inline : bool ref
51-
val set_cross_module_inline : bool -> unit
51+
(* val set_cross_module_inline : bool -> unit *)
5252
val get_cross_module_inline : unit -> bool
5353

5454
(** diagnose option *)
@@ -58,8 +58,8 @@ val get_diagnose : unit -> bool
5858

5959

6060
(** options for builtin ppx *)
61-
val no_builtin_ppx_ml : bool ref
62-
val no_builtin_ppx_mli : bool ref
61+
val no_builtin_ppx : bool ref
62+
6363

6464

6565

jscomp/core/ocaml_options.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ let mk_I f =
4444
"-I", Arg.String f, "<dir> Add <dir> to the list of include directories"
4545
;;
4646

47-
let mk_impl f =
47+
(* let mk_impl f =
4848
"-impl", Arg.String f, "<file> Compile <file> as a .ml file"
49-
;;
49+
;; *)
5050

51-
let mk_intf f =
51+
(* let mk_intf f =
5252
"-intf", Arg.String f, "<file> Compile <file> as a .mli file"
53-
;;
53+
;; *)
5454

5555
let mk_intf_suffix f =
5656
"-intf-suffix", Arg.String f,

jscomp/core/ocaml_options.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424

2525

2626

27-
val mk_impl : (string -> unit) -> string * Arg.spec * string
28-
val mk_intf : (string -> unit) -> string * Arg.spec * string
27+
(* val mk_impl : (string -> unit) -> string * Arg.spec * string *)
28+
(* val mk_intf : (string -> unit) -> string * Arg.spec * string *)
2929
(* val mk__ : (string -> unit) -> string * Arg.spec * string *)
3030
(**
3131
[ocaml_options] are command options inherited from ocaml

jscomp/main/js_main.ml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ let eval (s : string) ~suffix =
152152
let define_variable s =
153153
match Ext_string.split ~keep_empty:true s '=' with
154154
| [key; v] ->
155-
if not @@ Lexer.define_key_value key v then
155+
if not (Lexer.define_key_value key v) then
156156
raise (Arg.Bad ("illegal definition: " ^ s))
157157
| _ -> raise (Arg.Bad ("illegal definition: " ^ s))
158158

@@ -310,22 +310,17 @@ let buckle_script_flags : (string * Arg.spec * string) list =
310310
Js_packages_state.update_npm_package_path,
311311
" set npm-output-path: [opt_module]:path, for example: 'lib/cjs', 'amdjs:lib/amdjs', 'es6:lib/es6' ")
312312
::
313-
("-bs-no-warn-unimplemented-external",
314-
Arg.Unit (fun _ -> ()),
315-
" Deprecated: use warning 106"
316-
)
317-
::
318-
("-bs-no-builtin-ppx-ml",
319-
Arg.Set Js_config.no_builtin_ppx_ml,
320-
"disable built-in ppx for ml files (internal use)")
321-
::
322-
("-bs-no-builtin-ppx-mli",
323-
Arg.Set Js_config.no_builtin_ppx_mli,
324-
"disable built-in ppx for mli files (internal use)")
313+
("-bs-no-builtin-ppx",
314+
Arg.Set Js_config.no_builtin_ppx,
315+
"disable built-in ppx (internal use)")
325316
::
326317
("-bs-cross-module-opt",
327318
Arg.Set Js_config.cross_module_inline,
328319
"enable cross module inlining(experimental), default(false)")
320+
::
321+
("-bs-no-cross-module-opt",
322+
Arg.Clear Js_config.cross_module_inline,
323+
"enable cross module inlining(experimental), default(false)")
329324
::
330325
("-bs-diagnose",
331326
Arg.Set Js_config.diagnose,
@@ -344,10 +339,15 @@ let buckle_script_flags : (string * Arg.spec * string) list =
344339
Arg.Set Clflags.dump_location,
345340
" dont display location with -dtypedtree, -dparsetree"
346341
)
347-
:: Ocaml_options.mk_impl (* [-impl] *)
348-
(fun file -> Js_config.js_stdout := false; impl file )
349-
:: Ocaml_options.mk_intf (* [-intf] *)
350-
(fun file -> Js_config.js_stdout := false ; intf file)
342+
::
343+
("-impl", Arg.String
344+
(fun file -> Js_config.js_stdout := false; impl file ),
345+
"<file> Compile <file> as a .ml file"
346+
)
347+
::
348+
("-intf", Arg.String
349+
(fun file -> Js_config.js_stdout := false ; intf file),
350+
"<file> Compile <file> as a .mli file")
351351
(* :: Ocaml_options.mk__ anonymous *)
352352
:: Ocaml_options.ocaml_options
353353

jscomp/syntax/ppx_entry.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ let rewrite_signature (ast : Parsetree.signature) : Parsetree.signature =
3232
(* react-jsx ppx relies on built-in ones like `##` *)
3333
in
3434

35-
if !Js_config.no_builtin_ppx_mli then ast else
35+
if !Js_config.no_builtin_ppx then ast else
3636
Bs_builtin_ppx.rewrite_signature ast
3737

3838
let rewrite_implementation (ast : Parsetree.structure) : Parsetree.structure =
@@ -42,7 +42,7 @@ let rewrite_implementation (ast : Parsetree.structure) : Parsetree.structure =
4242
| 3 -> Reactjs_jsx_ppx_v3.rewrite_implementation ast
4343
| _ -> ast
4444
in
45-
if !Js_config.no_builtin_ppx_ml then ast else
45+
if !Js_config.no_builtin_ppx then ast else
4646
begin
4747
Bs_builtin_ppx.rewrite_implementation ast
4848
end

lib/4.06.1/bsdep.ml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5572,7 +5572,7 @@ val get_package_name : unit -> string option *)
55725572

55735573
(** cross module inline option *)
55745574
val cross_module_inline : bool ref
5575-
val set_cross_module_inline : bool -> unit
5575+
(* val set_cross_module_inline : bool -> unit *)
55765576
val get_cross_module_inline : unit -> bool
55775577

55785578
(** diagnose option *)
@@ -5582,8 +5582,8 @@ val get_diagnose : unit -> bool
55825582

55835583

55845584
(** options for builtin ppx *)
5585-
val no_builtin_ppx_ml : bool ref
5586-
val no_builtin_ppx_mli : bool ref
5585+
val no_builtin_ppx : bool ref
5586+
55875587

55885588

55895589

@@ -5693,8 +5693,8 @@ let no_version_header = ref false
56935693
let cross_module_inline = ref false
56945694

56955695
let get_cross_module_inline () = !cross_module_inline
5696-
let set_cross_module_inline b =
5697-
cross_module_inline := b
5696+
(* let set_cross_module_inline b =
5697+
cross_module_inline := b *)
56985698

56995699

57005700
let diagnose = ref false
@@ -5705,8 +5705,8 @@ let get_diagnose () = !diagnose
57055705

57065706
(* let get_packages_info () = !packages_info *)
57075707

5708-
let no_builtin_ppx_ml = ref false
5709-
let no_builtin_ppx_mli = ref false
5708+
let no_builtin_ppx = ref false
5709+
57105710

57115711

57125712
let debug_file = ref ""
@@ -53845,7 +53845,7 @@ let rewrite_signature (ast : Parsetree.signature) : Parsetree.signature =
5384553845
(* react-jsx ppx relies on built-in ones like `##` *)
5384653846
in
5384753847

53848-
if !Js_config.no_builtin_ppx_mli then ast else
53848+
if !Js_config.no_builtin_ppx then ast else
5384953849
Bs_builtin_ppx.rewrite_signature ast
5385053850

5385153851
let rewrite_implementation (ast : Parsetree.structure) : Parsetree.structure =
@@ -53855,7 +53855,7 @@ let rewrite_implementation (ast : Parsetree.structure) : Parsetree.structure =
5385553855
| 3 -> Reactjs_jsx_ppx_v3.rewrite_implementation ast
5385653856
| _ -> ast
5385753857
in
53858-
if !Js_config.no_builtin_ppx_ml then ast else
53858+
if !Js_config.no_builtin_ppx then ast else
5385953859
begin
5386053860
Bs_builtin_ppx.rewrite_implementation ast
5386153861
end

lib/4.06.1/unstable/all_ounit_tests.ml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7704,7 +7704,7 @@ val get_package_name : unit -> string option *)
77047704

77057705
(** cross module inline option *)
77067706
val cross_module_inline : bool ref
7707-
val set_cross_module_inline : bool -> unit
7707+
(* val set_cross_module_inline : bool -> unit *)
77087708
val get_cross_module_inline : unit -> bool
77097709

77107710
(** diagnose option *)
@@ -7714,8 +7714,8 @@ val get_diagnose : unit -> bool
77147714

77157715

77167716
(** options for builtin ppx *)
7717-
val no_builtin_ppx_ml : bool ref
7718-
val no_builtin_ppx_mli : bool ref
7717+
val no_builtin_ppx : bool ref
7718+
77197719

77207720

77217721

@@ -7825,8 +7825,8 @@ let no_version_header = ref false
78257825
let cross_module_inline = ref false
78267826

78277827
let get_cross_module_inline () = !cross_module_inline
7828-
let set_cross_module_inline b =
7829-
cross_module_inline := b
7828+
(* let set_cross_module_inline b =
7829+
cross_module_inline := b *)
78307830

78317831

78327832
let diagnose = ref false
@@ -7837,8 +7837,8 @@ let get_diagnose () = !diagnose
78377837

78387838
(* let get_packages_info () = !packages_info *)
78397839

7840-
let no_builtin_ppx_ml = ref false
7841-
let no_builtin_ppx_mli = ref false
7840+
let no_builtin_ppx = ref false
7841+
78427842

78437843

78447844
let debug_file = ref ""

lib/4.06.1/unstable/bspack.ml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11279,7 +11279,7 @@ val get_package_name : unit -> string option *)
1127911279

1128011280
(** cross module inline option *)
1128111281
val cross_module_inline : bool ref
11282-
val set_cross_module_inline : bool -> unit
11282+
(* val set_cross_module_inline : bool -> unit *)
1128311283
val get_cross_module_inline : unit -> bool
1128411284

1128511285
(** diagnose option *)
@@ -11289,8 +11289,8 @@ val get_diagnose : unit -> bool
1128911289

1129011290

1129111291
(** options for builtin ppx *)
11292-
val no_builtin_ppx_ml : bool ref
11293-
val no_builtin_ppx_mli : bool ref
11292+
val no_builtin_ppx : bool ref
11293+
1129411294

1129511295

1129611296

@@ -11400,8 +11400,8 @@ let no_version_header = ref false
1140011400
let cross_module_inline = ref false
1140111401

1140211402
let get_cross_module_inline () = !cross_module_inline
11403-
let set_cross_module_inline b =
11404-
cross_module_inline := b
11403+
(* let set_cross_module_inline b =
11404+
cross_module_inline := b *)
1140511405

1140611406

1140711407
let diagnose = ref false
@@ -11412,8 +11412,8 @@ let get_diagnose () = !diagnose
1141211412

1141311413
(* let get_packages_info () = !packages_info *)
1141411414

11415-
let no_builtin_ppx_ml = ref false
11416-
let no_builtin_ppx_mli = ref false
11415+
let no_builtin_ppx = ref false
11416+
1141711417

1141811418

1141911419
let debug_file = ref ""

lib/4.06.1/unstable/js_compiler.ml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -296095,7 +296095,7 @@ val get_package_name : unit -> string option *)
296095296095

296096296096
(** cross module inline option *)
296097296097
val cross_module_inline : bool ref
296098-
val set_cross_module_inline : bool -> unit
296098+
(* val set_cross_module_inline : bool -> unit *)
296099296099
val get_cross_module_inline : unit -> bool
296100296100

296101296101
(** diagnose option *)
@@ -296105,8 +296105,8 @@ val get_diagnose : unit -> bool
296105296105

296106296106

296107296107
(** options for builtin ppx *)
296108-
val no_builtin_ppx_ml : bool ref
296109-
val no_builtin_ppx_mli : bool ref
296108+
val no_builtin_ppx : bool ref
296109+
296110296110

296111296111

296112296112

@@ -296216,8 +296216,8 @@ let no_version_header = ref false
296216296216
let cross_module_inline = ref false
296217296217

296218296218
let get_cross_module_inline () = !cross_module_inline
296219-
let set_cross_module_inline b =
296220-
cross_module_inline := b
296219+
(* let set_cross_module_inline b =
296220+
cross_module_inline := b *)
296221296221

296222296222

296223296223
let diagnose = ref false
@@ -296228,8 +296228,8 @@ let get_diagnose () = !diagnose
296228296228

296229296229
(* let get_packages_info () = !packages_info *)
296230296230

296231-
let no_builtin_ppx_ml = ref false
296232-
let no_builtin_ppx_mli = ref false
296231+
let no_builtin_ppx = ref false
296232+
296233296233

296234296234

296235296235
let debug_file = ref ""

0 commit comments

Comments
 (0)