Skip to content

Commit 430c1ea

Browse files
committed
Snapshot changes in 4.06 branch
1 parent 87f3f2a commit 430c1ea

File tree

4 files changed

+4845
-4751
lines changed

4 files changed

+4845
-4751
lines changed

lib/4.06.1/bsb_helper.ml

Lines changed: 126 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,125 @@
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+
val get_current_number_of_dev_groups : unit -> int
41+
42+
43+
val string_of_bsb_dev_include : t -> string
44+
45+
(** TODO: Need reset
46+
when generating each ninja file to provide stronger guarantee.
47+
Here we get a weak guarantee because only dev group is
48+
inside the toplevel project
49+
*)
50+
val reset : unit -> unit
51+
end = struct
52+
#1 "bsb_dir_index.ml"
53+
(* Copyright (C) 2017 Authors of BuckleScript
54+
*
55+
* This program is free software: you can redistribute it and/or modify
56+
* it under the terms of the GNU Lesser General Public License as published by
57+
* the Free Software Foundation, either version 3 of the License, or
58+
* (at your option) any later version.
59+
*
60+
* In addition to the permissions granted to you by the LGPL, you may combine
61+
* or link a "work that uses the Library" with a publicly distributed version
62+
* of this file to produce a combined library or application, then distribute
63+
* that combined work under the terms of your choosing, with no requirement
64+
* to comply with the obligations normally placed on you by section 4 of the
65+
* LGPL version 3 (or the corresponding section of a later version of the LGPL
66+
* should you choose to use a later version).
67+
*
68+
* This program is distributed in the hope that it will be useful,
69+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
70+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
71+
* GNU Lesser General Public License for more details.
72+
*
73+
* You should have received a copy of the GNU Lesser General Public License
74+
* along with this program; if not, write to the Free Software
75+
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
76+
77+
type t = int
78+
79+
(**
80+
0 : lib
81+
1 : dev 1
82+
2 : dev 2
83+
*)
84+
external of_int : int -> t = "%identity"
85+
let lib_dir_index = 0
86+
87+
let is_lib_dir x = x = lib_dir_index
88+
89+
let dir_index = ref 0
90+
91+
let get_dev_index ( ) =
92+
incr dir_index ; !dir_index
93+
94+
let get_current_number_of_dev_groups =
95+
(fun () -> !dir_index )
96+
97+
98+
(** bsb generate pre-defined variables [bsc_group_i_includes]
99+
for each rule, there is variable [bsc_extra_excludes]
100+
[g_dev_incls] are for app test etc
101+
it will be like
102+
{[
103+
g_dev_incls = ${bsc_group_1_includes}
104+
]}
105+
where [bsc_group_1_includes] will be pre-calcuated
106+
*)
107+
let bsc_group_1_includes = "bsc_group_1_includes"
108+
let bsc_group_2_includes = "bsc_group_2_includes"
109+
let bsc_group_3_includes = "bsc_group_3_includes"
110+
let bsc_group_4_includes = "bsc_group_4_includes"
111+
let string_of_bsb_dev_include i =
112+
match i with
113+
| 1 -> bsc_group_1_includes
114+
| 2 -> bsc_group_2_includes
115+
| 3 -> bsc_group_3_includes
116+
| 4 -> bsc_group_4_includes
117+
| _ ->
118+
"bsc_group_" ^ string_of_int i ^ "_includes"
119+
120+
121+
let reset () = dir_index := 0
122+
end
1123
module Ext_buffer : sig
2124
#1 "ext_buffer.mli"
3125
(***********************************************************************)
@@ -1416,8 +1538,8 @@ let rec mem_string (xs : string list) (x : string) =
14161538
| a::l -> a = x || mem_string l x
14171539

14181540
end
1419-
module Bsb_arg : sig
1420-
#1 "bsb_arg.mli"
1541+
module Bsb_helper_arg : sig
1542+
#1 "bsb_helper_arg.mli"
14211543

14221544

14231545

@@ -1441,7 +1563,7 @@ val parse_exn :
14411563

14421564

14431565
end = struct
1444-
#1 "bsb_arg.ml"
1566+
#1 "bsb_helper_arg.ml"
14451567

14461568
type key = string
14471569
type doc = string
@@ -1596,128 +1718,6 @@ let parse_exn (speclist : t) anonfun errmsg =
15961718
;;
15971719
*)
15981720

