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

Fix for "dune external-lib-deps" command #46

Merged
merged 31 commits into from
Sep 25, 2023

Conversation

moyodiallo
Copy link
Collaborator

The new version of dune (from 3.0.0) removed "dune external-lib-deps" and this is a patch that work with a patch of dune from "https://github.com/moyodiallo/dune/tree/opam-dune-lint".

There's already a PR(ocaml/dune#6045) in dune about this patch, but not guarantee to be merged. The command may change also.

This could be a temporary solution for our CI projects.

@tmcgilchrist

The new version of dune (from 3.0.0) removed "dune external-lib-deps" and
this is a patch that work with a patch of dune from
"https://github.com/moyodiallo/dune/tree/opam-dune-lint".

There's already a PR(ocaml/dune#6045) in dune
about this patch, but not guarantee to be merged. The command may change also.
The library dune-lang is not exposed anymore. It started at 3.0.0 .
In this stage, opam-dune-lint can only works with this dune PR
"ocaml/dune#6839".

Not ready yet, works is needed at this stage.
@moyodiallo
Copy link
Collaborator Author

At the stage opam-dune-lint works using this dune PR ocaml/dune#6839.

This particular example is left for now, because dune describe external-lib-deps(far different to dune external-lib-deps) does not resolve it.

(executable{s}
  (name{s} prog)
  (libraries a b))

(install 
  (section bin)
  (package pkg)
  (files prog.exe))
  • The solution that I have at the moment, is to solve those cases in opam-dune-lint.

@moyodiallo moyodiallo mentioned this pull request Jan 13, 2023
@moyodiallo moyodiallo removed the request for review from tmcgilchrist January 16, 2023 09:29
.ocamlformat Outdated Show resolved Hide resolved
dune_items.ml Outdated Show resolved Hide resolved
dune_items.ml Outdated Show resolved Hide resolved
dune-project Outdated Show resolved Hide resolved
@tmcgilchrist
Copy link
Member

This could use more tests for the dune-file parsing since we no longer use dune's parser for files.
There is a risk that newer versions of dune introduce breaking format changes or interpretations of previous fields.

dune-project Show resolved Hide resolved
The command 'dune describe external-lib-deps' is used to print
out external-libs and does not print an internal lib.
@moyodiallo moyodiallo force-pushed the dune-external-libs branch 3 times, most recently from 90f05c4 to 4113435 Compare February 9, 2023 17:32
@moyodiallo
Copy link
Collaborator Author

moyodiallo commented Feb 9, 2023

I rewrite the PR, there was some error that I made.

At this stage there's 2 things left:

@moyodiallo
Copy link
Collaborator Author

At this stage, it could be tested with this branch https://github.com/moyodiallo/dune/tree/opam-dune-lint-testing.
before the merge of ocaml/dune#7480 and ocaml/dune#7478.

@moyodiallo moyodiallo force-pushed the dune-external-libs branch from 7b2bb28 to 333a495 Compare April 4, 2023 08:26
* The command "dune describe package-entries" is used to know if a private
 executable is going to be installed.

* Resolve all the internal dependencies.
@moyodiallo
Copy link
Collaborator Author

moyodiallo commented Sep 7, 2023

This issue #28 is now fixed in the current PR.

cc @tmcgilchrist

@moyodiallo moyodiallo force-pushed the dune-external-libs branch 3 times, most recently from 78bc65f to 1e642ae Compare September 18, 2023 12:00
Copy link

@MisterDA MisterDA left a comment

Choose a reason for hiding this comment

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

Some suggestions on coding style.

dune_items.ml Outdated Show resolved Hide resolved
dune_items.ml Outdated Show resolved Hide resolved
dune_items.ml Outdated Show resolved Hide resolved
dune_items.ml Outdated Show resolved Hide resolved
dune_items.ml Outdated Show resolved Hide resolved
main.ml Outdated Show resolved Hide resolved
deps.ml Outdated Show resolved Hide resolved
deps.ml Outdated Show resolved Hide resolved
deps.ml Outdated Show resolved Hide resolved
deps.ml Outdated Show resolved Hide resolved
CHANGES.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
deps.ml Outdated Show resolved Hide resolved
deps.ml Outdated Show resolved Hide resolved
dune_items.ml Outdated Show resolved Hide resolved
dune_rules.ml Outdated Show resolved Hide resolved
main.ml Outdated Show resolved Hide resolved
types.ml Outdated Show resolved Hide resolved
types.ml Show resolved Hide resolved
types.ml Outdated Show resolved Hide resolved
@moyodiallo moyodiallo force-pushed the dune-external-libs branch 4 times, most recently from 66acfa5 to 54a27d8 Compare September 22, 2023 10:28
@tmcgilchrist tmcgilchrist merged commit d964231 into ocurrent:master Sep 25, 2023
@smorimoto
Copy link

When will this be released?

@moyodiallo
Copy link
Collaborator Author

We are testing it on https://ocaml.ci.dev/ via opam lint jobs. When it seems stable, it will be released.

moyodiallo added a commit to moyodiallo/opam-repository that referenced this pull request Oct 17, 2023
CHANGES:

- Add support for dune 3.0 , the command `dune external-lib-deps` was removed from
  dune. Now, the `opam-dune-lint` command works without `dune build`. (@moyodiallo ocurrent/opam-dune-lint#46).
nberth pushed a commit to nberth/opam-repository that referenced this pull request Jun 18, 2024
CHANGES:

- Add support for dune 3.0 , the command `dune external-lib-deps` was removed from
  dune. Now, the `opam-dune-lint` command works without `dune build`. (@moyodiallo ocurrent/opam-dune-lint#46).
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.

5 participants