diff --git a/bin/describe.ml b/bin/describe.ml index 93edab8d25c..c8e812d22d9 100644 --- a/bin/describe.ml +++ b/bin/describe.ml @@ -719,9 +719,10 @@ module External_lib_deps = struct let external_resolved_libs setup super_context = let open Memo.O in let context = Super_context.context super_context in - let* public_libs = Scope.DB.public_libs context in + let* scope = Scope.DB.find_by_dir context.build_dir in + let db = Scope.libs scope in let* libs = libs context setup in - external_lib_deps public_libs libs + external_lib_deps db libs let to_dyn context_name external_resolved_libs = Dyn.Tuple diff --git a/test/blackbox-tests/test-cases/external-lib-deps/exclude-internal-deps.t/dune b/test/blackbox-tests/test-cases/external-lib-deps/exclude-internal-deps.t/dune new file mode 100644 index 00000000000..74a11e366df --- /dev/null +++ b/test/blackbox-tests/test-cases/external-lib-deps/exclude-internal-deps.t/dune @@ -0,0 +1,3 @@ +(library + (name foo) + (libraries inter_lib a)) diff --git a/test/blackbox-tests/test-cases/external-lib-deps/exclude-internal-deps.t/dune-project b/test/blackbox-tests/test-cases/external-lib-deps/exclude-internal-deps.t/dune-project new file mode 100644 index 00000000000..64e88da5675 --- /dev/null +++ b/test/blackbox-tests/test-cases/external-lib-deps/exclude-internal-deps.t/dune-project @@ -0,0 +1,3 @@ +(lang dune 1.9) +(name foo) +(allow_approximate_merlin true) diff --git a/test/blackbox-tests/test-cases/external-lib-deps/exclude-internal-deps.t/lib/dune b/test/blackbox-tests/test-cases/external-lib-deps/exclude-internal-deps.t/lib/dune new file mode 100644 index 00000000000..ba729d769c6 --- /dev/null +++ b/test/blackbox-tests/test-cases/external-lib-deps/exclude-internal-deps.t/lib/dune @@ -0,0 +1,3 @@ +(library + (name inter_lib) + (libraries a)) diff --git a/test/blackbox-tests/test-cases/external-lib-deps/exclude-internal-deps.t/run.t b/test/blackbox-tests/test-cases/external-lib-deps/exclude-internal-deps.t/run.t new file mode 100644 index 00000000000..1574fe7bc78 --- /dev/null +++ b/test/blackbox-tests/test-cases/external-lib-deps/exclude-internal-deps.t/run.t @@ -0,0 +1,8 @@ +Expected: The dependency "inter_lib" in ./dune file was printed, the "inter_lib" lib is already +an internal lib that declared in ./lib/dune file. The command "dune describe external-lib-deps" +print only the external libraries by dir. + + $ dune describe external-lib-deps + (default + ((. ((a required))) + (lib ((a required)))))