Skip to content

Commit e3c5dfb

Browse files
authored
Merge pull request #3783 from BuckleScript/quote_include_paths
fix #3781
2 parents 5e8a960 + 84135f6 commit e3c5dfb

File tree

10 files changed

+33
-15
lines changed

10 files changed

+33
-15
lines changed

jscomp/bsb/bsb_build_util.ml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,16 @@ let ppx_flags (xs : Bsb_config_types.ppx list) =
4444
let pp_flag (xs : string) =
4545
"-pp " ^ Ext_filename.maybe_quote xs
4646

47-
let include_dirs = flag_concat "-I"
47+
let include_dirs dirs =
48+
String.concat Ext_string.single_space
49+
(Ext_list.flat_map dirs (fun x -> ["-I"; Ext_filename.maybe_quote x]))
50+
51+
52+
let include_dirs_by dirs fn =
53+
String.concat Ext_string.single_space
54+
(Ext_list.flat_map dirs (fun x -> ["-I"; Ext_filename.maybe_quote (fn x)]))
55+
4856

49-
let include_dirs_by xs fn =
50-
include_dirs (Ext_list.map xs fn)
5157
(* we use lazy $src_root_dir *)
5258

5359

File renamed without changes.

lib/4.02.3/bsb.ml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9666,10 +9666,16 @@ let ppx_flags (xs : Bsb_config_types.ppx list) =
96669666
let pp_flag (xs : string) =
96679667
"-pp " ^ Ext_filename.maybe_quote xs
96689668

9669-
let include_dirs = flag_concat "-I"
9669+
let include_dirs dirs =
9670+
String.concat Ext_string.single_space
9671+
(Ext_list.flat_map dirs (fun x -> ["-I"; Ext_filename.maybe_quote x]))
9672+
9673+
9674+
let include_dirs_by dirs fn =
9675+
String.concat Ext_string.single_space
9676+
(Ext_list.flat_map dirs (fun x -> ["-I"; Ext_filename.maybe_quote (fn x)]))
9677+
96709678

9671-
let include_dirs_by xs fn =
9672-
include_dirs (Ext_list.map xs fn)
96739679
(* we use lazy $src_root_dir *)
96749680

96759681

lib/4.02.3/unstable/bsb_native.ml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9666,10 +9666,16 @@ let ppx_flags (xs : Bsb_config_types.ppx list) =
96669666
let pp_flag (xs : string) =
96679667
"-pp " ^ Ext_filename.maybe_quote xs
96689668

9669-
let include_dirs = flag_concat "-I"
9669+
let include_dirs dirs =
9670+
String.concat Ext_string.single_space
9671+
(Ext_list.flat_map dirs (fun x -> ["-I"; Ext_filename.maybe_quote x]))
9672+
9673+
9674+
let include_dirs_by dirs fn =
9675+
String.concat Ext_string.single_space
9676+
(Ext_list.flat_map dirs (fun x -> ["-I"; Ext_filename.maybe_quote (fn x)]))
9677+
96709678

9671-
let include_dirs_by xs fn =
9672-
include_dirs (Ext_list.map xs fn)
96739679
(* we use lazy $src_root_dir *)
96749680

96759681

scripts/install.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ function provideNinja() {
9999
"ninja binary is already cached and installed: ",
100100
ninja_bin_output
101101
);
102-
} else if (fs.existsSync(ninja_os_path)) {
102+
return;
103+
}
104+
if (fs.existsSync(ninja_os_path)) {
103105
if (fs.copyFileSync) {
104106
// ninja binary size is small
105107
fs.copyFileSync(ninja_os_path, ninja_bin_output);
@@ -108,12 +110,10 @@ function provideNinja() {
108110
}
109111
if (test_ninja_compatible(ninja_bin_output)) {
110112
console.log("ninja binary is copied from pre-distribution");
111-
} else {
112-
build_ninja();
113+
return;
113114
}
114-
} else {
115-
build_ninja();
116115
}
116+
build_ninja();
117117
}
118118
/**
119119
*
@@ -358,7 +358,7 @@ function provideCompiler() {
358358
ocamlopt: "ocamlopt.opt",
359359
ext: ".exe",
360360
INCL: ocamlVersion,
361-
isWin : is_windows
361+
isWin: is_windows
362362
});
363363

364364
var filePath = path.join(lib_dir, "release.ninja");

0 commit comments

Comments
 (0)