Skip to content

Commit d8981c4

Browse files
committed
snapshot
1 parent 8f79eee commit d8981c4

File tree

5 files changed

+11191
-10412
lines changed

5 files changed

+11191
-10412
lines changed

lib/4.06.1/bsb.ml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12270,6 +12270,12 @@ module Bsb_db_encode : sig
1227012270
* along with this program; if not, write to the Free Software
1227112271
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
1227212272

12273+
12274+
val encode :
12275+
Bsb_db.t ->
12276+
Ext_buffer.t ->
12277+
unit
12278+
1227312279
val write_build_cache :
1227412280
dir:string -> Bsb_db.t -> string
1227512281

lib/4.06.1/bsb_helper.ml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3241,10 +3241,20 @@ module Bsb_db_decode : sig
32413241

32423242

32433243

3244-
type t
3245-
3246-
type group
3244+
type group = private
3245+
| Dummy
3246+
| Group of {
3247+
modules : string array ;
3248+
dir_length : int;
3249+
dir_info_offset : int ;
3250+
module_info_offset : int;
3251+
}
32473252

3253+
type t = {
3254+
lib : group ;
3255+
dev : group ;
3256+
content : string (* string is whole content*)
3257+
}
32483258

32493259
val read_build_cache :
32503260
dir:string -> t
@@ -3261,6 +3271,9 @@ val find:
32613271
string -> (* module name *)
32623272
bool -> (* more likely to be zero *)
32633273
module_info option
3274+
3275+
3276+
val decode : string -> t
32643277
end = struct
32653278
#1 "bsb_db_decode.ml"
32663279
(* Copyright (C) 2019 - Present Authors of BuckleScript
@@ -3310,7 +3323,7 @@ type cursor = int ref
33103323

33113324

33123325
(*TODO: special case when module_count is zero *)
3313-
let rec decode_internal (x : string) : t =
3326+
let rec decode (x : string) : t =
33143327
let (offset : cursor) = ref 0 in
33153328
let lib = decode_single x offset in
33163329
let dev = decode_single x offset in
@@ -3358,7 +3371,7 @@ and decode_modules (x : string) (offset : cursor) module_number : string array =
33583371
let read_build_cache ~dir : t =
33593372
let all_content =
33603373
Ext_io.load_file (Filename.concat dir bsbuild_cache) in
3361-
decode_internal all_content
3374+
decode all_content
33623375

33633376

33643377

0 commit comments

Comments
 (0)