Skip to content

Commit bd2a04e

Browse files
committed
support pinned-deps
1 parent 1f03d90 commit bd2a04e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

jscomp/bsb/bsb_world.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ let ( // ) = Ext_path.combine
2626
let vendor_ninja = Bsb_global_paths.vendor_ninja
2727

2828
let make_world_deps cwd (config : Bsb_config_types.t option)
29-
(ninja_args : string array) =
29+
(ninja_args : string array) warn_as_error =
3030
let package_specs, jsx, uncurried, pinned_dependencies =
3131
match config with
3232
| None ->
@@ -71,7 +71,7 @@ let make_world_deps cwd (config : Bsb_config_types.t option)
7171
else Dependency { package_specs; jsx; uncurried })
7272
~per_proj_dir:proj_dir ~forced:false
7373
~warn_legacy_config:false
74-
~warn_as_error:None
74+
~warn_as_error:(if is_pinned then warn_as_error else None)
7575
in
7676
let command =
7777
{ Bsb_unix.cmd = vendor_ninja; cwd = lib_bs_dir; args }

jscomp/bsb/bsb_world.mli

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

2525
val make_world_deps :
26-
string -> Bsb_config_types.t option -> string array -> unit
26+
string -> Bsb_config_types.t option -> string array -> string option -> unit

jscomp/bsb_exe/rescript_main.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ let build_subcommand ~start argv argv_len =
159159
~warn_legacy_config:true
160160
~warn_as_error
161161
in
162-
if not !no_deps_mode then Bsb_world.make_world_deps Bsb_global_paths.cwd config_opt ninja_args;
162+
if not !no_deps_mode then Bsb_world.make_world_deps Bsb_global_paths.cwd config_opt ninja_args warn_as_error;
163163
if !do_install then install_target ();
164164
ninja_command_exit ninja_args
165165

@@ -224,7 +224,7 @@ let () =
224224
~warn_legacy_config:true
225225
~warn_as_error:None
226226
in
227-
Bsb_world.make_world_deps Bsb_global_paths.cwd config_opt [||];
227+
Bsb_world.make_world_deps Bsb_global_paths.cwd config_opt [||] None;
228228
ninja_command_exit [||])
229229
else
230230
match argv.(1) with

0 commit comments

Comments
 (0)