Skip to content

Commit c7f97bd

Browse files
committed
fix rescript-lang#4542, keep the compatibility with rls
1 parent ad26783 commit c7f97bd

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

jscomp/ext/bsc_args.ml

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
| Unit_clear of bool ref
4242

4343
type spec =
44+
| Unit_dummy
4445
| Unit of unit_action
4546
| String of string_action
4647

@@ -128,6 +129,7 @@ let parse_exn ~usage ~argv ?(start=1) ?(finish=Array.length argv) (speclist : t
128129
match Ext_spec.assoc3 speclist s with
129130
| Some action -> begin
130131
begin match action with
132+
| Unit_dummy -> ()
131133
| Unit r ->
132134
begin match r with
133135
| Unit_set r -> r := true

jscomp/ext/bsc_args.mli

+6-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ type unit_action =
3434
| Unit_lazy of unit lazy_t
3535
| Unit_set of bool ref
3636
| Unit_clear of bool ref
37-
type spec = Unit of unit_action | String of string_action
37+
38+
39+
type spec =
40+
| Unit_dummy
41+
| Unit of unit_action
42+
| String of string_action
3843

3944

4045
type t = (string * spec * string) array

jscomp/main/js_main.ml

+2
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,8 @@ let buckle_script_flags : (string * Bsc_args.spec * string) array =
502502
"-warn-help", unit_call Warnings.help_warnings,
503503
"Show description of warning numbers";
504504

505+
"-c", Unit_dummy,
506+
"*internal* keep the compatibility with RLS"
505507
|]
506508

507509

0 commit comments

Comments
 (0)