Skip to content
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

Improve "dune describe external-lib-deps" : printing out more information #7478

Merged
merged 6 commits into from
Jul 24, 2023

Conversation

moyodiallo
Copy link
Collaborator

Instead of having only external dependencies, we could also add the internal dependencies for more information.

This is related to ocurrent/opam-dune-lint#46.

Copy link
Collaborator

@emillon emillon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine except some minor style suggestions. Same remark as #7480, has this been tested with opam-dune-lint or is it in anticipation?

bin/describe.ml Outdated Show resolved Hide resolved
bin/describe.ml Outdated Show resolved Hide resolved
@moyodiallo
Copy link
Collaborator Author

Ready for another review and to be merged.

@moyodiallo moyodiallo requested a review from emillon April 18, 2023 14:07
@emillon
Copy link
Collaborator

emillon commented Apr 20, 2023

same question as in #7480, has this been tested with opam-dune-lint?

bin/describe.ml Outdated Show resolved Hide resolved
@moyodiallo moyodiallo force-pushed the internal-dune-describe-externals branch from feb5795 to 59af844 Compare April 20, 2023 11:12
@moyodiallo moyodiallo force-pushed the internal-dune-describe-externals branch from 59af844 to 6a061d0 Compare May 19, 2023 15:46
@moyodiallo moyodiallo force-pushed the internal-dune-describe-externals branch from 6a061d0 to 97b9172 Compare June 8, 2023 15:27
@moyodiallo moyodiallo force-pushed the internal-dune-describe-externals branch from 97b9172 to ee6aa27 Compare June 27, 2023 12:02
@moyodiallo moyodiallo requested a review from emillon June 27, 2023 12:09
@moyodiallo moyodiallo force-pushed the internal-dune-describe-externals branch from ee6aa27 to 6a21c2b Compare June 27, 2023 15:23
~f:(fun name ->
external_resolve db (Lib_name.of_string name) Kind.Optional)
>>| List.filter_opt)
| Dune_rules.Lib_dep.Direct (_, name)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should put (lib : Dune_rules.Lib_dep.t) in the match then you can stop prefixing the constructors.

@moyodiallo moyodiallo force-pushed the internal-dune-describe-externals branch from 6a21c2b to 7fc23e1 Compare June 27, 2023 16:27
@moyodiallo moyodiallo force-pushed the internal-dune-describe-externals branch 3 times, most recently from 9865cee to 0eec296 Compare July 7, 2023 09:10
bin/describe/describe_external_lib_deps.ml Outdated Show resolved Hide resolved
bin/describe/describe_external_lib_deps.ml Outdated Show resolved Hide resolved
@emillon
Copy link
Collaborator

emillon commented Jul 7, 2023

There was a missing ) in my suggestion, sorry. Also can you add a changelog entry?

@emillon
Copy link
Collaborator

emillon commented Jul 12, 2023

ping?

@moyodiallo moyodiallo force-pushed the internal-dune-describe-externals branch from 9055d5d to 44a5eff Compare July 24, 2023 09:48
moyodiallo and others added 4 commits July 24, 2023 13:10
    Instead of having only external dependencies, we could also add the
    internal dependencies for more information.

    Add the extensions of executables

Signed-off-by: Alpha DIALLO <moyodiallo@gmail.com>
If a private lib is a dependency and have an external lib as dependency,
that information should be known. In order to reach all external
dependencies.

Signed-off-by: Alpha DIALLO <moyodiallo@gmail.com>
Co-authored-by: Etienne Millon <etienne.millon@gmail.com>
Signed-off-by: Alpha Issiaga DIALLO <alpha@tarides.com>
Co-authored-by: Etienne Millon <etienne.millon@gmail.com>
Signed-off-by: Alpha Issiaga DIALLO <alpha@tarides.com>
Signed-off-by: Alpha DIALLO <moyodiallo@gmail.com>
Signed-off-by: Alpha DIALLO <moyodiallo@gmail.com>
@emillon emillon force-pushed the internal-dune-describe-externals branch from 44a5eff to 2c67b7a Compare July 24, 2023 11:11
@emillon emillon merged commit 875fc23 into ocaml:main Jul 24, 2023
19 checks passed
@moyodiallo moyodiallo deleted the internal-dune-describe-externals branch July 24, 2023 11:47
@rgrinberg rgrinberg added this to the 3.10.0 milestone Jul 24, 2023
emillon added a commit to emillon/opam-repository that referenced this pull request Jul 28, 2023
CHANGES:

