Skip to content

Commit

Permalink
Upgrade to OCaml 5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
voodoos committed Jun 27, 2024
1 parent dae7fe3 commit 6ecda9f
Show file tree
Hide file tree
Showing 81 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion merlin-js.opam
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ build: [
["dune" "build" "-p" name "-j" jobs]
]
depends: [
"ocaml" {>= "5.0"}
"ocaml" {>= "5.2" & < "5.3"}
"dune" {>= "3.0"}
"merlin-lib"
"yojson" {>= "1.6.0"}
Expand Down
Binary file modified src/worker/static/stdlib/camlinternalFormat.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/camlinternalFormatBasics.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/camlinternalLazy.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/camlinternalMod.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/camlinternalOO.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/dynlink.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/event.cmi
Binary file not shown.
Binary file removed src/worker/static/stdlib/nat.cmi
Binary file not shown.
Binary file removed src/worker/static/stdlib/num.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/profiling.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/runtime_events.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/std_exit.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Arg.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Array.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__ArrayLabels.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Atomic.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Bigarray.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Bool.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Buffer.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Bytes.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__BytesLabels.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Callback.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Char.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Complex.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Condition.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Digest.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Domain.cmi
Binary file not shown.
Binary file added src/worker/static/stdlib/stdlib__Dynarray.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Effect.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Either.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Ephemeron.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Filename.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Float.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Format.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Fun.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Gc.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Hashtbl.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__In_channel.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Int.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Int32.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Int64.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Lazy.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Lexing.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__List.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__ListLabels.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Map.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Marshal.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__MoreLabels.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Mutex.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Nativeint.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Obj.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Oo.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Option.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Out_channel.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Parsing.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Printexc.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Printf.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Queue.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Random.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Result.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Scanf.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Semaphore.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Seq.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Set.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Stack.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__StdLabels.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__String.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__StringLabels.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Sys.cmi
Binary file not shown.
Binary file added src/worker/static/stdlib/stdlib__Type.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Uchar.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Unit.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/stdlib__Weak.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/str.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/thread.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/topdirs.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/unix.cmi
Binary file not shown.
Binary file modified src/worker/static/stdlib/unixLabels.cmi
Binary file not shown.
17 changes: 8 additions & 9 deletions src/worker/worker.ml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@ let sync_get url =
None)
(fun b -> Some (Typed_array.String.of_arrayBuffer b))
| _ -> None

let filename_of_module unit_name =
Printf.sprintf "%s.cmi" (String.uncapitalize_ascii unit_name)

let reset_dirs () =
Ocaml_utils.Directory_content_cache.clear ();
let open Ocaml_utils.Load_path in
let dirs = get_paths () in
let { visible; hidden } = get_paths () in
reset ();
List.iter ~f:(fun p ->
prepend_dir (Dir.create p)) dirs
init ~auto_include:no_auto_include ~visible ~hidden

let add_dynamic_cmis dcs =
let open Ocaml_typing.Persistent_env.Persistent_signature in
Expand All @@ -49,10 +48,10 @@ let add_dynamic_cmis dcs =
Js_of_ocaml.Sys_js.create_file ~name ~content
| None -> ()) dcs.dcs_toplevel_modules;

let new_load ~unit_name =
let new_load ~allow_hidden ~unit_name =
let filename = filename_of_module unit_name in
let fs_name = Filename.(concat "/static/stdlib" filename) in
(* Check if it's already been downloaded. This will be the
(* Check if it's already been downloaded. This will be the
case for all toplevel cmis. Also check whether we're supposed
to handle this cmi *)
if
Expand All @@ -70,18 +69,18 @@ let add_dynamic_cmis dcs =
Printf.eprintf "Warning: Expected to find cmi at: %s\n%!"
(Filename.concat dcs.Protocol.dcs_url filename)
end;
old_loader ~unit_name
old_loader ~allow_hidden ~unit_name
in
load := new_load

let add_cmis { Protocol.static_cmis; dynamic_cmis } =
List.iter static_cmis ~f:(fun { Protocol.sc_name; sc_content } ->
let filename = Printf.sprintf "%s.cmi" (String.uncapitalize_ascii sc_name) in
let name = Filename.(concat "/static/stdlib" filename) in
Js_of_ocaml.Sys_js.create_file ~name ~content:sc_content);
Option.iter ~f:add_dynamic_cmis dynamic_cmis;
Protocol.Added_cmis

let config =
let initial = Mconfig.initial in
{ initial with
Expand Down

0 comments on commit 6ecda9f

Please sign in to comment.