1599-
end
1600-
module Bsb_dir_index : sig
1601-
#1 "bsb_dir_index.mli"
1602-
(* Copyright (C) 2017 Authors of BuckleScript
1603-
*
1604-
* This program is free software: you can redistribute it and/or modify
1605-
* it under the terms of the GNU Lesser General Public License as published by
1606-
* the Free Software Foundation, either version 3 of the License, or
1607-
* (at your option) any later version.
1608-
*
1609-
* In addition to the permissions granted to you by the LGPL, you may combine
1610-
* or link a "work that uses the Library" with a publicly distributed version
1611-
* of this file to produce a combined library or application, then distribute
1612-
* that combined work under the terms of your choosing, with no requirement
1613-
* to comply with the obligations normally placed on you by section 4 of the
1614-
* LGPL version 3 (or the corresponding section of a later version of the LGPL
1615-
* should you choose to use a later version).
1616-
*
1617-
* This program is distributed in the hope that it will be useful,
1618-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1619-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1620-
* GNU Lesser General Public License for more details.
1621-
*
1622-
* You should have received a copy of the GNU Lesser General Public License
1623-
* along with this program; if not, write to the Free Software
1624-
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
1625-
1626-
(** Used to index [.bsbuildcache] may not be needed if we flatten dev
1627-
into a single group
1628-
*)
1629-
type t = private int
1630-
1631-
val lib_dir_index : t
1632-
1633-
val is_lib_dir : t -> bool
1634-
1635-
val get_dev_index : unit -> t
1636-
1637-
val of_int : int -> t
1638-
1639-
val get_current_number_of_dev_groups : unit -> int
1640-
1641-
1642-
val string_of_bsb_dev_include : t -> string
1643-
1644-
(** TODO: Need reset
1645-
when generating each ninja file to provide stronger guarantee.
1646-
Here we get a weak guarantee because only dev group is
1647-
inside the toplevel project
1648-
*)
1649-
val reset : unit -> unit
1650-
end = struct
1651-
#1 "bsb_dir_index.ml"
1652-
(* Copyright (C) 2017 Authors of BuckleScript
1653-
*
1654-
* This program is free software: you can redistribute it and/or modify
1655-
* it under the terms of the GNU Lesser General Public License as published by
1656-
* the Free Software Foundation, either version 3 of the License, or
1657-
* (at your option) any later version.
1658-
*
1659-
* In addition to the permissions granted to you by the LGPL, you may combine
1660-
* or link a "work that uses the Library" with a publicly distributed version
1661-
* of this file to produce a combined library or application, then distribute
1662-
* that combined work under the terms of your choosing, with no requirement
1663-
* to comply with the obligations normally placed on you by section 4 of the
1664-
* LGPL version 3 (or the corresponding section of a later version of the LGPL
1665-
* should you choose to use a later version).
1666-
*
1667-
* This program is distributed in the hope that it will be useful,
1668-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1669-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1670-
* GNU Lesser General Public License for more details.
1671-
*
1672-
* You should have received a copy of the GNU Lesser General Public License
1673-
* along with this program; if not, write to the Free Software
1674-
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
1675-
1676-
type t = int
1677-
1678-
(**
1679-
0 : lib
1680-
1 : dev 1
1681-
2 : dev 2
1682-
*)
1683-
external of_int : int -> t = "%identity"
1684-
let lib_dir_index = 0
1685-
1686-
let is_lib_dir x = x = lib_dir_index
1687-
1688-
let dir_index = ref 0
1689-
1690-
let get_dev_index ( ) =
1691-
incr dir_index ; !dir_index
1692-
1693-
let get_current_number_of_dev_groups =
1694-
(fun () -> !dir_index )
1695-
1696-
1697-
(** bsb generate pre-defined variables [bsc_group_i_includes]
1698-
for each rule, there is variable [bsc_extra_excludes]
1699-
[g_dev_incls] are for app test etc
1700-
it will be like
1701-
{[
1702-
g_dev_incls = ${bsc_group_1_includes}
1703-
]}
1704-
where [bsc_group_1_includes] will be pre-calcuated
1705-
*)
1706-
let bsc_group_1_includes = "bsc_group_1_includes"
1707-
let bsc_group_2_includes = "bsc_group_2_includes"
1708-
let bsc_group_3_includes = "bsc_group_3_includes"
1709-
let bsc_group_4_includes = "bsc_group_4_includes"
1710-
let string_of_bsb_dev_include i =
1711-
match i with
1712-
| 1 -> bsc_group_1_includes
1713-
| 2 -> bsc_group_2_includes
1714-
| 3 -> bsc_group_3_includes
1715-
| 4 -> bsc_group_4_includes
1716-
| _ ->
1717-
"bsc_group_" ^ string_of_int i ^ "_includes"
1718-
1719-
1720-
let reset () = dir_index := 0
17211721
end
17221722
module Ext_digest : sig
17231723
#1 "ext_digest.mli"
@@ -4494,7 +4494,7 @@ let anonymous filename =
44944494
let usage = "Usage: bsb_helper.exe [options] \nOptions are:"
44954495

44964496
let () =
4497-
Bsb_arg.parse_exn [
4497+
Bsb_helper_arg.parse_exn [
44984498
"-g", Set_int dev_group ,
44994499
" Set the dev group (default to be 0)"
45004500
;

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_arg.ml ./bsb_helper/bsb_arg.mli ./bsb_helper/bsb_db_decode.ml ./bsb_helper/bsb_db_decode.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_char.ml ./ext/ext_char.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.ml ./ext/ext_namespace.mli ./ext/ext_option.ml ./ext/ext_option.mli ./ext/ext_pervasives.ml ./ext/ext_pervasives.mli ./ext/ext_string.ml ./ext/ext_string.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/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_char.ml ./ext/ext_char.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.ml ./ext/ext_namespace.mli ./ext/ext_option.ml ./ext/ext_option.mli ./ext/ext_pervasives.ml ./ext/ext_pervasives.mli ./ext/ext_string.ml ./ext/ext_string.mli ./ext/literals.ml ./ext/literals.mli ./main/bsb_helper_main.ml ./main/bsb_helper_main.mli

0 commit comments

Comments
 (0)