Added the direct dependencies between modules to the output of dune describe#5412
Added the direct dependencies between modules to the output of dune describe#5412esope wants to merge 14 commits intoocaml:mainfrom
dune describe#5412Conversation
|
This PR results from this discussion thread, and hopefully provides a solution to issue#3425. |
bin/describe.ml
Outdated
| union | ||
| ~f:(fun _ () () -> Some ()) | ||
| (of_list_unit deps_for_impl) | ||
| (of_list_unit deps_for_intf) |
There was a problem hiding this comment.
Do you think it's perhaps better to print these sets separately and let callers merge them if needed?
There was a problem hiding this comment.
Good idea. Implemented in the recently pushed changes.
|
Could you add tests for this feature? |
|
@rgrinberg: with your recent commit b5ad3a39b8debb430654665b60433a3acf5b4410 On line 214 of file My code used to work properly without these svar-related changes. |
This is pushed in the recent commits. But it triggered another (minor) issue: I expanded the current test for Do you see an easy solution to this issue? |
Signed-off-by: Rudi Grinberg <me@rgrinberg.com> ps-id: 52DED725-A17B-4910-8B63-4615B1B4C9A1
|
@esope thanks for the report. I'll fix this issue shortly. |
ef31f56 to
83480fd
Compare
Honestly, there's no easy solution. The obvious thing to do is to add the paths to BUILD_PATH_PREFIX_MAP, but unfortunately the formatting is going to depend on the unfiltered length which still makes it not completely reproducible. How about just writing a simple pre-processor that will redact the fields that aren't reproducible? |
I'll try this solution. I've also noticed that since the UIDs depend on the paths, they are subject to instability too... |
I'm trying to write a simple executable that reads the output of To do this, I need to parse the contents of An alternative path would be to add a flag to |
The easiest way is to introduce a subcommand to
If you think this is simpler, it is fine by me. |
Done in commit 72cdde1. |
|
CI isn't happy: |
|
CI is much happier now. |
…mmediate dependencies of a module Signed-off-by: Benoît Montagu <benoit.montagu@inria.fr>
… of preprocessors that are registered for a library Signed-off-by: Benoît Montagu <benoit.montagu@inria.fr>
…ules Signed-off-by: Benoît Montagu <benoit.montagu@inria.fr>
…cribe``. TODO: add a flag to the CLI, and introduce a new dune lang version Signed-off-by: Benoît Montagu <benoit.montagu@inria.fr>
…dependencies in the output of ``dune describe workspace`` Signed-off-by: Benoît Montagu <benoit.montagu@inria.fr>
… provided Signed-off-by: Benoît Montagu <benoit.montagu@inria.fr>
…nterface, and the dependencies of its implementation. We used to return the union of the two. Signed-off-by: Benoît Montagu <benoit.montagu@inria.fr>
Signed-off-by: Benoît Montagu <benoit.montagu@inria.fr>
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
This flag does its best to produce stable outputs across different machines, when the output involves absolute paths. The tests for the ``dune describe workspace`` are updated so that they use this flag. Signed-off-by: Benoît Montagu <benoit.montagu@inria.fr>
…d produce a file that older OCaml versions could not parse Signed-off-by: Benoît Montagu <benoit.montagu@inria.fr>
…ns of the standard library Signed-off-by: Benoît Montagu <benoit.montagu@inria.fr>
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
192153e to
5bea609
Compare
|
Merged but I simplified the sanitation quite a bit. It's not as robust, but good enough for our testing needs. |
…ne-site, dune-rpc, dune-rpc-lwt, dune-private-libs, dune-glob, dune-configurator, dune-build-info and dune-action-plugin (3.1.0) CHANGES: - Add `sourcehut` as an option for defining project sources in dune-project files. For example, `(source (sourcehut user/repo))`. (ocaml/dune#5564, @rgrinberg) - Add `dune coq top` command for running a Coq toplevel (ocaml/dune#5457, @rlepigre) - Fix dune exec dumping database in wrong directory (ocaml/dune#5544, @bobot) - Always output absolute paths for locations in RPC reported diagnostics (ocaml/dune#5539, @rgrinberg) - Add `(deps <deps>)` in ctype field (ocaml/dune#5346, @bobot) - Add `(include <file>)` constructor to dependency specifications. This can be used to introduce dynamic dependencies (ocaml/dune#5442, @anmonteiro) - Ensure that `dune describe` computes a transitively closed set of libraries (ocaml/dune#5395, @esope) - Add direct dependencies to $ dune describe output (ocaml/dune#5412, @esope) - Show auto-detected concurrency on Windows too (ocaml/dune#5502, @MisterDA) - Fix operations that remove folders with absolute path. This happens when using esy (ocaml/dune#5507, @EduardoRFS) - Dune will not fail if some directories are non-empty when uninstalling. (ocaml/dune#5543, fixes ocaml/dune#5542, @nojb) - `coqdep` now depends only on the filesystem layout of the .v files, and not on their contents (ocaml/dune#5547, helps with ocaml/dune#5100, @ejgallego) - The mdx stanza 0.2 can now be used with `(implicit_transitive_deps false)` (ocaml/dune#5558, fixes ocaml/dune#5499, @emillon) - Fix missing parenthesis in printing of corresponding terminal command for `(with-outputs-to )` (ocaml/dune#5551, fixes ocaml/dune#5546, @Alizter)
When the new
--with-depsflag is given to the commanddune describe workspace, the output now contains a new fieldmodule_depsfor each module entry. This new field contains the list of modules of the current library/executable a module immediately depends on.For example, on a simple library project with two files
a.mlandb.mlsuch thata.mlrefers to the moduleB, with the followingdunefile:the command
dune describe workspace --with-depsprints: