-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix misleading error message for non-dune dependency
- Loading branch information
Showing
3 changed files
with
29 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
This is a reproduction of a problem where depending on a specific version of the | ||
ocaml compiler at the same time as a package that doesn't build with dune leads | ||
to an error message that doesn't mention the fact that the problem is due to the | ||
non-dune dependency, despite the fact that removing that dependency or adding | ||
an overlay containing a suitable dune port for the package causes the problem to | ||
go away. | ||
This test asserts that the issue at | ||
https://github.com/tarides/opam-monorepo/issues/385 is fixed. | ||
|
||
The problem was that depending on a specific version of the ocaml compiler at | ||
the same time as a package that doesn't build with dune leads to an error | ||
message that doesn't mention the fact that the problem is due to the non-dune | ||
dependency, despite the fact that removing that dependency or adding an overlay | ||
containing a suitable dune port for the package causes the problem to go away. | ||
|
||
$ gen-minimal-repo | ||
|
||
$ opam-monorepo lock | ||
==> Using 1 locally scanned package as the target. | ||
opam-monorepo: [ERROR] Can't find all required versions. | ||
Selected: base-bigarray.base base-threads.base base-unix.base ocaml.4.13.1 | ||
ocaml-base-compiler.4.13.1 ocaml-config.2 ocaml-options-vanilla.1 | ||
ocaml-base-compiler&foo ocaml-base-compiler ocaml-base-compiler | ||
ocaml-base-compiler | ||
- foo -> (problem) | ||
Rejected candidates: | ||
foo.zdev: Requires ocaml = 4.14.1 | ||
opam-monorepo: [ERROR] Some dependencies cannot be built with dune! | ||
|
||
opam-monorepo requires that all dependencies use dune as their build system. | ||
|
||
These dependencies (possibly transitive) don't use dune as their build system: | ||
- without-dune | ||
The dune-universe opam repository (git+https://github.com/dune-universe/opam-overlays.git) contains dune ports of some popular packages to help build more packages with dune. It doesn't appear to be set up on this switch. Adding it to this switch may fix this issue. Add the dune-universe opam repository to this switch by running the command: | ||
|
||
opam repository add dune-universe git+https://github.com/dune-universe/opam-overlays.git | ||
[1] |