Skip to content

Commit a45a5b3

Browse files
committed
snapshot
1 parent 02542bf commit a45a5b3

File tree

4 files changed

+21
-116
lines changed

4 files changed

+21
-116
lines changed

lib/4.06.1/bsb.ml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3314,7 +3314,7 @@ val is_lib_dir : t -> bool
33143314

33153315
val get_dev_index : unit -> t
33163316

3317-
val of_int : int -> t
3317+
33183318

33193319

33203320

@@ -3352,7 +3352,7 @@ type t = int
33523352
1 : dev 1
33533353
2 : dev 2
33543354
*)
3355-
external of_int : int -> t = "%identity"
3355+
33563356
let lib_dir_index = 0
33573357

33583358
let is_lib_dir x = x = lib_dir_index
@@ -12952,7 +12952,7 @@ let make_custom_rules
1295212952
define
1295312953
~restat:()
1295412954
~command:
12955-
("$bsdep -hash " ^ digest ^" $g_ns -g $bsb_dir_group $in")
12955+
("$bsdep -hash " ^ digest ^" $g_ns $bsb_dir_group $in")
1295612956
"build_deps" in
1295712957
let aux ~name ~read_cmi ~postbuild =
1295812958
let postbuild = has_postbuild && postbuild in
@@ -13461,7 +13461,7 @@ let emit_module_build
1346113461
?shadows:(if is_dev then
1346213462
Some [{Bsb_ninja_targets.key = Bsb_build_schemas.bsb_dir_group ;
1346313463
op =
13464-
Overwrite (string_of_int (group_dir_index :> int)) }]
13464+
Overwrite "-g" }]
1346513465
else None)
1346613466
;
1346713467
if has_intf_file then begin
@@ -13753,7 +13753,6 @@ let output_ninja_and_namespace_map
1375313753
bs_dev_dependencies
1375413754
(fun x -> x.package_install_path));
1375513755
Bsb_ninja_global_vars.g_ns , g_ns_flg ;
13756-
Bsb_build_schemas.bsb_dir_group, "0" (*TODO: avoid name conflict in the future *)
1375713756
|] oc
1375813757
in
1375913758
let bs_groups, bsc_lib_dirs, static_resources =

lib/4.06.1/bsb_helper.ml

