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 detection of packages building with dune #176

Merged
merged 1 commit into from
Jun 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

- Exclude packages depending on `jbuilder` from the lock step. Since dune 2.0, `jbuild` files are
not supported. A new `--allow-jbuilder` option have been added to enable the old behavior.
- Recognize packages with an optional dependency on dune as building with dune. This allows
opam-monorepo to rightfully recognize `opam-file-format` latest versions as building with
dune. (#176, @NathanReb)

### Deprecated

Expand Down
5 changes: 4 additions & 1 deletion lib/opam_solve.ml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ end = struct
let is_valid_candidate ~allow_jbuilder ~name ~version opam_file =
let pkg = OpamPackage.create name version in
let depends = OpamFile.OPAM.depends opam_file in
let uses_dune = Opam.depends_on_dune ~allow_jbuilder depends in
let depopts = OpamFile.OPAM.depopts opam_file in
let uses_dune =
Opam.depends_on_dune ~allow_jbuilder depends || Opam.depends_on_dune ~allow_jbuilder depopts
in
let summary = Opam.Package_summary.from_opam ~pkg opam_file in
Opam.Package_summary.is_base_package summary
|| Opam.Package_summary.is_virtual summary
Expand Down