Skip to content

Commit 63c9917

Browse files
committed
replace -bs-quiet with -w a
1 parent c048617 commit 63c9917

File tree

8 files changed

+51
-49
lines changed

8 files changed

+51
-49
lines changed

jscomp/bsb/bsb_ninja_gen.ml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,10 @@ let dash_i = "-I"
3636

3737

3838
let get_bsc_flags
39-
~(toplevel : bool)
4039
(bsc_flags : string list)
4140
: string =
42-
String.concat Ext_string.single_space
43-
(if toplevel then bsc_flags else "-bs-quiet" :: bsc_flags )
41+
String.concat Ext_string.single_space bsc_flags
42+
4443

4544

4645
let emit_bsc_lib_includes
@@ -160,7 +159,7 @@ let output_ninja_and_namespace_map
160159
(* The path to [bsb_heler.exe] *)
161160
Bsb_ninja_global_vars.bsdep, (Ext_filename.maybe_quote Bsb_global_paths.vendor_bsdep) ;
162161
Bsb_ninja_global_vars.warnings, Bsb_warning.to_bsb_string ~toplevel warning ;
163-
Bsb_ninja_global_vars.bsc_flags, (get_bsc_flags ~toplevel bsc_flags) ;
162+
Bsb_ninja_global_vars.bsc_flags, (get_bsc_flags bsc_flags) ;
164163
Bsb_ninja_global_vars.ppx_flags, ppx_flags;
165164

166165
Bsb_ninja_global_vars.g_dpkg_incls,

jscomp/bsb/bsb_warning.ml

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -86,23 +86,26 @@ let from_map (m : Ext_json_types.t Map_string.t) =
8686
in
8787
Some {number; error }
8888

89-
let to_bsb_string ~toplevel warning =
90-
match warning with
91-
| None -> Ext_string.empty
92-
| Some warning ->
93-
(match warning.number with
94-
| None ->
95-
Ext_string.empty
96-
| Some x ->
97-
prepare_warning_concat ~beg:true x
98-
) ^
99-
if toplevel then
100-
match warning.error with
101-
| Warn_error_true ->
102-
" -warn-error A"
103-
| Warn_error_number y ->
104-
" -warn-error " ^ y
105-
| Warn_error_false ->
106-
Ext_string.empty
107-
else Ext_string.empty
10889

90+
let to_bsb_string ~toplevel warning =
91+
if toplevel then
92+
match warning with
93+
| None -> Ext_string.empty
94+
| Some warning ->
95+
(match warning.number with
96+
| None ->
97+
Ext_string.empty
98+
| Some x ->
99+
prepare_warning_concat ~beg:true x
100+
) ^
101+
(
102+
match warning.error with
103+
| Warn_error_true ->
104+
" -warn-error A"
105+
| Warn_error_number y ->
106+
" -warn-error " ^ y
107+
| Warn_error_false ->
108+
Ext_string.empty
109+
)
110+
else " -w a"
111+
(* TODO: this is the current default behavior *)

