this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #8 from art-w/stdlib

Use jsoo default cmi path for the stdlib

authored by

Ulysse and committed by
GitHub
14959fed 16cdeb0f

+6 -4
+6 -4
src/worker/worker.ml
··· 3 3 open Merlin_kernel 4 4 module Location = Ocaml_parsing.Location 5 5 6 + let stdlib_path = "/static/cmis" 7 + 6 8 let sync_get url = 7 9 let open Js_of_ocaml in 8 10 let x = XmlHttpRequest.create () in ··· 43 45 let filename = filename_of_module name in 44 46 match fetch (filename_of_module name) with 45 47 | Some content -> 46 - let name = Filename.(concat "/static/stdlib" filename) in 48 + let name = Filename.(concat stdlib_path filename) in 47 49 Js_of_ocaml.Sys_js.create_file ~name ~content 48 50 | None -> ()) dcs.dcs_toplevel_modules; 49 51 50 52 let new_load ~allow_hidden ~unit_name = 51 53 let filename = filename_of_module unit_name in 52 - let fs_name = Filename.(concat "/static/stdlib" filename) in 54 + let fs_name = Filename.(concat stdlib_path filename) in 53 55 (* Check if it's already been downloaded. This will be the 54 56 case for all toplevel cmis. Also check whether we're supposed 55 57 to handle this cmi *) ··· 75 77 let add_cmis { Protocol.static_cmis; dynamic_cmis } = 76 78 List.iter static_cmis ~f:(fun { Protocol.sc_name; sc_content } -> 77 79 let filename = Printf.sprintf "%s.cmi" (String.uncapitalize_ascii sc_name) in 78 - let name = Filename.(concat "/static/stdlib" filename) in 80 + let name = Filename.(concat stdlib_path filename) in 79 81 Js_of_ocaml.Sys_js.create_file ~name ~content:sc_content); 80 82 Option.iter ~f:add_dynamic_cmis dynamic_cmis; 81 83 Protocol.Added_cmis ··· 84 86 let initial = Mconfig.initial in 85 87 { initial with 86 88 merlin = { initial.merlin with 87 - stdlib = Some "/static/stdlib" }} 89 + stdlib = Some stdlib_path }} 88 90 89 91 let make_pipeline source = 90 92 Mpipeline.make config source