Lines changed: 12 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,3 @@
1-
module Bsb_dir_index : sig
2-
#1 "bsb_dir_index.mli"
3-
(* Copyright (C) 2017 Authors of BuckleScript
4-
*
5-
* This program is free software: you can redistribute it and/or modify
6-
* it under the terms of the GNU Lesser General Public License as published by
7-
* the Free Software Foundation, either version 3 of the License, or
8-
* (at your option) any later version.
9-
*
10-
* In addition to the permissions granted to you by the LGPL, you may combine
11-
* or link a "work that uses the Library" with a publicly distributed version
12-
* of this file to produce a combined library or application, then distribute
13-
* that combined work under the terms of your choosing, with no requirement
14-
* to comply with the obligations normally placed on you by section 4 of the
15-
* LGPL version 3 (or the corresponding section of a later version of the LGPL
16-
* should you choose to use a later version).
17-
*
18-
* This program is distributed in the hope that it will be useful,
19-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21-
* GNU Lesser General Public License for more details.
22-
*
23-
* You should have received a copy of the GNU Lesser General Public License
24-
* along with this program; if not, write to the Free Software
25-
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
26-
27-
(** Used to index [.bsbuildcache] may not be needed if we flatten dev
28-
into a single group
29-
*)
30-
type t = private int
31-
32-
val lib_dir_index : t
33-
34-
val is_lib_dir : t -> bool
35-
36-
val get_dev_index : unit -> t
37-
38-
val of_int : int -> t
39-
40-
41-
42-
43-
end = struct
44-
#1 "bsb_dir_index.ml"
45-
(* Copyright (C) 2017 Authors of BuckleScript
46-
*
47-
* This program is free software: you can redistribute it and/or modify
48-
* it under the terms of the GNU Lesser General Public License as published by
49-
* the Free Software Foundation, either version 3 of the License, or
50-
* (at your option) any later version.
51-
*
52-
* In addition to the permissions granted to you by the LGPL, you may combine
53-
* or link a "work that uses the Library" with a publicly distributed version
54-
* of this file to produce a combined library or application, then distribute
55-
* that combined work under the terms of your choosing, with no requirement
56-
* to comply with the obligations normally placed on you by section 4 of the
57-
* LGPL version 3 (or the corresponding section of a later version of the LGPL
58-
* should you choose to use a later version).
59-
*
60-
* This program is distributed in the hope that it will be useful,
61-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
62-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
63-
* GNU Lesser General Public License for more details.
64-
*
65-
* You should have received a copy of the GNU Lesser General Public License
66-
* along with this program; if not, write to the Free Software
67-
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
68-
69-
type t = int
70-
71-
(**
72-
0 : lib
73-
1 : dev 1
74-
2 : dev 2
75-
*)
76-
external of_int : int -> t = "%identity"
77-
let lib_dir_index = 0
78-
79-
let is_lib_dir x = x = lib_dir_index
80-
81-
82-
83-
let get_dev_index ( ) = 1
84-
85-
86-
87-
88-
89-
90-
91-
end
921
module Ext_bytes : sig
932
#1 "ext_bytes.mli"
943
(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
@@ -3915,7 +3824,7 @@ val deps_of_channel : in_channel -> string list
39153824

39163825
val emit_d:
39173826
kind ->
3918-
Bsb_dir_index.t ->
3827+
bool ->
39193828
string option ->
39203829
string ->
39213830
string -> (* empty string means no mliast *)
@@ -4046,7 +3955,7 @@ let oc_cmi buf namespace source =
40463955
*)
40473956
let oc_impl
40483957
(mlast : string)
4049-
(index : Bsb_dir_index.t)
3958+
(dev_group : bool)
40503959
(db : Bsb_db_decode.t)
40513960
(namespace : string option)
40523961
(buf : Ext_buffer.t)
@@ -4066,7 +3975,6 @@ let oc_impl
40663975
Ext_buffer.add_string buf ns;
40673976
Ext_buffer.add_string buf Literals.suffix_cmi;
40683977
) ; (* TODO: moved into static files*)
4069-
let is_not_lib_dir = not (Bsb_dir_index.is_lib_dir index) in
40703978
let s = extract_dep_raw_string mlast in
40713979
let offset = ref 1 in
40723980
let size = String.length s in
@@ -4080,7 +3988,7 @@ let oc_impl
40803988
end
40813989
);
40823990
(match
4083-
Bsb_db_decode.find db dependent_module is_not_lib_dir
3991+
Bsb_db_decode.find db dependent_module dev_group
40843992
with
40853993
| None -> ()
40863994
| Some ({dir_name; case }) ->
@@ -4112,7 +4020,7 @@ let oc_impl
41124020
*)
41134021
let oc_intf
41144022
mliast
4115-
(index : Bsb_dir_index.t)
4023+
(dev_group : bool)
41164024
(db : Bsb_db_decode.t)
41174025
(namespace : string option)
41184026
(buf : Ext_buffer.t) : unit =
@@ -4129,7 +4037,6 @@ let oc_intf
41294037
Ext_buffer.add_string buf Literals.suffix_cmi;
41304038
) ;
41314039
let cur_module_name = Ext_filename.module_name mliast in
4132-
let is_not_lib_dir = not (Bsb_dir_index.is_lib_dir index) in
41334040
let s = extract_dep_raw_string mliast in
41344041
let offset = ref 1 in
41354042
let size = String.length s in
@@ -4142,7 +4049,7 @@ let oc_intf
41424049
exit 2
41434050
end
41444051
);
4145-
(match Bsb_db_decode.find db dependent_module is_not_lib_dir
4052+
(match Bsb_db_decode.find db dependent_module dev_group
41464053
with
41474054
| None -> ()
41484055
| Some {dir_name; case} ->
@@ -4161,7 +4068,7 @@ let oc_intf
41614068

41624069
let emit_d
41634070
compilation_kind
4164-
(index : Bsb_dir_index.t)
4071+
(dev_group : bool)
41654072
(namespace : string option) (mlast : string) (mliast : string) =
41664073
let data =
41674074
Bsb_db_decode.read_build_cache
@@ -4177,7 +4084,7 @@ let emit_d
41774084
in
41784085
oc_impl
41794086
mlast
4180-
index
4087+
dev_group
41814088
data
41824089
namespace
41834090
buf
@@ -4186,7 +4093,7 @@ let emit_d
41864093
if mliast <> "" then begin
41874094
oc_intf
41884095
mliast
4189-
index
4096+
dev_group
41904097
data
41914098
namespace
41924099
buf
@@ -4265,7 +4172,7 @@ let collect_file name =
42654172
batch_files := name :: !batch_files
42664173

42674174
(* let output_prefix = ref None *)
4268-
let dev_group = ref 0
4175+
let dev_group = ref false
42694176
let namespace = ref None
42704177

42714178

@@ -4275,7 +4182,7 @@ let usage = "Usage: bsb_helper.exe [options] \nOptions are:"
42754182

42764183
let () =
42774184
Bsb_helper_arg.parse_exn [
4278-
"-g", Set_int dev_group ,
4185+
"-g", Set dev_group ,
42794186
" Set the dev group (default to be 0)"
42804187
;
42814188
"-bs-ns", String (fun s -> namespace := Some s),
@@ -4288,13 +4195,13 @@ let () =
42884195
| [x]
42894196
-> Bsb_helper_depfile_gen.emit_d
42904197
!compilation_kind
4291-
(Bsb_dir_index.of_int !dev_group )
4198+
!dev_group
42924199
!namespace x ""
42934200
| [y; x] (* reverse order *)
42944201
->
42954202
Bsb_helper_depfile_gen.emit_d
42964203
!compilation_kind
4297-
(Bsb_dir_index.of_int !dev_group)
4204+
!dev_group
42984205
!namespace x y
42994206
| _ ->
43004207
()

lib/4.06.1/bsb_helper.ml.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../lib/4.06.1/bsb_helper.ml: ./bsb_helper/bsb_db_decode.ml ./bsb_helper/bsb_db_decode.mli ./bsb_helper/bsb_helper_arg.ml ./bsb_helper/bsb_helper_arg.mli ./bsb_helper/bsb_helper_depfile_gen.ml ./bsb_helper/bsb_helper_depfile_gen.mli ./ext/bsb_dir_index.ml ./ext/bsb_dir_index.mli ./ext/ext_buffer.ml ./ext/ext_buffer.mli ./ext/ext_bytes.ml ./ext/ext_bytes.mli ./ext/ext_digest.ml ./ext/ext_digest.mli ./ext/ext_filename.ml ./ext/ext_filename.mli ./ext/ext_io.ml ./ext/ext_io.mli ./ext/ext_list.ml ./ext/ext_list.mli ./ext/ext_namespace_encode.ml ./ext/ext_namespace_encode.mli ./ext/ext_pervasives.ml ./ext/ext_pervasives.mli ./ext/ext_string.ml ./ext/ext_string.mli ./ext/ext_string_array.ml ./ext/ext_string_array.mli ./ext/literals.ml ./ext/literals.mli ./main/bsb_helper_main.ml ./main/bsb_helper_main.mli
1+
../lib/4.06.1/bsb_helper.ml: ./bsb_helper/bsb_db_decode.ml ./bsb_helper/bsb_db_decode.mli ./bsb_helper/bsb_helper_arg.ml ./bsb_helper/bsb_helper_arg.mli ./bsb_helper/bsb_helper_depfile_gen.ml ./bsb_helper/bsb_helper_depfile_gen.mli ./ext/ext_buffer.ml ./ext/ext_buffer.mli ./ext/ext_bytes.ml ./ext/ext_bytes.mli ./ext/ext_digest.ml ./ext/ext_digest.mli ./ext/ext_filename.ml ./ext/ext_filename.mli ./ext/ext_io.ml ./ext/ext_io.mli ./ext/ext_list.ml ./ext/ext_list.mli ./ext/ext_namespace_encode.ml ./ext/ext_namespace_encode.mli ./ext/ext_pervasives.ml ./ext/ext_pervasives.mli ./ext/ext_string.ml ./ext/ext_string.mli ./ext/ext_string_array.ml ./ext/ext_string_array.mli ./ext/literals.ml ./ext/literals.mli ./main/bsb_helper_main.ml ./main/bsb_helper_main.mli

lib/4.06.1/unstable/bsb_native.ml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3314,7 +3314,7 @@ val is_lib_dir : t -> bool
33143314

33153315
val get_dev_index : unit -> t
33163316

3317-
val of_int : int -> t
3317+
33183318

33193319

33203320

@@ -3352,7 +3352,7 @@ type t = int
33523352
1 : dev 1
33533353
2 : dev 2
33543354
*)
3355-
external of_int : int -> t = "%identity"
3355+
33563356
let lib_dir_index = 0
33573357

33583358
let is_lib_dir x = x = lib_dir_index
@@ -13101,7 +13101,7 @@ let make_custom_rules
1310113101
define
1310213102
~restat:()
1310313103
~command:
13104-
("$bsdep -hash " ^ digest ^" $g_ns -g $bsb_dir_group $in")
13104+
("$bsdep -hash " ^ digest ^" $g_ns $bsb_dir_group $in")
1310513105
"build_deps" in
1310613106
let aux ~name ~read_cmi ~postbuild =
1310713107
let postbuild = has_postbuild && postbuild in
@@ -13610,7 +13610,7 @@ let emit_module_build
1361013610
?shadows:(if is_dev then
1361113611
Some [{Bsb_ninja_targets.key = Bsb_build_schemas.bsb_dir_group ;
1361213612
op =
13613-
Overwrite (string_of_int (group_dir_index :> int)) }]
13613+
Overwrite "-g" }]
1361413614
else None)
1361513615
;
1361613616
if has_intf_file then begin
@@ -13902,7 +13902,6 @@ let output_ninja_and_namespace_map
1390213902
bs_dev_dependencies
1390313903
(fun x -> x.package_install_path));
1390413904
Bsb_ninja_global_vars.g_ns , g_ns_flg ;
13905-
Bsb_build_schemas.bsb_dir_group, "0" (*TODO: avoid name conflict in the future *)
1390613905
|] oc
1390713906
in
1390813907
let bs_groups, bsc_lib_dirs, static_resources =

0 commit comments

Comments
 (0)