File tree Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,30 @@ let standard_library =
12
12
|> List. rev
13
13
with
14
14
(* 1. Packages installed via pnpm
15
- - bin: node_modules/.pnpm/@rescript+darwin-arm64@12.0.0-alpha.13 /node_modules/@rescript/darwin-arm64/bin
16
- - stdlib: node_modules/rescript/ lib/ocaml (symlink)
15
+ - bin: node_modules/.pnpm/@rescript+darwin-arm64@12.0.0-alpha.15 /node_modules/@rescript/darwin-arm64/bin
16
+ - stdlib: node_modules/.pnpm/ rescript@12.0.0-alpha.15/node_modules/rescript/ lib/ocaml
17
17
*)
18
- | " bin" :: _platform :: " @rescript" :: " node_modules" :: _package :: " .pnpm"
19
- :: " node_modules" :: rest ->
20
- build_path rest [" node_modules" ; " rescript" ; " lib" ; " ocaml" ]
18
+ | " bin" :: _platform :: " @rescript" :: " node_modules" :: bin_package
19
+ :: " .pnpm" :: " node_modules" :: rest -> (
20
+ match bin_package |> String. split_on_char '@' with
21
+ | [" " ; _package_name; version] ->
22
+ build_path rest
23
+ [
24
+ " node_modules" ;
25
+ " .pnpm" ;
26
+ " rescript@" ^ version;
27
+ " node_modules" ;
28
+ " rescript" ;
29
+ " lib" ;
30
+ " ocaml" ;
31
+ ]
32
+ | _ ->
33
+ (* The above might not match, e.g., for the installation test where we have
34
+ - bin: node_modules/.pnpm/@rescript+darwin-arm64@https+++pkg.pr.new+rescript-lang+rescript+@rescript+darwin-arm64_dc084c3d4ed1dbfd250a9747e43c07d8/node_modules/@rescript/darwin-arm64/bin/
35
+ - stdlib: node_modules/.pnpm/rescript@https+++pkg.pr.new+rescript-lang+rescript@324acbeded5d684d89b26ab38d1d86eff5880b1d/node_modules/rescript/lib/ocaml
36
+ In that case try to fall back to rescript/lib/ocaml which should be present as a symlink.
37
+ *)
38
+ build_path rest [" node_modules" ; " rescript" ; " lib" ; " ocaml" ])
21
39
(* 2. Packages installed via npm
22
40
- bin: node_modules/@rescript/{platform}/bin
23
41
- stdlib: node_modules/rescript/lib/ocaml
You can’t perform that action at this time.
0 commit comments