8000 Added dependencies of executables to the output of ``dune describe`` by esope · Pull Request #5376 · ocaml/dune · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added dependencies of executables to the output of dune describe #5376

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 14 commits into from

Conversation

esope
Copy link
Collaborator
@esope esope commented Jan 24, 2022

The direct dependencies of executables to (external) libraries were
forgotten so far.

For example, with an empty foo.ml file and a dune file containing

(executable
 (name foo)
 (libraries cmdliner)
)

the command dune describe was printing

((executables        
  ((names (foo))
   (requires (0ca97fa3e29501e21524582fcb1993ce))
   (modules
    (((name Foo)
      (impl (_build/default/foo.ml))
      (intf ())
      (cmt (_build/default/.foo.eobjs/byte/dune__exe__Foo.cmt))
      (cmti ()))))
   (include_dirs (_build/default/.foo.eobjs/byte)))))

The dependence to cmdliner was given by mentioning its hash, but there was no entry of a library with this hash in the produced output.

With this patch, dune describe now outputs

((executables                   
  ((names (foo))
   (requires (0ca97fa3e29501e21524582fcb1993ce))
   (modules
    (((name Foo)
      (impl (_build/default/foo.ml))
      (intf ())
      (cmt (_build/default/.foo.eobjs/byte/dune__exe__Foo.cmt))
      (cmti ()))))
   (incl
8000
ude_dirs (_build/default/.foo.eobjs/byte))))
 (library
  ((name cmdliner)
   (uid 0ca97fa3e29501e21524582fcb1993ce)
   (local false)
   (requires ())
   (source_dir /home/bmontagu/.opam/4.13.1/lib/cmdliner)
   (modules ())
   (include_dirs (/home/bmontagu/.opam/4.13.1/lib/cmdliner)))))

where the new item for the cmdliner library is now present.

This PR complements PR#5395, that ensures that the set of libraries a project depends on is transitively closed.

Signed-off-by: Benoît Montagu benoit.montagu@inria.fr

@esope esope changed the title Added dependencies of executables to the output of 'dune describe' Added dependencies of executables to the output of dune describe Jan 31, 2022
@esope
Copy link
Collaborator Author
esope commented Feb 15, 2022

This PR is a complement to PR#5395.
@rgrinberg: if you think it makes sense, I can add the changes of the current PR to PR#5395, so that PR#5395 is more self-contained.

@rgrinberg
Copy link
Member

One PR would be preferred.

@esope
Copy link
Collaborator Author
esope commented Feb 15, 2022

Fine. I ported the changes to PR#5395.
I am now closing the current PR.

@esope esope closed this Feb 15, 2022
@esope esope deleted the describe_more branch February 15, 2022 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0