Skip to content

Commit 0d3f8af

Browse files
committed
snapshot
1 parent 43dbf43 commit 0d3f8af

File tree

2 files changed

+32
-14
lines changed

2 files changed

+32
-14
lines changed

lib/4.06.1/bsb.ml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11905,11 +11905,20 @@ let output_merlin_namespace buffer ns=
1190511905
Buffer.add_string buffer "-open ";
1190611906
Buffer.add_string buffer x
1190711907

11908+
(* Literals.dash_nostdlib::
11909+
FIX editor tooling, note merlin does not need -nostdlib since we added S and B
11910+
RLS will add -I for those cmi files,
11911+
Some consistency check is needed
11912+
Unless we tell the editor to peek those cmi for auto-complete and others for building which is too
11913+
complicated
11914+
*)
1190811915
let bsc_flg_to_merlin_ocamlc_flg bsc_flags =
11909-
merlin_flg ^
11910-
String.concat Ext_string.single_space
11911-
(List.filter (fun x -> not (Ext_string.starts_with x bs_flg_prefix )) (
11912-
Literals.dash_nostdlib::bsc_flags))
11916+
let flags = (List.filter (fun x -> not (Ext_string.starts_with x bs_flg_prefix )) (
11917+
bsc_flags)) in
11918+
if flags <> [] then
11919+
merlin_flg ^
11920+
String.concat Ext_string.single_space flags
11921+
else ""
1191311922

1191411923
(* No need for [-warn-error] in merlin *)
1191511924
let warning_to_merlin_flg (warning: Bsb_warning.t ) : string=
@@ -16270,7 +16279,7 @@ let run_npm_link cwd dirname =
1627016279
exit 2
1627116280
end
1627216281
else
16273-
if Ext_sys.is_windows_or_cygwin then
16282+
(* if Ext_sys.is_windows_or_cygwin then *)
1627416283
begin
1627516284
let npm_link = "npm link bs-platform" in
1627616285
let exit_code = Sys.command npm_link in
@@ -16280,7 +16289,7 @@ let run_npm_link cwd dirname =
1628016289
exit exit_code
1628116290
end
1628216291
end
16283-
else
16292+
(* else
1628416293
begin
1628516294
(* symlink bs-platform and bsb,bsc,bsrefmt to .bin directory
1628616295
we did not run npm link bs-platform for efficiency reasons
@@ -16298,7 +16307,7 @@ let run_npm_link cwd dirname =
1629816307
Unix.symlink
1629916308
(Filename.dirname (Filename.dirname Sys.executable_name))
1630016309
(Filename.concat "node_modules" Bs_version.package_name)
16301-
end
16310+
end *)
1630216311

1630316312
let enter_dir cwd x action =
1630416313
Unix.chdir x ;

lib/4.06.1/unstable/bsb_native.ml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12027,11 +12027,20 @@ let output_merlin_namespace buffer ns=
1202712027
Buffer.add_string buffer "-open ";
1202812028
Buffer.add_string buffer x
1202912029

12030+
(* Literals.dash_nostdlib::
12031+
FIX editor tooling, note merlin does not need -nostdlib since we added S and B
12032+
RLS will add -I for those cmi files,
12033+
Some consistency check is needed
12034+
Unless we tell the editor to peek those cmi for auto-complete and others for building which is too
12035+
complicated
12036+
*)
1203012037
let bsc_flg_to_merlin_ocamlc_flg bsc_flags =
12031-
merlin_flg ^
12032-
String.concat Ext_string.single_space
12033-
(List.filter (fun x -> not (Ext_string.starts_with x bs_flg_prefix )) (
12034-
Literals.dash_nostdlib::bsc_flags))
12038+
let flags = (List.filter (fun x -> not (Ext_string.starts_with x bs_flg_prefix )) (
12039+
bsc_flags)) in
12040+
if flags <> [] then
12041+
merlin_flg ^
12042+
String.concat Ext_string.single_space flags
12043+
else ""
1203512044

1203612045
(* No need for [-warn-error] in merlin *)
1203712046
let warning_to_merlin_flg (warning: Bsb_warning.t ) : string=
@@ -16392,7 +16401,7 @@ let run_npm_link cwd dirname =
1639216401
exit 2
1639316402
end
1639416403
else
16395-
if Ext_sys.is_windows_or_cygwin then
16404+
(* if Ext_sys.is_windows_or_cygwin then *)
1639616405
begin
1639716406
let npm_link = "npm link bs-platform" in
1639816407
let exit_code = Sys.command npm_link in
@@ -16402,7 +16411,7 @@ let run_npm_link cwd dirname =
1640216411
exit exit_code
1640316412
end
1640416413
end
16405-
else
16414+
(* else
1640616415
begin
1640716416
(* symlink bs-platform and bsb,bsc,bsrefmt to .bin directory
1640816417
we did not run npm link bs-platform for efficiency reasons
@@ -16420,7 +16429,7 @@ let run_npm_link cwd dirname =
1642016429
Unix.symlink
1642116430
(Filename.dirname (Filename.dirname Sys.executable_name))
1642216431
(Filename.concat "node_modules" Bs_version.package_name)
16423-
end
16432+
end *)
1642416433

1642516434
let enter_dir cwd x action =
1642616435
Unix.chdir x ;

0 commit comments

Comments
 (0)