Skip to content

Commit 7663c69

Browse files
committedSep 14, 2020
remove unused variable
1 parent 0e090cf commit 7663c69

File tree

4 files changed

+5
-29
lines changed

4 files changed

+5
-29
lines changed
 

‎jscomp/bsb/bsb_config_parse.ml

-12
Original file line numberDiff line numberDiff line change
@@ -138,18 +138,6 @@ let check_stdlib (map : json_map) cwd (*built_in_package*) =
138138
end
139139

140140

141-
let extract_bs_suffix_exn (map : json_map) : Ext_js_suffix.t =
142-
match Map_string.find_opt map Bsb_build_schemas.suffix with
143-
| None -> Js
144-
| Some (Str {str} as config ) ->
145-
let s = Ext_js_suffix.of_string str in
146-
if s = Unknown_extension then
147-
Bsb_exception.config_error config
148-
"expect .bs.js, .js, .cjs, .mjs here"
149-
else s
150-
| Some config ->
151-
Bsb_exception.config_error config
152-
"expect a string exteion like \".js\" here"
153141

154142
let extract_gentype_config (map : json_map) cwd
155143
: Bsb_config_types.gentype_config option =

‎jscomp/bsb/bsb_package_specs.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ and from_json_single suffix (x : Ext_json_types.t) : spec =
108108
if s = Unknown_extension then
109109
Bsb_exception.errorf ~loc "expect .js,.bs.js,.mjs or .cjs"
110110
else s
111-
| Some v ->
111+
| Some _ ->
112112
Bsb_exception.errorf ~loc:(Ext_json.loc_of x) "expect a string field"
113113
| None -> suffix in
114114
{format = supported_format format loc ; in_source ; suffix}
@@ -195,7 +195,7 @@ type json_map = Ext_json_types.t Map_string.t
195195
let extract_bs_suffix_exn (map : json_map) : Ext_js_suffix.t =
196196
match Map_string.find_opt map Bsb_build_schemas.suffix with
197197
| None -> Js
198-
| Some (Str {str; loc} as config ) ->
198+
| Some (Str {str; loc}) ->
199199
let s = Ext_js_suffix.of_string str in
200200
if s = Unknown_extension then
201201
Bsb_exception.errorf ~loc

‎lib/4.06.1/bsb.ml

+2-14
Original file line numberDiff line numberDiff line change
@@ -7206,7 +7206,7 @@ and from_json_single suffix (x : Ext_json_types.t) : spec =
72067206
if s = Unknown_extension then
72077207
Bsb_exception.errorf ~loc "expect .js,.bs.js,.mjs or .cjs"
72087208
else s
7209-
| Some v ->
7209+
| Some _ ->
72107210
Bsb_exception.errorf ~loc:(Ext_json.loc_of x) "expect a string field"
72117211
| None -> suffix in
72127212
{format = supported_format format loc ; in_source ; suffix}
@@ -7293,7 +7293,7 @@ type json_map = Ext_json_types.t Map_string.t
72937293
let extract_bs_suffix_exn (map : json_map) : Ext_js_suffix.t =
72947294
match Map_string.find_opt map Bsb_build_schemas.suffix with
72957295
| None -> Js
7296-
| Some (Str {str; loc} as config ) ->
7296+
| Some (Str {str; loc}) ->
72977297
let s = Ext_js_suffix.of_string str in
72987298
if s = Unknown_extension then
72997299
Bsb_exception.errorf ~loc
@@ -11667,18 +11667,6 @@ let check_stdlib (map : json_map) cwd (*built_in_package*) =
1166711667
end
1166811668

1166911669

11670-
let extract_bs_suffix_exn (map : json_map) : Ext_js_suffix.t =
11671-
match Map_string.find_opt map Bsb_build_schemas.suffix with
11672-
| None -> Js
11673-
| Some (Str {str} as config ) ->
11674-
let s = Ext_js_suffix.of_string str in
11675-
if s = Unknown_extension then
11676-
Bsb_exception.config_error config
11677-
"expect .bs.js, .js, .cjs, .mjs here"
11678-
else s
11679-
| Some config ->
11680-
Bsb_exception.config_error config
11681-
"expect a string exteion like \".js\" here"
1168211670

1168311671
let extract_gentype_config (map : json_map) cwd
1168411672
: Bsb_config_types.gentype_config option =

‎scripts/ninja.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1610,7 +1610,7 @@ function nativeNinja() {
16101610
var templateNative = `
16111611
subninja ${getPreprocessorFileName()}
16121612
rule optc
1613-
command = $ocamlopt -safe-string -I +compiler-libs -opaque ${includes} -g -linscan -w A-4-9-40..42-30-48-50 -absname -c $in
1613+
command = $ocamlopt -safe-string -I +compiler-libs -opaque ${includes} -g -linscan -w A-4-9-40..42-30-48-50 -warn-error A -absname -c $in
16141614
description = $out : $in
16151615
rule archive
16161616
command = $ocamlopt -a $in -o $out

0 commit comments

Comments
 (0)