this repo has no description

Fix js_top_worker to build with oxcaml compiler

The oxcaml compiler changed cmi_crcs from (string * Digest.t option) list
to Import_info.t array, and Env.crc_of_unit now takes Compilation_unit.Name.t
instead of string. Update all three call sites accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+12 -7
+6 -3
bin/jtw.ml
··· 11 11 let cmi_self_crc cmi_path = 12 12 try 13 13 let cmi = Cmi_format.read_cmi (Fpath.to_string cmi_path) in 14 - match cmi.Cmi_format.cmi_crcs with 15 - | (_, Some crc) :: _ -> Some (Digest.to_hex crc) 16 - | _ -> None 14 + let crcs = cmi.Cmi_format.cmi_crcs in 15 + if Array.length crcs > 0 then 16 + match Import_info.crc crcs.(0) with 17 + | Some crc -> Some (Digest.to_hex crc) 18 + | None -> None 19 + else None 17 20 with _ -> None 18 21 19 22 (** For a list of toplevel module names and the directory containing their
+1 -1
lib/findlibish.ml
··· 58 58 | Some _ as v -> v 59 59 | None -> 60 60 let v = 61 - try Some (Digest.to_hex (Env.crc_of_unit module_name)) 61 + try Some (Digest.to_hex (Env.crc_of_unit (module_name |> Compilation_unit.Name.of_string))) 62 62 with Not_found -> None 63 63 in 64 64 Option.iter (Js_top_worker.Impl.memo_binary_crc module_name) v;
+5 -3
lib/impl.cppo.ml
··· 382 382 (try S.create_file ~name:fs_name ~content with _ -> ()); 383 383 (try 384 384 let cmi = Cmi_format.read_cmi fs_name in 385 - match cmi.Cmi_format.cmi_crcs with 386 - | (_, Some crc) :: _ -> memo_server_crc name (Digest.to_hex crc) 387 - | _ -> () 385 + let crcs = cmi.Cmi_format.cmi_crcs in 386 + if Array.length crcs > 0 then 387 + match Import_info.crc crcs.(0) with 388 + | Some crc -> memo_server_crc name (Digest.to_hex crc) 389 + | None -> () 388 390 with _ -> ()) 389 391 | None -> ()) 390 392 dcs.dcs_toplevel_modules;