Skip to content

Commit 0af0b6c

Browse files
authored
Merge pull request #4134 from BuckleScript/unused_value_warning_error
unused value warning -> error (for dev)
2 parents 419d9f6 + 688fbb3 commit 0af0b6c

File tree

124 files changed

+12094
-12150
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+12094
-12150
lines changed

jscomp/bsb/bsb_config.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ let proj_rel path = lazy_src_root_dir // path
5757

5858

5959

60-
let cmd_package_specs = ref None
60+
(* let cmd_package_specs = ref None *)
6161

jscomp/bsb/bsb_config_parse.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
2424

2525

26-
let get_list_string = Bsb_build_util.get_list_string
26+
(* let get_list_string = Bsb_build_util.get_list_string *)
2727
let (//) = Ext_path.combine
2828
let current_package : Bsb_pkg_types.t = Global Bs_version.package_name
2929
let resolve_package cwd package_name =
@@ -39,9 +39,9 @@ let (|?) m (key, cb) =
3939
m |> Ext_json.test key cb
4040

4141

42-
43-
let extract_main_entries (map :json_map) =
4442
#if BS_NATIVE then
43+
let extract_main_entries (map :json_map) =
44+
4545
let extract_entries (field : Ext_json_types.t array) =
4646
Ext_array.to_list_map (function
4747
| Ext_json_types.Obj {map} ->
@@ -76,7 +76,7 @@ let extract_main_entries (map :json_map) =
7676
| _ -> ()
7777
end; !entries
7878
#else
79-
[]
79+
let extract_main_entries (_ :json_map) = []
8080
#end
8181

8282

jscomp/bsb/bsb_db_util.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
2525
type module_info = Bsb_db.module_info
2626
type t = Bsb_db.t
27-
type case = Bsb_db.case
27+
(* type case = Bsb_db.case *)
2828

2929

3030

jscomp/bsb/bsb_log.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ let color_functions : Format.formatter_tag_functions = {
4949
print_close_tag = (fun _ -> ())
5050
}
5151

52-
let set_color ppf =
53-
Format.pp_set_formatter_tag_functions ppf color_functions
52+
(* let set_color ppf =
53+
Format.pp_set_formatter_tag_functions ppf color_functions *)
5454

5555

5656
let setup () =

jscomp/bsb/bsb_merlin_gen.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ let merlin_file_gen ~per_proj_dir:(per_proj_dir:string)
110110
external_includes;
111111
reason_react_jsx ;
112112
namespace;
113-
package_name;
113+
package_name = _;
114114
warning;
115115
} : Bsb_config_types.t)
116116
=

jscomp/bsb/bsb_ninja_gen.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ let (//) = Ext_path.combine
3131

3232

3333

34-
let dash_i = "-I"
34+
(* let dash_i = "-I" *)
3535

3636

3737

@@ -184,8 +184,8 @@ let output_ninja_and_namespace_map
184184
Bsb_db_util.sanity_check bs_group;
185185
[|bs_group|], source_dirs, static_resources
186186
else
187-
let bs_groups = Array.init (number_of_dev_groups + 1 ) (fun i -> Map_string.empty) in
188-
let source_dirs = Array.init (number_of_dev_groups + 1 ) (fun i -> []) in
187+
let bs_groups = Array.init (number_of_dev_groups + 1 ) (fun _ -> Map_string.empty) in
188+
let source_dirs = Array.init (number_of_dev_groups + 1 ) (fun _ -> []) in
189189
let static_resources =
190190
Ext_list.fold_left bs_file_groups [] (fun (acc_resources : string list) {sources; dir; resources; dir_index}
191191
->

jscomp/bsb/bsb_parse_sources.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type build_generator = Bsb_file_groups.build_generator
2828

2929

3030

31-
type file_group = Bsb_file_groups.file_group
31+
(* type file_group = Bsb_file_groups.file_group *)
3232

3333
type t = Bsb_file_groups.t
3434

@@ -134,7 +134,7 @@ type json_map = Ext_json_types.t Map_string.t
134134

135135
let extract_generators (input : json_map) : build_generator list =
136136
match Map_string.find_opt input Bsb_build_schemas.generators with
137-
| Some (Arr { content ; loc_start}) ->
137+
| Some (Arr { content ; loc_start= _}) ->
138138
(* Need check is dev build or not *)
139139
Ext_array.fold_left content [] (fun acc x ->
140140
match x with
@@ -294,7 +294,7 @@ let rec
294294
Bsb_db_util.add_basename ~dir acc basename ~error_on_invalid_suffix:loc
295295
| _ -> acc
296296
)
297-
| Some (Obj {map = map; loc} ) -> (* { excludes : [], slow_re : "" }*)
297+
| Some (Obj {map = map; loc = _} ) -> (* { excludes : [], slow_re : "" }*)
298298
let predicate = extract_predicate map in
299299
Ext_array.fold_left (Lazy.force base_name_array) output_sources (fun acc basename ->
300300
if is_input_or_output scanned_generators basename || not (predicate basename) then acc

jscomp/bsb/bsb_unix.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ let run_command_execv_unix cmd : int =
4949
Unix.execv cmd.cmd cmd.args
5050
| pid ->
5151
match Unix.waitpid [] pid with
52-
| pid, process_status ->
52+
| _, process_status ->
5353
match process_status with
5454
| Unix.WEXITED eid ->
5555
eid

jscomp/bsb/bsb_world.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ let (//) = Ext_path.combine
2828
(** TODO: create the animation effect
2929
logging installed files
3030
*)
31-
let install_targets cwd ({files_to_install; namespace; package_name} : Bsb_config_types.t ) =
31+
let install_targets cwd ({files_to_install; namespace; package_name = _} : Bsb_config_types.t ) =
3232
let install ~destdir file =
3333
Bsb_file.install_if_exists ~destdir file |> ignore
3434
in

jscomp/bsb_helper/bsb_helper_dep_graph.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ let get_otherlibs_dependencies dependency_graph file_extension =
9898
else
9999
acc
100100
in
101-
let set_of_otherlib_deps = Map_string.fold dependency_graph Set_string.empty (fun k v acc ->
101+
let set_of_otherlib_deps = Map_string.fold dependency_graph Set_string.empty (fun _k v acc ->
102102
let addIfPresent = addIfPresentInSet v in
103103
acc
104104
|> addIfPresent "Unix" "unix"

0 commit comments

Comments
 (0)