Skip to content

Commit d18ba7c

Browse files
committed
Make custom_resolution lazy
1 parent 0d0c0fc commit d18ba7c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

jscomp/bsb/bsb_pkg.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ let resolve_bs_package ~cwd (package : t) =
106106
* npm_config_prefix, bs_custom_resolution allows these to specify the
107107
* exact location of build cache, but on a per-package basis. Implemented as
108108
* environment lookup to avoid invasive changes to bsconfig and mandates. *)
109-
let custom_resolution =
109+
let custom_resolution () =
110110
match Sys.getenv "bs_custom_resolution" with
111111
| exception Not_found -> false
112112
| "true" -> true
@@ -126,7 +126,7 @@ let pkg_name_as_variable pkg =
126126
|> Str.global_replace regex_hyphen "_"
127127

128128
let resolve_bs_package ~cwd (pkg : t) =
129-
if custom_resolution then
129+
if custom_resolution () then
130130
begin
131131
Bsb_log.info "@{<info>Using Custom Resolution@}@.";
132132
let custom_pkg_loc = pkg_name_as_variable pkg ^ "__install" in

lib/4.02.3/bsb.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8572,7 +8572,7 @@ let resolve_bs_package ~cwd (package : t) =
85728572
* npm_config_prefix, bs_custom_resolution allows these to specify the
85738573
* exact location of build cache, but on a per-package basis. Implemented as
85748574
* environment lookup to avoid invasive changes to bsconfig and mandates. *)
8575-
let custom_resolution =
8575+
let custom_resolution () =
85768576
match Sys.getenv "bs_custom_resolution" with
85778577
| exception Not_found -> false
85788578
| "true" -> true
@@ -8592,7 +8592,7 @@ let pkg_name_as_variable pkg =
85928592
|> Str.global_replace regex_hyphen "_"
85938593

85948594
let resolve_bs_package ~cwd (pkg : t) =
8595-
if custom_resolution then
8595+
if custom_resolution () then
85968596
begin
85978597
Bsb_log.info "@{<info>Using Custom Resolution@}@.";
85988598
let custom_pkg_loc = pkg_name_as_variable pkg ^ "__install" in

lib/4.06.1/bsb.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8542,7 +8542,7 @@ let resolve_bs_package ~cwd (package : t) =
85428542
* npm_config_prefix, bs_custom_resolution allows these to specify the
85438543
* exact location of build cache, but on a per-package basis. Implemented as
85448544
* environment lookup to avoid invasive changes to bsconfig and mandates. *)
8545-
let custom_resolution =
8545+
let custom_resolution () =
85468546
match Sys.getenv "bs_custom_resolution" with
85478547
| exception Not_found -> false
85488548
| "true" -> true
@@ -8562,7 +8562,7 @@ let pkg_name_as_variable pkg =
85628562
|> Str.global_replace regex_hyphen "_"
85638563

85648564
let resolve_bs_package ~cwd (pkg : t) =
8565-
if custom_resolution then
8565+
if custom_resolution () then
85668566
begin
85678567
Bsb_log.info "@{<info>Using Custom Resolution@}@.";
85688568
let custom_pkg_loc = pkg_name_as_variable pkg ^ "__install" in

0 commit comments

Comments
 (0)