Fix META generation wrt scope
We should respect the scope of the current internal library to generate the META
This commit is contained in:
parent
d6601bf2bb
commit
ab18b13a04
|
@ -199,7 +199,7 @@ let ppx_runtime_deps_for_deprecated_method_exn t ~dir lib_deps =
|
||||||
let lib_is_available name =
|
let lib_is_available name =
|
||||||
String_set.mem name !seen || lib_is_available t ~from:dir name
|
String_set.mem name !seen || lib_is_available t ~from:dir name
|
||||||
in
|
in
|
||||||
let rec loop lib_dep =
|
let rec loop dir lib_dep =
|
||||||
match lib_dep with
|
match lib_dep with
|
||||||
| Lib_dep.Direct name ->
|
| Lib_dep.Direct name ->
|
||||||
if not (String_set.mem name !seen) then begin
|
if not (String_set.mem name !seen) then begin
|
||||||
|
@ -227,7 +227,7 @@ let ppx_runtime_deps_for_deprecated_method_exn t ~dir lib_deps =
|
||||||
| None -> Loc.fail loc "No solution found for this select form"
|
| None -> Loc.fail loc "No solution found for this select form"
|
||||||
and process (lib : Lib.t) =
|
and process (lib : Lib.t) =
|
||||||
match lib with
|
match lib with
|
||||||
| Internal (_, lib) ->
|
| Internal (dir, lib) ->
|
||||||
seen :=
|
seen :=
|
||||||
(let set = String_set.add lib.name !seen in
|
(let set = String_set.add lib.name !seen in
|
||||||
match lib.public with
|
match lib.public with
|
||||||
|
@ -235,14 +235,14 @@ let ppx_runtime_deps_for_deprecated_method_exn t ~dir lib_deps =
|
||||||
| Some p -> String_set.add p.name set);
|
| Some p -> String_set.add p.name set);
|
||||||
result := String_set.union !result
|
result := String_set.union !result
|
||||||
(String_set.of_list lib.ppx_runtime_libraries);
|
(String_set.of_list lib.ppx_runtime_libraries);
|
||||||
List.iter lib.buildable.libraries ~f:loop
|
List.iter lib.buildable.libraries ~f:(loop dir)
|
||||||
| External pkg ->
|
| External pkg ->
|
||||||
seen := String_set.add pkg.name !seen;
|
seen := String_set.add pkg.name !seen;
|
||||||
result := String_set.union !result
|
result := String_set.union !result
|
||||||
(String_set.of_list
|
(String_set.of_list
|
||||||
(List.map pkg.ppx_runtime_deps ~f:(fun p -> p.Findlib.name)))
|
(List.map pkg.ppx_runtime_deps ~f:(fun p -> p.Findlib.name)))
|
||||||
in
|
in
|
||||||
List.iter lib_deps ~f:loop;
|
List.iter lib_deps ~f:(loop dir);
|
||||||
!result
|
!result
|
||||||
|
|
||||||
type resolved_select =
|
type resolved_select =
|
||||||
|
|
|
@ -1,5 +1,23 @@
|
||||||
$ $JBUILDER build -j1 --root . @install
|
$ $JBUILDER build -j1 --root . @install
|
||||||
Error: External library "sub" not found.
|
ocamldep alib/alib.depends.ocamldep-output
|
||||||
-> required by "alib/jbuild (context default)"
|
ocamlc alib/alib__.{cmi,cmo,cmt}
|
||||||
Hint: try: jbuilder external-lib-deps --missing --root . @install
|
ocamldep blib/blib.depends.ocamldep-output
|
||||||
[1]
|
ocamldep blib/sub/sub.depends.ocamldep-output
|
||||||
|
ocamlopt alib/alib__.{cmx,o}
|
||||||
|
ocamlc blib/sub/sub.{cmi,cmo,cmt}
|
||||||
|
ocamlopt blib/sub/sub.{cmx,o}
|
||||||
|
ocamlc blib/blib.{cmi,cmo,cmt}
|
||||||
|
ocamlc blib/sub/sub.cma
|
||||||
|
ocamlopt blib/sub/sub.{a,cmxa}
|
||||||
|
ocamlopt blib/blib.{cmx,o}
|
||||||
|
ocamlc alib/alib.{cmi,cmo,cmt}
|
||||||
|
ocamlc alib/alib__Main.{cmi,cmo,cmt}
|
||||||
|
ocamlc blib/blib.cma
|
||||||
|
ocamlopt blib/sub/sub.cmxs
|
||||||
|
ocamlopt blib/blib.{a,cmxa}
|
||||||
|
ocamlopt alib/alib.{cmx,o}
|
||||||
|
ocamlopt alib/alib__Main.{cmx,o}
|
||||||
|
ocamlc alib/alib.cma
|
||||||
|
ocamlopt blib/blib.cmxs
|
||||||
|
ocamlopt alib/alib.{a,cmxa}
|
||||||
|
ocamlopt alib/alib.cmxs
|
||||||
|
|
Loading…
Reference in New Issue