Fix support for duniverse projects#81
Merged
craigfe merged 4 commits intoocurrent:masterfrom Dec 9, 2019
Merged
Conversation
Instead, look only in the root directory of the project, and also in the `duniverse/` directory. The former strategy is what opam does, and the latter is a convention. This prevents failures with projects that have example or broken opam files (for example, dune-configurator has tests that are pinned and broken).
The .dev version is unfortunately less than the `v0.13.0` method used by the JS packages, and so we need to go higher. The duniverse tool now stores the version of the dependency in the directory name of the `duniverse/` vendor area, and so opam picks up the original version. This also respects constraints better than forcing everything to `.dev`. Fixes the CI with ppx_sexp_conv and other JS libraries.
This has the convenient effect of testing the latest compiler first in a local CI setup, which is usually what is desired.
For duniverses, the state of the opam files in the local duniverse may not be entirely consistent, and pinning them beyond the needs of depext is unnecessary. The user will be running `dune build` and so the test does just this, and runs the tests and doc build. The `opam pin` is also reverted before the main build, since it leads to hard to track down errors. The initial depext pin will result in an _empty_ build directory since only the opam files are copied over in the first stage. If an opam update is not done subsequently to trying to opam install the dependencies, then the package installations fail. Opam seems to not always do an rsync update upon install, so I ran into this several times. The new strategy should leave normal opam projects unaffected, beyond just unpinning and pinning one extra time for the root package.
craigfe
approved these changes
Dec 9, 2019
Member
craigfe
left a comment
There was a problem hiding this comment.
LGTM. I want to set up test scaffolding for the analysis phase so that we can ensure the correct things are being done in all cases. This will do for now 🙂
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This enables duniverse projects (such as https://github.com/ocamllabs/duniverse, and soon https://github.com/realworldocaml/book) to work with ocaml-ci with zero configuration. See the commits for an explanation of individual changes.