this repo has no description

Re-enable directives cram test with robust synchronization

- Restore comprehensive directives test (850+ lines) that was temporarily disabled
- Update expected outputs for current environment (OCaml 5.4.0)

Test infrastructure improvements:
- Socket path configurable via JS_TOP_WORKER_SOCK environment variable
- Worker forks: parent blocks until child is ready, then prints child PID and exits
- Child redirects stdout/stderr to /dev/null so shell $() capture completes
- No polling, no sleeps - deterministic pipe-based synchronization
- Each test uses unique socket path for parallel test isolation

Usage:
WORKER_PID=$(unix_worker) # Blocks until ready, returns child PID
unix_client init ... # Guaranteed to connect immediately
kill $WORKER_PID # Clean shutdown

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

+921 -34
-8
example/unix_client.ml
··· 25 25 Transport.Json.response_of_string (Bytes.unsafe_to_string msg_buf) 26 26 in 27 27 response 28 - (* 29 - let server_cmd = 30 - let doc = "Start the server" in 31 - Cmdliner.(Cmd.v 32 - (Cmd.info "server" ~doc ) 33 - (Term.(const Example2_server.start_server $ const ()))) 34 - *) 35 28 36 29 let cli () = 37 30 let default = ··· 40 33 let info = Cmdliner.Cmd.info "cli" ~version:"1.6.1" ~doc:"a cli for an API" in 41 34 let rpc = binary_rpc Toplevel_api_gen.sockpath in 42 35 let cmds = 43 - (* server_cmd :: *) 44 36 List.map 45 37 (fun t -> 46 38 let term, info = t rpc in
+31 -5
example/unix_worker.ml
··· 80 80 in 81 81 p_mkdir dir 82 82 83 - let serve_requests rpcfn path = 83 + let serve_requests rpcfn path ~ready_fd = 84 84 let ( let* ) = Lwt.bind in 85 85 (try Unix.unlink path with Unix.Unix_error (Unix.ENOENT, _, _) -> ()); 86 86 mkdir_rec (Filename.dirname path) 0o0755; 87 87 let sock = Lwt_unix.socket Unix.PF_UNIX Unix.SOCK_STREAM 0 in 88 88 let* () = Lwt_unix.bind sock (Unix.ADDR_UNIX path) in 89 89 Lwt_unix.listen sock 5; 90 + (* Signal readiness via pipe to parent process *) 91 + (match ready_fd with 92 + | Some fd -> 93 + ignore (Unix.write fd (Bytes.of_string "R") 0 1); 94 + Unix.close fd 95 + | None -> ()); 90 96 let rec loop () = 91 97 let* this_connection, _ = Lwt_unix.accept sock in 92 98 let* () = ··· 160 166 let _ = Location.report_exception ppf exn in 161 167 () *) 162 168 163 - let start_server () = 169 + let start_server ~ready_fd = 164 170 let open U in 165 171 Logs.set_reporter (Logs_fmt.reporter ()); 166 172 Logs.set_level (Some Logs.Warning); 167 - (* let pid = Unix.getpid () in *) 168 173 Server.init (IdlM.T.lift init); 169 174 Server.create_env (IdlM.T.lift create_env); 170 175 Server.destroy_env (IdlM.T.lift destroy_env); ··· 182 187 rpc_fn call >>= fun response -> 183 188 Js_top_worker_rpc.Transport.Json.string_of_response ~id:(Rpc.Int 0L) response |> return 184 189 in 185 - serve_requests process Js_top_worker_rpc.Toplevel_api_gen.sockpath 190 + serve_requests process Js_top_worker_rpc.Toplevel_api_gen.sockpath ~ready_fd 186 191 187 - let _ = Lwt_main.run (start_server ()) 192 + let () = 193 + (* Fork so parent only exits once child is ready to accept connections *) 194 + let read_fd, write_fd = Unix.pipe ~cloexec:false () in 195 + match Unix.fork () with 196 + | 0 -> 197 + (* Child: close read end and detach from terminal *) 198 + Unix.close read_fd; 199 + (* Redirect stdout/stderr to /dev/null so parent's $() can complete *) 200 + let dev_null = Unix.openfile "/dev/null" [Unix.O_RDWR] 0 in 201 + Unix.dup2 dev_null Unix.stdout; 202 + Unix.dup2 dev_null Unix.stderr; 203 + Unix.close dev_null; 204 + (* Run server, signal via write end *) 205 + Lwt_main.run (start_server ~ready_fd:(Some write_fd)) 206 + | child_pid -> 207 + (* Parent: close write end, wait for ready signal, print child PID, exit *) 208 + Unix.close write_fd; 209 + let buf = Bytes.create 1 in 210 + ignore (Unix.read read_fd buf 0 1); 211 + Unix.close read_fd; 212 + Printf.printf "%d\n%!" child_pid 213 + (* Parent exits here, child continues serving *)
+4 -1
idl/toplevel_api.ml
··· 3 3 open Rpc 4 4 open Idl 5 5 6 - let sockpath = "/tmp/js_top_worker.sock" 6 + let sockpath = 7 + match Sys.getenv_opt "JS_TOP_WORKER_SOCK" with 8 + | Some path -> path 9 + | None -> "/tmp/js_top_worker.sock" 7 10 8 11 open Merlin_kernel 9 12 module Location = Ocaml_parsing.Location
+4 -1
idl/toplevel_api_gen.ml
··· 19 19 [@@@ocaml.text " IDL for talking to the toplevel webworker "] 20 20 open Rpc 21 21 open Idl 22 - let sockpath = "/tmp/js_top_worker.sock" 22 + let sockpath = 23 + match Sys.getenv_opt "JS_TOP_WORKER_SOCK" with 24 + | Some path -> path 25 + | None -> "/tmp/js_top_worker.sock" 23 26 open Merlin_kernel 24 27 module Location = Ocaml_parsing.Location 25 28 type lexing_position = Lexing.position =
+853 -3
test/cram/directives.t/run.t
··· 1 1 Comprehensive test suite for OCaml toplevel directives. 2 - This test is currently disabled pending proper expected output capture. 2 + Most tests will initially FAIL - this is TDD! 3 + 4 + References: 5 + - OCaml Manual: https://ocaml.org/manual/5.4/toplevel.html 6 + - Findlib: http://projects.camlcity.org/projects/dl/findlib-1.7.1/doc/ref-html/lib/Topfind.html 7 + 8 + $ export OCAMLRUNPARAM=b 9 + $ export JS_TOP_WORKER_SOCK="/tmp/js_top_worker_directives_$$.sock" 10 + $ WORKER_PID=$(sh ../start_worker.sh) 11 + $ unix_client init '{ findlib_requires:[], execute: true }' 12 + N 13 + $ unix_client setup '' 14 + {mime_vals:[];stderr:S(error while evaluating #enable "pretty";; 15 + error while evaluating #disable "shortvar";;);stdout:S(OCaml version 5.4.0 16 + Unknown directive enable. 17 + Unknown directive disable.)} 18 + 19 + ============================================== 20 + SECTION 1: Basic Code Execution (Baseline) 21 + ============================================== 22 + 23 + $ unix_client exec_toplevel '' '# 1 + 2;;' 24 + {mime_vals:[];parts:[];script:S(# 1 + 2;; 25 + - : int = 3)} 26 + 27 + $ unix_client exec_toplevel '' '# let x = 42;;' 28 + {mime_vals:[];parts:[];script:S(# let x = 42;; 29 + val x : int = 42)} 30 + 31 + ============================================== 32 + SECTION 2: #show Directives (Environment Query) 33 + ============================================== 34 + 35 + Define some types and values to query: 36 + 37 + $ unix_client exec_toplevel '' '# type point = { x: float; y: float };;' 38 + {mime_vals:[];parts:[];script:S(# type point = { x: float; y: float };; 39 + type point = { x : float; y : float; })} 40 + 41 + $ unix_client exec_toplevel '' '# let origin = { x = 0.0; y = 0.0 };;' 42 + {mime_vals:[];parts:[];script:S(# let origin = { x = 0.0; y = 0.0 };; 43 + val origin : point = {x = 0.; y = 0.})} 44 + 45 + $ unix_client exec_toplevel '' '# module MyMod = struct type t = int let zero = 0 end;;' 46 + {mime_vals:[];parts:[];script:S(# module MyMod = struct type t = int let zero = 0 end;; 47 + module MyMod : sig type t = int val zero : int end)} 48 + 49 + $ unix_client exec_toplevel '' '# exception My_error of string;;' 50 + {mime_vals:[];parts:[];script:S(# exception My_error of string;; 51 + exception My_error of string)} 52 + 53 + Test #show directive: 54 + 55 + $ unix_client exec_toplevel '' '# #show point;;' 56 + {mime_vals:[];parts:[];script:S(# #show point;; 57 + type point = { x : float; y : float; })} 58 + 59 + $ unix_client exec_toplevel '' '# #show origin;;' 60 + {mime_vals:[];parts:[];script:S(# #show origin;; 61 + val origin : point)} 62 + 63 + $ unix_client exec_toplevel '' '# #show MyMod;;' 64 + {mime_vals:[];parts:[];script:S(# #show MyMod;; 65 + module MyMod : sig type t = int val zero : int end)} 66 + 67 + $ unix_client exec_toplevel '' '# #show My_error;;' 68 + {mime_vals:[];parts:[];script:S(# #show My_error;; 69 + exception My_error of string)} 70 + 71 + Test #show_type directive: 72 + 73 + $ unix_client exec_toplevel '' '# #show_type point;;' 74 + {mime_vals:[];parts:[];script:S(# #show_type point;; 75 + type point = { x : float; y : float; })} 76 + 77 + $ unix_client exec_toplevel '' '# #show_type list;;' 78 + {mime_vals:[];parts:[];script:S(# #show_type list;; 79 + type 'a list = [] | (::) of 'a * 'a list)} 80 + 81 + Test #show_val directive: 82 + 83 + $ unix_client exec_toplevel '' '# #show_val origin;;' 84 + {mime_vals:[];parts:[];script:S(# #show_val origin;; 85 + val origin : point)} 86 + 87 + $ unix_client exec_toplevel '' '# #show_val List.map;;' 88 + {mime_vals:[];parts:[];script:S(# #show_val List.map;; 89 + val map : ('a -> 'b) -> 'a list -> 'b list)} 3 90 4 - $ echo "Test disabled - run simple.t instead" 5 - Test disabled - run simple.t instead 91 + Test #show_module directive: 92 + 93 + $ unix_client exec_toplevel '' '# #show_module List;;' 94 + {mime_vals:[];parts:[];script:S(# #show_module List;; 95 + module List : 96 + sig 97 + type 'a t = 'a list = [] | (::) of 'a * 'a list 98 + val length : 'a list -> int 99 + val compare_lengths : 'a list -> 'b list -> int 100 + val compare_length_with : 'a list -> int -> int 101 + val is_empty : 'a list -> bool 102 + val cons : 'a -> 'a list -> 'a list 103 + val singleton : 'a -> 'a list 104 + val hd : 'a list -> 'a 105 + val tl : 'a list -> 'a list 106 + val nth : 'a list -> int -> 'a 107 + val nth_opt : 'a list -> int -> 'a option 108 + val rev : 'a list -> 'a list 109 + val init : int -> (int -> 'a) -> 'a list 110 + val append : 'a list -> 'a list -> 'a list 111 + val rev_append : 'a list -> 'a list -> 'a list 112 + val concat : 'a list list -> 'a list 113 + val flatten : 'a list list -> 'a list 114 + val equal : ('a -> 'a -> bool) -> 'a list -> 'a list -> bool 115 + val compare : ('a -> 'a -> int) -> 'a list -> 'a list -> int 116 + val iter : ('a -> unit) -> 'a list -> unit 117 + val iteri : (int -> 'a -> unit) -> 'a list -> unit 118 + val map : ('a -> 'b) -> 'a list -> 'b list 119 + val mapi : (int -> 'a -> 'b) -> 'a list -> 'b list 120 + val rev_map : ('a -> 'b) -> 'a list -> 'b list 121 + val filter_map : ('a -> 'b option) -> 'a list -> 'b list 122 + val concat_map : ('a -> 'b list) -> 'a list -> 'b list 123 + val fold_left_map : 124 + ('acc -> 'a -> 'acc * 'b) -> 'acc -> 'a list -> 'acc * 'b list 125 + val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a list -> 'acc 126 + val fold_right : ('a -> 'acc -> 'acc) -> 'a list -> 'acc -> 'acc 127 + val iter2 : ('a -> 'b -> unit) -> 'a list -> 'b list -> unit 128 + val map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list 129 + val rev_map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list 130 + val fold_left2 : 131 + ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a list -> 'b list -> 'acc 132 + val fold_right2 : 133 + ('a -> 'b -> 'acc -> 'acc) -> 'a list -> 'b list -> 'acc -> 'acc 134 + val for_all : ('a -> bool) -> 'a list -> bool 135 + val exists : ('a -> bool) -> 'a list -> bool 136 + val for_all2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool 137 + val exists2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool 138 + val mem : 'a -> 'a list -> bool 139 + val memq : 'a -> 'a list -> bool 140 + val find : ('a -> bool) -> 'a list -> 'a 141 + val find_opt : ('a -> bool) -> 'a list -> 'a option 142 + val find_index : ('a -> bool) -> 'a list -> int option 143 + val find_map : ('a -> 'b option) -> 'a list -> 'b option 144 + val find_mapi : (int -> 'a -> 'b option) -> 'a list -> 'b option 145 + val filter : ('a -> bool) -> 'a list -> 'a list 146 + val find_all : ('a -> bool) -> 'a list -> 'a list 147 + val filteri : (int -> 'a -> bool) -> 'a list -> 'a list 148 + val take : int -> 'a list -> 'a list 149 + val drop : int -> 'a list -> 'a list 150 + val take_while : ('a -> bool) -> 'a list -> 'a list 151 + val drop_while : ('a -> bool) -> 'a list -> 'a list 152 + val partition : ('a -> bool) -> 'a list -> 'a list * 'a list 153 + val partition_map : 154 + ('a -> ('b, 'c) Either.t) -> 'a list -> 'b list * 'c list 155 + val assoc : 'a -> ('a * 'b) list -> 'b 156 + val assoc_opt : 'a -> ('a * 'b) list -> 'b option 157 + val assq : 'a -> ('a * 'b) list -> 'b 158 + val assq_opt : 'a -> ('a * 'b) list -> 'b option 159 + val mem_assoc : 'a -> ('a * 'b) list -> bool 160 + val mem_assq : 'a -> ('a * 'b) list -> bool 161 + val remove_assoc : 'a -> ('a * 'b) list -> ('a * 'b) list 162 + val remove_assq : 'a -> ('a * 'b) list -> ('a * 'b) list 163 + val split : ('a * 'b) list -> 'a list * 'b list 164 + val combine : 'a list -> 'b list -> ('a * 'b) list 165 + val sort : ('a -> 'a -> int) -> 'a list -> 'a list 166 + val stable_sort : ('a -> 'a -> int) -> 'a list -> 'a list 167 + val fast_sort : ('a -> 'a -> int) -> 'a list -> 'a list 168 + val sort_uniq : ('a -> 'a -> int) -> 'a list -> 'a list 169 + val merge : ('a -> 'a -> int) -> 'a list -> 'a list -> 'a list 170 + val to_seq : 'a list -> 'a Seq.t 171 + val of_seq : 'a Seq.t -> 'a list 172 + end)} 173 + 174 + Test #show_exception directive: 175 + 176 + $ unix_client exec_toplevel '' '# #show_exception Not_found;;' 177 + {mime_vals:[];parts:[];script:S(# #show_exception Not_found;; 178 + exception Not_found)} 179 + 180 + $ unix_client exec_toplevel '' '# #show_exception Invalid_argument;;' 181 + {mime_vals:[];parts:[];script:S(# #show_exception Invalid_argument;; 182 + exception Invalid_argument of string)} 183 + 184 + ============================================== 185 + SECTION 3: #print_depth and #print_length 186 + ============================================== 187 + 188 + $ unix_client exec_toplevel '' '# let nested = [[[[1;2;3]]]];;' 189 + {mime_vals:[];parts:[];script:S(# let nested = [[[[1;2;3]]]];; 190 + val nested : int list list list list = [[[[1; 2; 3]]]])} 191 + 192 + Test #print_depth: 193 + 194 + $ unix_client exec_toplevel '' '# #print_depth 2;;' 195 + {mime_vals:[];parts:[];script:S(# #print_depth 2;;)} 196 + 197 + $ unix_client exec_toplevel '' '# nested;;' 198 + {mime_vals:[];parts:[];script:S(# nested;; 199 + - : int list list list list = [[[...]]])} 200 + 201 + $ unix_client exec_toplevel '' '# #print_depth 100;;' 202 + {mime_vals:[];parts:[];script:S(# #print_depth 100;;)} 203 + 204 + $ unix_client exec_toplevel '' '# nested;;' 205 + {mime_vals:[];parts:[];script:S(# nested;; 206 + - : int list list list list = [[[[1; 2; 3]]]])} 207 + 208 + Test #print_length: 209 + 210 + $ unix_client exec_toplevel '' '# let long_list = [1;2;3;4;5;6;7;8;9;10];;' 211 + {mime_vals:[];parts:[];script:S(# let long_list = [1;2;3;4;5;6;7;8;9;10];; 212 + val long_list : int list = [1; 2; 3; 4; 5; 6; 7; 8; 9; 10])} 213 + 214 + $ unix_client exec_toplevel '' '# #print_length 3;;' 215 + {mime_vals:[];parts:[];script:S(# #print_length 3;;)} 216 + 217 + $ unix_client exec_toplevel '' '# long_list;;' 218 + {mime_vals:[];parts:[];script:S(# long_list;; 219 + - : int list = [1; 2; ...])} 220 + 221 + $ unix_client exec_toplevel '' '# #print_length 100;;' 222 + {mime_vals:[];parts:[];script:S(# #print_length 100;;)} 223 + 224 + ============================================== 225 + SECTION 4: #install_printer and #remove_printer 226 + ============================================== 227 + 228 + $ unix_client exec_toplevel '' '# type color = Red | Green | Blue;;' 229 + {mime_vals:[];parts:[];script:S(# type color = Red | Green | Blue;; 230 + type color = Red | Green | Blue)} 231 + 232 + $ unix_client exec_toplevel '' '# let pp_color fmt c = Format.fprintf fmt "<color:%s>" (match c with Red -> "red" | Green -> "green" | Blue -> "blue");;' 233 + {mime_vals:[];parts:[];script:S(# let pp_color fmt c = Format.fprintf fmt "<color:%s>" (match c with Red -> "red" | Green -> "green" | Blue -> "blue");; 234 + val pp_color : Format.formatter -> color -> unit = <fun>)} 235 + 236 + Test #install_printer: 237 + 238 + $ unix_client exec_toplevel '' '# #install_printer pp_color;;' 239 + {mime_vals:[];parts:[];script:S(# #install_printer pp_color;;)} 240 + 241 + $ unix_client exec_toplevel '' '# Red;;' 242 + {mime_vals:[];parts:[];script:S(# Red;; 243 + - : color = <color:red>)} 244 + 245 + $ unix_client exec_toplevel '' '# [Red; Green; Blue];;' 246 + {mime_vals:[];parts:[];script:S(# [Red; Green; Blue];; 247 + - : color list = [<color:red>; <color:green>; <color:blue>])} 248 + 249 + Test #remove_printer: 250 + 251 + $ unix_client exec_toplevel '' '# #remove_printer pp_color;;' 252 + {mime_vals:[];parts:[];script:S(# #remove_printer pp_color;;)} 253 + 254 + $ unix_client exec_toplevel '' '# Red;;' 255 + {mime_vals:[];parts:[];script:S(# Red;; 256 + - : color = Red)} 257 + 258 + ============================================== 259 + SECTION 5: #warnings and #warn_error 260 + ============================================== 261 + 262 + $ unix_client exec_toplevel '' '# #warnings "-26";;' 263 + {mime_vals:[];parts:[];script:S(# #warnings "-26";;)} 264 + 265 + Code with unused variable should not warn: 266 + 267 + $ unix_client exec_toplevel '' '# let _ = let unused = 1 in 2;;' 268 + {mime_vals:[];parts:[];script:S(# let _ = let unused = 1 in 2;; 269 + - : int = 2)} 270 + 271 + Re-enable warning: 272 + 273 + $ unix_client exec_toplevel '' '# #warnings "+26";;' 274 + {mime_vals:[];parts:[];script:S(# #warnings "+26";;)} 275 + 276 + Now should warn: 277 + 278 + $ unix_client exec_toplevel '' '# let _ = let unused2 = 1 in 2;;' 279 + {mime_vals:[];parts:[];script:S(# let _ = let unused2 = 1 in 2;; 280 + Line 1, characters 12-19: 281 + Warning 26 [unused-var]: unused variable unused2. 282 + - : int = 2)} 283 + 284 + Test #warn_error: 285 + 286 + $ unix_client exec_toplevel '' '# #warn_error "+26";;' 287 + {mime_vals:[];parts:[];script:S(# #warn_error "+26";;)} 288 + 289 + $ unix_client exec_toplevel '' '# let _ = let unused3 = 1 in 2;;' 290 + {mime_vals:[];parts:[];script:S(# let _ = let unused3 = 1 in 2;; 291 + Line 1, characters 12-19: 292 + Error (warning 26 [unused-var]): unused variable unused3.)} 293 + 294 + Reset: 295 + 296 + $ unix_client exec_toplevel '' '# #warn_error "-a";;' 297 + {mime_vals:[];parts:[];script:S(# #warn_error "-a";;)} 298 + 299 + ============================================== 300 + SECTION 6: #rectypes 301 + ============================================== 302 + 303 + Without rectypes, recursive type should fail: 304 + 305 + $ unix_client exec_toplevel '' "# type 'a t = 'a t -> int;;" 306 + {mime_vals:[];parts:[];script:S(# type 'a t = 'a t -> int;; 307 + Line 1, characters 0-23: 308 + Error: The type abbreviation t is cyclic: 309 + 'a t = 'a t -> int, 310 + 'a t -> int contains 'a t)} 311 + 312 + Enable rectypes: 313 + 314 + $ unix_client exec_toplevel '' '# #rectypes;;' 315 + {mime_vals:[];parts:[];script:S(# #rectypes;;)} 316 + 317 + Now recursive type should work: 318 + 319 + $ unix_client exec_toplevel '' "# type 'a u = 'a u -> int;;" 320 + {mime_vals:[];parts:[];script:S(# type 'a u = 'a u -> int;; 321 + type 'a u = 'a u -> int)} 322 + 323 + ============================================== 324 + SECTION 7: #directory 325 + ============================================== 326 + 327 + $ unix_client exec_toplevel '' '# #directory "/tmp";;' 328 + {mime_vals:[];parts:[];script:S(# #directory "/tmp";;)} 329 + 330 + $ unix_client exec_toplevel '' '# #remove_directory "/tmp";;' 331 + {mime_vals:[];parts:[];script:S(# #remove_directory "/tmp";;)} 332 + 333 + ============================================== 334 + SECTION 8: #help 335 + ============================================== 336 + 337 + $ unix_client exec_toplevel '' '# #help;;' 338 + {mime_vals:[];parts:[];script:S(# #help;; 339 + General 340 + #help 341 + Prints a list of all available directives, with corresponding argument type 342 + if appropriate. 343 + #quit 344 + Exit the toplevel. 345 + 346 + Loading code 347 + #cd <str> 348 + Change the current working directory. 349 + #directory <str> 350 + Add the given directory to search path for source and compiled files. 351 + #load <str> 352 + Load in memory a bytecode object, produced by ocamlc. 353 + #load_rec <str> 354 + As #load, but loads dependencies recursively. 355 + #mod_use <str> 356 + Usage is identical to #use but #mod_use wraps the contents in a module. 357 + #remove_directory <str> 358 + Remove the given directory from the search path. 359 + #show_dirs 360 + List directories currently in the search path. 361 + #use <str> 362 + Read, compile and execute source phrases from the given file. 363 + #use_output <str> 364 + Execute a command and read, compile and execute source phrases from its 365 + output. 366 + 367 + Environment queries 368 + #show <ident> 369 + Print the signatures of components from any of the categories below. 370 + #show_class <ident> 371 + Print the signature of the corresponding class. 372 + #show_class_type <ident> 373 + Print the signature of the corresponding class type. 374 + #show_constructor <ident> 375 + Print the signature of the corresponding value constructor. 376 + #show_exception <ident> 377 + Print the signature of the corresponding exception. 378 + #show_module <ident> 379 + Print the signature of the corresponding module. 380 + #show_module_type <ident> 381 + Print the signature of the corresponding module type. 382 + #show_type <ident> 383 + Print the signature of the corresponding type constructor. 384 + #show_val <ident> 385 + Print the signature of the corresponding value. 386 + 387 + Findlib 388 + #require <str> 389 + Load a package (js_top_worker) 390 + #require <str> 391 + Load a package (js_top_worker) 392 + 393 + Pretty-printing 394 + #install_printer <ident> 395 + Registers a printer for values of a certain type. 396 + #print_depth <int> 397 + Limit the printing of values to a maximal depth of n. 398 + #print_length <int> 399 + Limit the number of value nodes printed to at most n. 400 + #remove_printer <ident> 401 + Remove the named function from the table of toplevel printers. 402 + 403 + Tracing 404 + #trace <ident> 405 + All calls to the function named function-name will be traced. 406 + #untrace <ident> 407 + Stop tracing the given function. 408 + #untrace_all 409 + Stop tracing all functions traced so far. 410 + 411 + Compiler options 412 + #debug <bool> 413 + Choose whether to generate debugging events. 414 + #labels <bool> 415 + Choose whether to ignore labels in function types. 416 + #ppx <str> 417 + After parsing, pipe the abstract syntax tree through the preprocessor 418 + command. 419 + #principal <bool> 420 + Make sure that all types are derived in a principal way. 421 + #rectypes 422 + Allow arbitrary recursive types during type-checking. 423 + #warn_error <str> 424 + Treat as errors the warnings enabled by the argument. 425 + #warnings <str> 426 + Enable or disable warnings according to the argument. 427 + 428 + Undocumented 429 + #camlp4o 430 + #camlp4r 431 + #list 432 + #predicates <str> 433 + #thread)} 434 + 435 + ============================================== 436 + SECTION 9: #use (File Loading) 437 + ============================================== 438 + 439 + Create a test file: 440 + 441 + $ cat > /tmp/test_use.ml << 'EOF' 442 + > let from_file = "loaded via #use" 443 + > let add x y = x + y 444 + > EOF 445 + 446 + $ unix_client exec_toplevel '' '# #use "/tmp/test_use.ml";;' 447 + {mime_vals:[];parts:[];script:S(# #use "/tmp/test_use.ml";; 448 + val from_file : string = "loaded via #use" 449 + 450 + val add : int -> int -> int = <fun>)} 451 + 452 + $ unix_client exec_toplevel '' '# from_file;;' 453 + {mime_vals:[];parts:[];script:S(# from_file;; 454 + - : string = "loaded via #use")} 455 + 456 + $ unix_client exec_toplevel '' '# add 1 2;;' 457 + {mime_vals:[];parts:[];script:S(# add 1 2;; 458 + - : int = 3)} 459 + 460 + ============================================== 461 + SECTION 10: #mod_use 462 + ============================================== 463 + 464 + Create a test file: 465 + 466 + $ cat > /tmp/test_mod.ml << 'EOF' 467 + > let value = 42 468 + > type t = A | B 469 + > EOF 470 + 471 + $ unix_client exec_toplevel '' '# #mod_use "/tmp/test_mod.ml";;' 472 + {mime_vals:[];parts:[];script:S(# #mod_use "/tmp/test_mod.ml";; 473 + module Test_mod : sig val value : int type t = A | B end)} 474 + 475 + $ unix_client exec_toplevel '' '# Test_mod.value;;' 476 + {mime_vals:[];parts:[];script:S(# Test_mod.value;; 477 + - : int = 42)} 478 + 479 + ============================================== 480 + SECTION 11: Findlib #require 481 + ============================================== 482 + 483 + $ unix_client exec_toplevel '' '# #require "str";;' 484 + {mime_vals:[];parts:[];script:S(# #require "str";; 485 + /home/jons-agent/.opam/default/lib/ocaml/str: added to search path)} 486 + 487 + $ unix_client exec_toplevel '' '# Str.regexp "test";;' 488 + {mime_vals:[];parts:[];script:S(# Str.regexp "test";; 489 + - : Str.regexp = <abstr>)} 490 + 491 + ============================================== 492 + SECTION 12: Findlib #list 493 + ============================================== 494 + 495 + $ unix_client exec_toplevel '' '# #list;;' 496 + {mime_vals:[];parts:[];script:S(# #list;; 497 + angstrom (version: 0.16.1) 498 + angstrom.async (version: n/a) 499 + angstrom.lwt-unix (version: n/a) 500 + angstrom.unix (version: n/a) 501 + astring (version: 0.8.5) 502 + astring.top (version: 0.8.5) 503 + base (version: v0.17.3) 504 + base.base_internalhash_types (version: v0.17.3) 505 + base.md5 (version: v0.17.3) 506 + base.shadow_stdlib (version: v0.17.3) 507 + base64 (version: 3.5.2) 508 + base64.rfc2045 (version: 3.5.2) 509 + bigstringaf (version: 0.10.0) 510 + bos (version: 0.2.1) 511 + bos.setup (version: 0.2.1) 512 + bos.top (version: 0.2.1) 513 + brr (version: 0.0.8) 514 + brr.ocaml_poke (version: 0.0.8) 515 + brr.ocaml_poke_ui (version: 0.0.8) 516 + brr.poke (version: 0.0.8) 517 + brr.poked (version: 0.0.8) 518 + bytes (version: [distributed with OCaml 4.02 or above]) 519 + bytesrw (version: 0.3.0) 520 + bytesrw.sysrandom (version: 0.3.0) 521 + bytesrw.unix (version: 0.3.0) 522 + cbort (version: 2b102ae) 523 + chrome-trace (version: 1.6.2-12057-g12f9ecb) 524 + cmdliner (version: 2.1.0) 525 + compiler-libs (version: 5.4.0) 526 + compiler-libs.bytecomp (version: 5.4.0) 527 + compiler-libs.common (version: 5.4.0) 528 + compiler-libs.native-toplevel (version: 5.4.0) 529 + compiler-libs.optcomp (version: 5.4.0) 530 + compiler-libs.toplevel (version: 5.4.0) 531 + cppo (version: n/a) 532 + csexp (version: 1.5.2) 533 + cstruct (version: 6.2.0) 534 + domain-local-await (version: 1.0.1) 535 + dune (version: n/a) 536 + dune-action-plugin (version: 1.6.2-12057-g12f9ecb) 537 + dune-build-info (version: 1.6.2-12057-g12f9ecb) 538 + dune-configurator (version: 1.6.2-12057-g12f9ecb) 539 + dune-glob (version: 1.6.2-12057-g12f9ecb) 540 + dune-private-libs (version: n/a) 541 + dune-private-libs.dune-section (version: 1.6.2-12057-g12f9ecb) 542 + dune-private-libs.meta_parser (version: 1.6.2-12057-g12f9ecb) 543 + dune-rpc (version: 1.6.2-12057-g12f9ecb) 544 + dune-rpc-lwt (version: 1.6.2-12057-g12f9ecb) 545 + dune-rpc.private (version: 1.6.2-12057-g12f9ecb) 546 + dune-site (version: 1.6.2-12057-g12f9ecb) 547 + dune-site.dynlink (version: 1.6.2-12057-g12f9ecb) 548 + dune-site.linker (version: 1.6.2-12057-g12f9ecb) 549 + dune-site.plugins (version: 1.6.2-12057-g12f9ecb) 550 + dune-site.private (version: 1.6.2-12057-g12f9ecb) 551 + dune-site.toplevel (version: 1.6.2-12057-g12f9ecb) 552 + dune.configurator (version: n/a) 553 + dyn (version: 1.6.2-12057-g12f9ecb) 554 + dynlink (version: 5.4.0) 555 + eio (version: n/a) 556 + eio.core (version: n/a) 557 + eio.mock (version: n/a) 558 + eio.runtime_events (version: n/a) 559 + eio.unix (version: n/a) 560 + eio.utils (version: n/a) 561 + eio_linux (version: n/a) 562 + eio_main (version: n/a) 563 + eio_posix (version: n/a) 564 + findlib (version: 1.9.8) 565 + findlib.dynload (version: 1.9.8) 566 + findlib.internal (version: 1.9.8) 567 + findlib.top (version: 1.9.8) 568 + fmt (version: 0.11.0) 569 + fmt.cli (version: 0.11.0) 570 + fmt.top (version: 0.11.0) 571 + fmt.tty (version: 0.11.0) 572 + fpath (version: 0.7.3) 573 + fpath.top (version: 0.7.3) 574 + fs-io (version: 1.6.2-12057-g12f9ecb) 575 + gen (version: 1.1) 576 + hmap (version: 0.8.1) 577 + iomux (version: v0.4) 578 + jane-street-headers (version: v0.17.0) 579 + js_of_ocaml (version: 6.2.0) 580 + js_of_ocaml-compiler (version: 6.2.0) 581 + js_of_ocaml-compiler.dynlink (version: 6.2.0) 582 + js_of_ocaml-compiler.findlib-support (version: 6.2.0) 583 + js_of_ocaml-compiler.runtime (version: 6.2.0) 584 + js_of_ocaml-compiler.runtime-files (version: 6.2.0) 585 + js_of_ocaml-lwt (version: 6.2.0) 586 + js_of_ocaml-ppx (version: 6.2.0) 587 + js_of_ocaml-ppx.as-lib (version: 6.2.0) 588 + js_of_ocaml-toplevel (version: 6.2.0) 589 + js_of_ocaml.deriving (version: 6.2.0) 590 + js_top_worker (version: 0.0.1) 591 + js_top_worker-bin (version: n/a) 592 + js_top_worker-client (version: 0.0.1) 593 + js_top_worker-client.__private__ (version: n/a) 594 + js_top_worker-client.__private__.js_top_worker_client_msg (version: 0.0.1) 595 + js_top_worker-client_fut (version: 0.0.1) 596 + js_top_worker-rpc (version: 0.0.1) 597 + js_top_worker-rpc.__private__ (version: n/a) 598 + js_top_worker-rpc.__private__.js_top_worker_message (version: 0.0.1) 599 + js_top_worker-unix (version: n/a) 600 + js_top_worker-web (version: 0.0.1) 601 + js_top_worker_rpc_def (version: n/a) 602 + js_top_worker_rpc_def.__private__ (version: n/a) 603 + js_top_worker_rpc_def.__private__.js_top_worker_rpc_def (version: 0.0.1) 604 + jsonm (version: 1.0.2) 605 + jst-config (version: v0.17.0) 606 + logs (version: 0.10.0) 607 + logs.browser (version: 0.10.0) 608 + logs.cli (version: 0.10.0) 609 + logs.fmt (version: 0.10.0) 610 + logs.lwt (version: 0.10.0) 611 + logs.threaded (version: 0.10.0) 612 + logs.top (version: 0.10.0) 613 + lwt (version: 6.0.0) 614 + lwt-dllist (version: 1.1.0) 615 + lwt.unix (version: 6.0.0) 616 + menhir (version: n/a) 617 + menhirCST (version: 20260122) 618 + menhirGLR (version: 20260122) 619 + menhirLib (version: 20260122) 620 + menhirSdk (version: 20260122) 621 + merlin-lib (version: n/a) 622 + merlin-lib.analysis (version: 5.6.1-504) 623 + merlin-lib.commands (version: 5.6.1-504) 624 + merlin-lib.config (version: 5.6.1-504) 625 + merlin-lib.dot_protocol (version: 5.6.1-504) 626 + merlin-lib.extend (version: 5.6.1-504) 627 + merlin-lib.index_format (version: 5.6.1-504) 628 + merlin-lib.kernel (version: 5.6.1-504) 629 + merlin-lib.ocaml_compression (version: 5.6.1-504) 630 + merlin-lib.ocaml_merlin_specific (version: 5.6.1-504) 631 + merlin-lib.ocaml_parsing (version: 5.6.1-504) 632 + merlin-lib.ocaml_preprocess (version: 5.6.1-504) 633 + merlin-lib.ocaml_typing (version: 5.6.1-504) 634 + merlin-lib.ocaml_utils (version: 5.6.1-504) 635 + merlin-lib.os_ipc (version: 5.6.1-504) 636 + merlin-lib.query_commands (version: 5.6.1-504) 637 + merlin-lib.query_protocol (version: 5.6.1-504) 638 + merlin-lib.sherlodoc (version: 5.6.1-504) 639 + merlin-lib.utils (version: 5.6.1-504) 640 + mime_printer (version: e46cb08) 641 + mtime (version: 2.1.0) 642 + mtime.clock (version: 2.1.0) 643 + mtime.clock.os (version: 2.1.0) 644 + mtime.top (version: 2.1.0) 645 + ocaml-compiler-libs (version: n/a) 646 + ocaml-compiler-libs.bytecomp (version: v0.17.0) 647 + ocaml-compiler-libs.common (version: v0.17.0) 648 + ocaml-compiler-libs.optcomp (version: v0.17.0) 649 + ocaml-compiler-libs.shadow (version: v0.17.0) 650 + ocaml-compiler-libs.toplevel (version: v0.17.0) 651 + ocaml-syntax-shims (version: n/a) 652 + ocaml_intrinsics_kernel (version: v0.17.1) 653 + ocamlbuild (version: 0.16.1) 654 + ocamlc-loc (version: 1.6.2-12057-g12f9ecb) 655 + ocamldoc (version: 5.4.0) 656 + ocamlgraph (version: 2.2.0) 657 + ocplib-endian (version: n/a) 658 + ocplib-endian.bigstring (version: n/a) 659 + opam-core (version: n/a) 660 + opam-core.cmdliner (version: n/a) 661 + opam-file-format (version: 2.2.0) 662 + opam-format (version: n/a) 663 + optint (version: 0.3.0) 664 + ordering (version: 1.6.2-12057-g12f9ecb) 665 + patch (version: 3.1.0) 666 + pp (version: 2.0.0) 667 + ppx_assert (version: v0.17.0) 668 + ppx_assert.runtime-lib (version: v0.17.0) 669 + ppx_base (version: v0.17.0) 670 + ppx_cold (version: v0.17.0) 671 + ppx_compare (version: v0.17.0) 672 + ppx_compare.expander (version: v0.17.0) 673 + ppx_compare.runtime-lib (version: v0.17.0) 674 + ppx_derivers (version: n/a) 675 + ppx_deriving (version: n/a) 676 + ppx_deriving.api (version: 6.1.1) 677 + ppx_deriving.create (version: 6.1.1) 678 + ppx_deriving.enum (version: 6.1.1) 679 + ppx_deriving.eq (version: 6.1.1) 680 + ppx_deriving.fold (version: 6.1.1) 681 + ppx_deriving.iter (version: 6.1.1) 682 + ppx_deriving.make (version: 6.1.1) 683 + ppx_deriving.map (version: 6.1.1) 684 + ppx_deriving.ord (version: 6.1.1) 685 + ppx_deriving.runtime (version: 6.1.1) 686 + ppx_deriving.show (version: 6.1.1) 687 + ppx_deriving.std (version: 6.1.1) 688 + ppx_deriving_rpc (version: 10.0.0) 689 + ppx_enumerate (version: v0.17.0) 690 + ppx_enumerate.runtime-lib (version: v0.17.0) 691 + ppx_expect (version: v0.17.3) 692 + ppx_expect.config (version: v0.17.3) 693 + ppx_expect.config_types (version: v0.17.3) 694 + ppx_expect.evaluator (version: v0.17.3) 695 + ppx_expect.make_corrected_file (version: v0.17.3) 696 + ppx_expect.runtime (version: v0.17.3) 697 + ppx_globalize (version: v0.17.2) 698 + ppx_hash (version: v0.17.0) 699 + ppx_hash.expander (version: v0.17.0) 700 + ppx_hash.runtime-lib (version: v0.17.0) 701 + ppx_here (version: v0.17.0) 702 + ppx_here.expander (version: v0.17.0) 703 + ppx_here.runtime-lib (version: v0.17.0) 704 + ppx_inline_test (version: v0.17.1) 705 + ppx_inline_test.config (version: v0.17.1) 706 + ppx_inline_test.drop (version: v0.17.1) 707 + ppx_inline_test.libname (version: v0.17.1) 708 + ppx_inline_test.runner (version: v0.17.1) 709 + ppx_inline_test.runner.lib (version: v0.17.1) 710 + ppx_inline_test.runtime-lib (version: v0.17.1) 711 + ppx_optcomp (version: v0.17.1) 712 + ppx_sexp_conv (version: v0.17.1) 713 + ppx_sexp_conv.expander (version: v0.17.1) 714 + ppx_sexp_conv.runtime-lib (version: v0.17.1) 715 + ppxlib (version: 0.37.0) 716 + ppxlib.__private__ (version: n/a) 717 + ppxlib.__private__.ppx_foo_deriver (version: 0.37.0) 718 + ppxlib.ast (version: 0.37.0) 719 + ppxlib.astlib (version: 0.37.0) 720 + ppxlib.metaquot (version: 0.37.0) 721 + ppxlib.metaquot_lifters (version: 0.37.0) 722 + ppxlib.print_diff (version: 0.37.0) 723 + ppxlib.runner (version: 0.37.0) 724 + ppxlib.runner_as_ppx (version: 0.37.0) 725 + ppxlib.stdppx (version: 0.37.0) 726 + ppxlib.traverse (version: 0.37.0) 727 + ppxlib.traverse_builtins (version: 0.37.0) 728 + ppxlib_jane (version: v0.17.4) 729 + psq (version: 0.2.1) 730 + re (version: n/a) 731 + re.emacs (version: n/a) 732 + re.glob (version: n/a) 733 + re.pcre (version: n/a) 734 + re.perl (version: n/a) 735 + re.posix (version: n/a) 736 + re.str (version: n/a) 737 + result (version: 1.5) 738 + rpclib (version: 10.0.0) 739 + rpclib-lwt (version: 10.0.0) 740 + rpclib.cmdliner (version: 10.0.0) 741 + rpclib.core (version: 10.0.0) 742 + rpclib.internals (version: 10.0.0) 743 + rpclib.json (version: 10.0.0) 744 + rpclib.markdown (version: 10.0.0) 745 + rpclib.xml (version: 10.0.0) 746 + rresult (version: 0.7.0) 747 + rresult.top (version: 0.7.0) 748 + runtime_events (version: 5.4.0) 749 + sedlex (version: 3.7) 750 + sedlex.ppx (version: 3.7) 751 + sedlex.utils (version: 3.7) 752 + seq (version: [distributed with OCaml 4.07 or above]) 753 + sexplib0 (version: v0.17.0) 754 + sha (version: v1.15.4) 755 + stdio (version: v0.17.0) 756 + stdlib (version: 5.4.0) 757 + stdlib-shims (version: 0.3.0) 758 + stdune (version: 1.6.2-12057-g12f9ecb) 759 + str (version: 5.4.0) 760 + stringext (version: 1.6.0) 761 + swhid_core (version: n/a) 762 + thread-table (version: 1.0.0) 763 + threads (version: 5.4.0) 764 + threads.posix (version: [internal]) 765 + time_now (version: v0.17.0) 766 + top-closure (version: 1.6.2-12057-g12f9ecb) 767 + topkg (version: 1.1.1) 768 + tyxml (version: 4.6.0) 769 + tyxml.functor (version: 4.6.0) 770 + unix (version: 5.4.0) 771 + uri (version: 4.4.0) 772 + uri.services (version: 4.4.0) 773 + uri.services_full (version: 4.4.0) 774 + uring (version: v2.7.0) 775 + uutf (version: 1.0.4) 776 + xdg (version: 1.6.2-12057-g12f9ecb) 777 + xmlm (version: 1.4.0) 778 + yojson (version: 3.0.0) 779 + zarith (version: 1.14) 780 + zarith.top (version: 1.13) 781 + zarith_stubs_js (version: v0.17.0))} 782 + 783 + ============================================== 784 + SECTION 13: #labels and #principal 785 + ============================================== 786 + 787 + $ unix_client exec_toplevel '' '# #labels true;;' 788 + {mime_vals:[];parts:[];script:S(# #labels true;;)} 789 + 790 + $ unix_client exec_toplevel '' '# #labels false;;' 791 + {mime_vals:[];parts:[];script:S(# #labels false;;)} 792 + 793 + $ unix_client exec_toplevel '' '# #principal true;;' 794 + {mime_vals:[];parts:[];script:S(# #principal true;;)} 795 + 796 + $ unix_client exec_toplevel '' '# #principal false;;' 797 + {mime_vals:[];parts:[];script:S(# #principal false;;)} 798 + 799 + ============================================== 800 + SECTION 14: Error Cases 801 + ============================================== 802 + 803 + Unknown directive: 804 + 805 + $ unix_client exec_toplevel '' '# #unknown_directive;;' 806 + {mime_vals:[];parts:[];script:S(# #unknown_directive;; 807 + Unknown directive unknown_directive.)} 808 + 809 + #show with non-existent identifier: 810 + 811 + $ unix_client exec_toplevel '' '# #show nonexistent_value;;' 812 + {mime_vals:[];parts:[];script:S(# #show nonexistent_value;; 813 + Unknown element.)} 814 + 815 + #require non-existent package: 816 + 817 + $ unix_client exec_toplevel '' '# #require "nonexistent_package_12345";;' 818 + {mime_vals:[];parts:[];script:S(# #require "nonexistent_package_12345";; 819 + No such package: nonexistent_package_12345)} 820 + 821 + #use non-existent file: 822 + 823 + $ unix_client exec_toplevel '' '# #use "/nonexistent/file.ml";;' 824 + {mime_vals:[];parts:[];script:S(# #use "/nonexistent/file.ml";; 825 + Cannot find file /nonexistent/file.ml.)} 826 + 827 + ============================================== 828 + SECTION 15: #load (bytecode loading) 829 + ============================================== 830 + 831 + Note: #load may not work in js_of_ocaml context 832 + 833 + $ unix_client exec_toplevel '' '# #load "str.cma";;' 834 + {mime_vals:[];parts:[];script:S(# #load "str.cma";;)} 835 + 836 + ============================================== 837 + SECTION 16: Classes (#show_class) 838 + ============================================== 839 + 840 + $ unix_client exec_toplevel '' '# class counter = object val mutable n = 0 method incr = n <- n + 1 method get = n end;;' 841 + {mime_vals:[];parts:[];script:S(# class counter = object val mutable n = 0 method incr = n <- n + 1 method get = n end;; 842 + class counter : 843 + object val mutable n : int method get : int method incr : unit end)} 844 + 845 + $ unix_client exec_toplevel '' '# #show_class counter;;' 846 + {mime_vals:[];parts:[];script:S(# #show_class counter;; 847 + class counter : 848 + object val mutable n : int method get : int method incr : unit end)} 849 + 850 + ============================================== 851 + Cleanup 852 + ============================================== 853 + 854 + $ kill $WORKER_PID 2>/dev/null || true 855 + $ rm -f "$JS_TOP_WORKER_SOCK"
+1 -1
test/cram/dune
··· 1 1 (cram 2 - (deps %{bin:unix_worker} %{bin:unix_client})) 2 + (deps %{bin:unix_worker} %{bin:unix_client} start_worker.sh))
+10 -7
test/cram/simple.t/script.sh
··· 1 1 #!/bin/bash 2 2 3 + export OCAMLRUNPARAM=b 4 + export JS_TOP_WORKER_SOCK="/tmp/js_top_worker_simple_$$.sock" 3 5 4 - export OCAMLRUNPARAM=b 6 + cleanup() { 7 + [ -n "$WORKER_PID" ] && kill "$WORKER_PID" 2>/dev/null 8 + rm -f "$JS_TOP_WORKER_SOCK" 9 + } 10 + trap cleanup EXIT 5 11 6 - unix_worker & 7 - pid=$! 12 + rm -f "$JS_TOP_WORKER_SOCK" 8 13 9 - sleep 2 14 + # Worker prints child PID and only returns once ready 15 + WORKER_PID=$(unix_worker) 10 16 11 17 unix_client init '{ findlib_requires:[], execute: true }' 12 18 unix_client setup '' 13 19 unix_client exec_toplevel '' '# Printf.printf "Hello, world\n";;' 14 20 unix_client exec_toplevel '' "$(cat s1)" 15 21 unix_client exec_toplevel '' "$(cat s2)" 16 - 17 - kill $pid 18 -
+10
test/cram/start_worker.sh
··· 1 + #!/bin/bash 2 + # Start the worker - it prints child PID and only returns once ready 3 + 4 + if [ -z "$JS_TOP_WORKER_SOCK" ]; then 5 + echo "ERROR: JS_TOP_WORKER_SOCK not set" >&2 6 + exit 1 7 + fi 8 + 9 + rm -f "$JS_TOP_WORKER_SOCK" 10 + unix_worker
+1 -1
test/node/node_directive_test.expected
··· 145 145 Reading library: base.shadow_stdlib 146 146 Number of children: 0 147 147 node_directive_test.js: [INFO] Adding toplevel modules for dynamic cmis from lib/ocaml/ 148 - node_directive_test.js: [INFO] toplevel modules: Std_exit, CamlinternalFormatBasics, CamlinternalLazy, CamlinternalMod, Stdlib, CamlinternalOO, CamlinternalFormat 148 + node_directive_test.js: [INFO] toplevel modules: CamlinternalFormat, CamlinternalLazy, CamlinternalFormatBasics, CamlinternalMod, Std_exit, Stdlib, CamlinternalOO 149 149 node_directive_test.js: [INFO] init() finished 150 150 node_directive_test.js: [INFO] setup() for env default... 151 151 node_directive_test.js: [INFO] Fetching stdlib__Format.cmi
+1 -1
test/node/node_env_test.expected
··· 145 145 Reading library: base.shadow_stdlib 146 146 Number of children: 0 147 147 node_env_test.js: [INFO] Adding toplevel modules for dynamic cmis from lib/ocaml/ 148 - node_env_test.js: [INFO] toplevel modules: Std_exit, CamlinternalFormatBasics, CamlinternalLazy, CamlinternalMod, Stdlib, CamlinternalOO, CamlinternalFormat 148 + node_env_test.js: [INFO] toplevel modules: CamlinternalFormat, CamlinternalLazy, CamlinternalFormatBasics, CamlinternalMod, Std_exit, Stdlib, CamlinternalOO 149 149 node_env_test.js: [INFO] init() finished 150 150 --- Section 1: Default Environment --- 151 151 node_env_test.js: [INFO] setup() for env default...
+1 -1
test/node/node_mime_test.expected
··· 145 145 Reading library: base.shadow_stdlib 146 146 Number of children: 0 147 147 node_mime_test.js: [INFO] Adding toplevel modules for dynamic cmis from lib/ocaml/ 148 - node_mime_test.js: [INFO] toplevel modules: Std_exit, CamlinternalFormatBasics, CamlinternalLazy, CamlinternalMod, Stdlib, CamlinternalOO, CamlinternalFormat 148 + node_mime_test.js: [INFO] toplevel modules: CamlinternalFormat, CamlinternalLazy, CamlinternalFormatBasics, CamlinternalMod, Std_exit, Stdlib, CamlinternalOO 149 149 node_mime_test.js: [INFO] init() finished 150 150 node_mime_test.js: [INFO] setup() for env default... 151 151 node_mime_test.js: [INFO] Fetching stdlib__Format.cmi
+1 -1
test/node/node_ppx_test.expected
··· 145 145 Reading library: base.shadow_stdlib 146 146 Number of children: 0 147 147 node_ppx_test.js: [INFO] Adding toplevel modules for dynamic cmis from lib/ocaml/ 148 - node_ppx_test.js: [INFO] toplevel modules: Std_exit, CamlinternalFormatBasics, CamlinternalLazy, CamlinternalMod, Stdlib, CamlinternalOO, CamlinternalFormat 148 + node_ppx_test.js: [INFO] toplevel modules: CamlinternalFormat, CamlinternalLazy, CamlinternalFormatBasics, CamlinternalMod, Std_exit, Stdlib, CamlinternalOO 149 149 node_ppx_test.js: [INFO] init() finished 150 150 node_ppx_test.js: [INFO] setup() for env default... 151 151 node_ppx_test.js: [INFO] Fetching stdlib__Format.cmi
+4 -4
test/node/node_test.expected
··· 155 155 Number of children: 0 156 156 node_test.js: [INFO] sync_get: _opam/lib/ocaml/dynamic_cmis.json 157 157 node_test.js: [INFO] Adding toplevel modules for dynamic cmis from lib/ocaml/ 158 - node_test.js: [INFO] toplevel modules: Std_exit, CamlinternalFormatBasics, CamlinternalLazy, CamlinternalMod, Stdlib, CamlinternalOO, CamlinternalFormat 159 - node_test.js: [INFO] async_get: _opam/lib/ocaml/std_exit.cmi 160 - node_test.js: [INFO] async_get: _opam/lib/ocaml/camlinternalFormatBasics.cmi 158 + node_test.js: [INFO] toplevel modules: CamlinternalFormat, CamlinternalLazy, CamlinternalFormatBasics, CamlinternalMod, Std_exit, Stdlib, CamlinternalOO 159 + node_test.js: [INFO] async_get: _opam/lib/ocaml/camlinternalFormat.cmi 161 160 node_test.js: [INFO] async_get: _opam/lib/ocaml/camlinternalLazy.cmi 161 + node_test.js: [INFO] async_get: _opam/lib/ocaml/camlinternalFormatBasics.cmi 162 162 node_test.js: [INFO] async_get: _opam/lib/ocaml/camlinternalMod.cmi 163 + node_test.js: [INFO] async_get: _opam/lib/ocaml/std_exit.cmi 163 164 node_test.js: [INFO] async_get: _opam/lib/ocaml/stdlib.cmi 164 165 node_test.js: [INFO] async_get: _opam/lib/ocaml/camlinternalOO.cmi 165 - node_test.js: [INFO] async_get: _opam/lib/ocaml/camlinternalFormat.cmi 166 166 node_test.js: [INFO] init() finished 167 167 node_test.js: [INFO] setup() for env default... 168 168 node_test.js: [INFO] Fetching stdlib__Format.cmi