jscomp/core/bs_conditional_initial.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ let setup_env () =
5151
Matching_polyfill.names_from_construct_pattern;
5252
#if undefined BS_RELEASE_BUILD then
5353
Printexc.record_backtrace true;
54-
(match Ext_sys.getenv_opt "BS_DEBUG_FILE" with
54+
(match Sys.getenv_opt "BS_DEBUG_FILE" with
5555
| None -> ()
5656
| Some s ->
5757
Js_config.set_debug_file s
5858
);
59-
(if Ext_sys.getenv_opt "BS_DEBUG_CHROME" <> None then
59+
(if Sys.getenv_opt "BS_DEBUG_CHROME" <> None then
6060
Js_config.debug := true);
6161
#end
6262
Lexer.replace_directive_bool "BS" true;

jscomp/core/lam_arity.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ let print_arities_tbl
6363
(fmt : Format.formatter)
6464
(arities_tbl : (Ident.t, t ref) Hashtbl.t) =
6565
Hashtbl.fold (fun (i:Ident.t) (v : t ref) _ ->
66-
pp Format.err_formatter "@[%s -> %a@]@."i.name print !v ) arities_tbl ()
66+
pp fmt "@[%s -> %a@]@."i.name print !v ) arities_tbl ()
6767

6868

6969

jscomp/core/lam_compat.ml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ type bigarray_kind = Lambda.bigarray_kind =
116116
| Pbigarray_complex32 | Pbigarray_complex64
117117

118118

119-
let eq_bigarray_kind (p : bigarray_kind) (p1 : bigarray_kind) =
119+
(* let eq_bigarray_kind (p : bigarray_kind) (p1 : bigarray_kind) =
120120
match p with
121121
| Pbigarray_unknown -> p1 = Pbigarray_unknown
122122
| Pbigarray_float32 -> p1 = Pbigarray_float32
@@ -130,7 +130,7 @@ let eq_bigarray_kind (p : bigarray_kind) (p1 : bigarray_kind) =
130130
| Pbigarray_caml_int -> p1 = Pbigarray_caml_int
131131
| Pbigarray_native_int -> p1 = Pbigarray_native_int
132132
| Pbigarray_complex32 -> p1 = Pbigarray_complex32
133-
| Pbigarray_complex64 -> p1 = Pbigarray_complex64
133+
| Pbigarray_complex64 -> p1 = Pbigarray_complex64 *)
134134

135135

136136
type bigarray_layout = Lambda.bigarray_layout =
@@ -141,11 +141,11 @@ type bigarray_layout = Lambda.bigarray_layout =
141141

142142

143143

144-
let eq_bigarray_layout (p : bigarray_layout) (p1 : bigarray_layout) =
144+
(* let eq_bigarray_layout (p : bigarray_layout) (p1 : bigarray_layout) =
145145
match p with
146146
| Pbigarray_unknown_layout -> p1 = Pbigarray_unknown_layout
147147
| Pbigarray_c_layout -> p1 = Pbigarray_c_layout
148-
| Pbigarray_fortran_layout -> p1 = Pbigarray_fortran_layout
148+
| Pbigarray_fortran_layout -> p1 = Pbigarray_fortran_layout *)
149149

150150
type compile_time_constant = Lambda.compile_time_constant =
151151
| Big_endian
@@ -191,8 +191,8 @@ let str_of_field_info (x : field_dbg_info) : string option =
191191
| Fld_poly_var_content
192192
| Fld_tuple
193193
| Fld_extension_slot -> None
194-
| Fld_record {name }
195-
| Fld_module {name}
194+
| Fld_record {name ; _}
195+
| Fld_module {name ; _}
196196
| Fld_record_inline {name}
197197
| Fld_record_extension {name}
198198
->

jscomp/core/lam_compile_util.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ let comment_of_tag_info (x : Lam_tag_info.t) =
6565
let module_alias = Some "alias"
6666
let comment_of_pointer_info (x : Lam_pointer_info.t)=
6767
match x with
68-
| Pt_constructor {name}
68+
| Pt_constructor {name;_}
6969
| Pt_variant {name} -> Some name
7070
| Pt_module_alias -> module_alias
7171
| Pt_na -> None

jscomp/core/matching_polyfill.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,17 @@ let names_from_construct_pattern (pat: Typedtree.pattern) =
4040
blocks = Ext_array.reverse_of_list blocks } in
4141
let rec resolve_path n (path : Path.t) =
4242
match Env.find_type path pat.pat_env with
43-
| {type_kind = Type_variant cstrs} ->
43+
| {type_kind = Type_variant cstrs;_} ->
4444
names_from_type_variant cstrs
45-
| {type_kind = Type_abstract; type_manifest = Some t} ->
45+
| {type_kind = Type_abstract; type_manifest = Some t;_} ->
4646
( match (Ctype.unalias t).desc with
4747
| Tconstr (pathn, _, _) ->
4848
(* Format.eprintf "XXX path%d:%s path%d:%s@." n (Path.name path) (n+1) (Path.name pathn); *)
4949
resolve_path (n+1) pathn
5050
| _ -> None)
51-
| {type_kind = Type_abstract; type_manifest = None} ->
51+
| {type_kind = Type_abstract; type_manifest = None;_} ->
5252
None
53-
| {type_kind = Type_record _ | Type_open (* Exceptions *) } ->
53+
| {type_kind = Type_record _ | Type_open (* Exceptions *) ;_} ->
5454
None in
5555

5656
match (Btype.repr pat.pat_type).desc with

jscomp/core/ocaml_options.ml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ let mk_absname f =
1616
"-absname", Arg.Unit f, " Show absolute filenames in error messages"
1717
;;
1818

19-
let mk_annot f =
19+
(* let mk_annot f =
2020
"-annot", Arg.Unit f, " Save information in <filename>.annot"
21-
;;
21+
;; *)
2222

2323
let mk_binannot f =
2424
"-bin-annot", Arg.Unit f, " Save typedtree in <filename>.cmt"
@@ -32,9 +32,9 @@ let mk_config f =
3232
"-config", Arg.Unit f, " Print configuration values and exit"
3333
;;
3434

35-
let mk_g_byt f =
35+
(* let mk_g_byt f =
3636
"-g", Arg.Unit f, " Save debugging information"
37-
;;
37+
;; *)
3838

3939
let mk_i f =
4040
"-i", Arg.Unit f, " Print inferred interface"
@@ -78,9 +78,9 @@ let mk_no_app_funct f =
7878
"-no-app-funct", Arg.Unit f, " Deactivate applicative functors"
7979
;;
8080

81-
let mk_no_check_prims f =
81+
(* let mk_no_check_prims f =
8282
"-no-check-prims", Arg.Unit f, " Do not check runtime for primitives"
83-
;;
83+
;; *)
8484

8585
let mk_noassert f =
8686
"-noassert", Arg.Unit f, " Do not compile assertion checks"
@@ -119,17 +119,17 @@ let mk_rectypes f =
119119
"-rectypes", Arg.Unit f, " Allow arbitrary recursive types"
120120
;;
121121

122-
let mk_safe_string f =
122+
(* let mk_safe_string f =
123123
"-safe-string", Arg.Unit f, " Make strings immutable"
124-
;;
124+
;; *)
125125

126126
let mk_short_paths f =
127127
"-short-paths", Arg.Unit f, " Shorten paths in types"
128128
;;
129129

130-
let mk_stdin f =
130+
(* let mk_stdin f =
131131
"-stdin", Arg.Unit f, " Read script from standard input"
132-
;;
132+
;; *)
133133

134134
let mk_strict_sequence f =
135135
"-strict-sequence", Arg.Unit f,
@@ -226,11 +226,11 @@ let mk_dlambda f =
226226
"-dlambda", Arg.Unit f, " (undocumented)"
227227
;;
228228

229-
let mk_opaque f =
229+
(* let mk_opaque f =
230230
"-opaque", Arg.Unit f,
231231
" Does not generate cross-module optimization information\n\
232232
\ (reduces necessary recompilation on module change)"
233-
;;
233+
;; *)
234234

235235
let mk_strict_formats f =
236236
"-strict-formats", Arg.Unit f,

0 commit comments

Comments
 (0)