- Add `dune show rules` as alias of the `dune rules` command. (ocaml/dune#8000, @Alizter)

- Fix `%{deps}` to expand properly in `(cat ...)` when containing 2 or more
  items. (ocaml/dune#8196, @Alizter)

- Add `dune show installed-libraries` as an alias of the `dune
  installed-libraries` command. (ocaml/dune#8135, @Alizter)

- Fix the `severity` of error messages sent over RPC which was missing. (ocaml/dune#8193,
  @Alizter)

- Add `dune build --dump-gc-stats FILE` argument to dump garbage collection
  stats to a named file. (ocaml/dune#8072, @Alizter)

- Fix bug with ppx and Reason syntax due to missing dependency in sandboxed
  action (ocaml/dune#7932, fixes ocaml/dune#7930, @Alizter)

- Add `dune describe package-entries` to print all package entries (ocaml/dune#7480,
  @moyodiallo)

- Improve `dune describe external-lib-deps` by adding the internal dependencies
  for more information. (ocaml/dune#7478, @moyodiallo)

- Re-enable background file digests on Windows. The files are now open in a way
  that prevents race condition around deletion. (ocaml/dune#8262, fixes ocaml/dune#8268, @emillon)
emillon added a commit to emillon/opam-repository that referenced this pull request Jul 31, 2023
CHANGES:

- Add `dune show rules` as alias of the `dune rules` command. (ocaml/dune#8000, @Alizter)

- Fix `%{deps}` to expand properly in `(cat ...)` when containing 2 or more
  items. (ocaml/dune#8196, @Alizter)

- Add `dune show installed-libraries` as an alias of the `dune
  installed-libraries` command. (ocaml/dune#8135, @Alizter)

- Fix the `severity` of error messages sent over RPC which was missing. (ocaml/dune#8193,
  @Alizter)

- Add `dune build --dump-gc-stats FILE` argument to dump garbage collection
  stats to a named file. (ocaml/dune#8072, @Alizter)

- Fix bug with ppx and Reason syntax due to missing dependency in sandboxed
  action (ocaml/dune#7932, fixes ocaml/dune#7930, @Alizter)

- Add `dune describe package-entries` to print all package entries (ocaml/dune#7480,
  @moyodiallo)

- Improve `dune describe external-lib-deps` by adding the internal dependencies
  for more information. (ocaml/dune#7478, @moyodiallo)

- Re-enable background file digests on Windows. The files are now open in a way
  that prevents race condition around deletion. (ocaml/dune#8262, fixes ocaml/dune#8268, @emillon)
pmwhite pushed a commit to pmwhite/dune that referenced this pull request Aug 10, 2023
…tion (ocaml#7478)

* refactor: improve "dune describe external-lib-deps"

    Instead of having only external dependencies, we could also add the
    internal dependencies for more information.

If a private lib is a dependency and have an external lib as dependency,
that information should be known. In order to reach all external
dependencies.

Signed-off-by: Alpha DIALLO <moyodiallo@gmail.com>
Co-authored-by: Etienne Millon <etienne.millon@gmail.com>
nberth pushed a commit to nberth/opam-repository that referenced this pull request Jun 18, 2024
CHANGES:

- Add `dune show rules` as alias of the `dune rules` command. (ocaml/dune#8000, @Alizter)

- Fix `%{deps}` to expand properly in `(cat ...)` when containing 2 or more
  items. (ocaml/dune#8196, @Alizter)

- Add `dune show installed-libraries` as an alias of the `dune
  installed-libraries` command. (ocaml/dune#8135, @Alizter)

- Fix the `severity` of error messages sent over RPC which was missing. (ocaml/dune#8193,
  @Alizter)

- Add `dune build --dump-gc-stats FILE` argument to dump garbage collection
  stats to a named file. (ocaml/dune#8072, @Alizter)

- Fix bug with ppx and Reason syntax due to missing dependency in sandboxed
  action (ocaml/dune#7932, fixes ocaml/dune#7930, @Alizter)

- Add `dune describe package-entries` to print all package entries (ocaml/dune#7480,
  @moyodiallo)

- Improve `dune describe external-lib-deps` by adding the internal dependencies
  for more information. (ocaml/dune#7478, @moyodiallo)

- Re-enable background file digests on Windows. The files are now open in a way
  that prevents race condition around deletion. (ocaml/dune#8262, fixes ocaml/dune#8268, @emillon)
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.

4 participants