···19531953 path: string ;
19541954 cmis: cmis ;
19551955 cmas: cma list ;
19561956- findlib_metas: string list ;
19561956+ findlib_index: string ;
19571957 findlib_requires: string list ;
19581958 stdlib_dcs: string }[@@deriving rpcty]
19591959include
···19891989 Rpc.Types.fget = (fun _r -> _r.cmas);
19901990 Rpc.Types.fset = (fun v -> fun _s -> { _s with cmas = v })
19911991 }
19921992- and init_libs_findlib_metas : (_, init_libs) Rpc.Types.field =
19921992+ and init_libs_findlib_index : (_, init_libs) Rpc.Types.field =
19931993 {
19941994- Rpc.Types.fname = "findlib_metas";
19951995- Rpc.Types.field =
19961996- (Rpc.Types.List (let open Rpc.Types in Basic String));
19941994+ Rpc.Types.fname = "findlib_index";
19951995+ Rpc.Types.field = (let open Rpc.Types in Basic String);
19971996 Rpc.Types.fdefault = None;
19981997 Rpc.Types.fdescription = [];
19991998 Rpc.Types.fversion = None;
20002000- Rpc.Types.fget = (fun _r -> _r.findlib_metas);
20012001- Rpc.Types.fset = (fun v -> fun _s -> { _s with findlib_metas = v })
19991999+ Rpc.Types.fget = (fun _r -> _r.findlib_index);
20002000+ Rpc.Types.fset = (fun v -> fun _s -> { _s with findlib_index = v })
20022001 }
20032002 and init_libs_findlib_requires : (_, init_libs) Rpc.Types.field =
20042003 {
···20292028 [Rpc.Types.BoxedField init_libs_path;
20302029 Rpc.Types.BoxedField init_libs_cmis;
20312030 Rpc.Types.BoxedField init_libs_cmas;
20322032- Rpc.Types.BoxedField init_libs_findlib_metas;
20312031+ Rpc.Types.BoxedField init_libs_findlib_index;
20332032 Rpc.Types.BoxedField init_libs_findlib_requires;
20342033 Rpc.Types.BoxedField init_libs_stdlib_dcs];
20352034 Rpc.Types.sname = "init_libs";
···20462045 (let open Rpc.Types in Basic String)))
20472046 >>=
20482047 (fun init_libs_findlib_requires ->
20492049- (getter.Rpc.Types.field_get "findlib_metas"
20502050- (Rpc.Types.List
20512051- (let open Rpc.Types in Basic String)))
20482048+ (getter.Rpc.Types.field_get "findlib_index"
20492049+ (let open Rpc.Types in Basic String))
20522050 >>=
20532053- (fun init_libs_findlib_metas ->
20512051+ (fun init_libs_findlib_index ->
20542052 (getter.Rpc.Types.field_get "cmas"
20552053 (Rpc.Types.List typ_of_cma))
20562054 >>=
···20692067 path = init_libs_path;
20702068 cmis = init_libs_cmis;
20712069 cmas = init_libs_cmas;
20722072- findlib_metas =
20732073- init_libs_findlib_metas;
20702070+ findlib_index =
20712071+ init_libs_findlib_index;
20742072 findlib_requires =
20752073 init_libs_findlib_requires;
20762074 stdlib_dcs =
···20862084 let _ = init_libs_path
20872085 and _ = init_libs_cmis
20882086 and _ = init_libs_cmas
20892089- and _ = init_libs_findlib_metas
20872087+ and _ = init_libs_findlib_index
20902088 and _ = init_libs_findlib_requires
20912089 and _ = init_libs_stdlib_dcs
20922090 and _ = typ_of_init_libs
+7-1
lib/findlibish.ml
···4545 let rpc = Jsonrpc.of_string json in
4646 Rpcmarshal.unmarshal Js_top_worker_rpc.Toplevel_api_gen.typ_of_dynamic_cmis rpc
47474848-let init findlib_metas : t =
4848+let init findlib_index : t =
4949+ let findlib_metas =
5050+ match Jslib.sync_get findlib_index with
5151+ | None -> []
5252+ | Some txt ->
5353+ Astring.String.fields ~empty:false txt
5454+ in
4955 let metas = List.filter_map (fun x ->
5056 match Jslib.sync_get x with
5157 | Some meta -> Some (x, meta)
+2-2
lib/impl.ml
···44444545 val get_stdlib_dcs : string -> Toplevel_api_gen.dynamic_cmis list
46464747- val findlib_init : string list -> findlib_t
4747+ val findlib_init : string -> findlib_t
48484949 val require : findlib_t -> string list -> Toplevel_api_gen.dynamic_cmis list
5050end
···287287 Logs.info (fun m -> m "init()");
288288 path := Some init_libs.path;
289289290290- findlib_v := Some (S.findlib_init init_libs.findlib_metas);
290290+ findlib_v := Some (S.findlib_init init_libs.findlib_index);
291291292292 (match S.get_stdlib_dcs init_libs.stdlib_dcs with
293293 |[dcs] -> add_dynamic_cmis dcs