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

dune build errors #3

Closed
OlivierNicole opened this issue Mar 8, 2022 · 2 comments
Closed

dune build errors #3

OlivierNicole opened this issue Mar 8, 2022 · 2 comments

Comments

@OlivierNicole
Copy link
Contributor

I'm trying to use the lin library in a project, but dune build is failing on current main (a7a032f at the time of writing):

File "lib/STM.ml", line 308, characters 23-32:
308 |     Test.make ~retries:rep_count ~count ~name:("parallel " ^ name ^ " (w/shrink retries)")
                             ^^^^^^^^^
Error: The function applied to this argument has type
         ?if_assumptions_fail:[ `Fatal | `Warning ] * float ->
         ?long_factor:int ->
         ?max_gen:int ->
         ?max_fail:int -> ?small:('a -> int) -> QCheck2.Test.t
This argument cannot be applied with label ~retries
File "lib/lin.ml", line 190, characters 30-31:
190 |     Test.make ~count ~retries:3 ~name:("Linearizable " ^ name)
                                    ^
Error: The function applied to this argument has type
         ?if_assumptions_fail:[ `Fatal | `Warning ] * float ->
         ?long_factor:int ->
         ?max_gen:int ->
         ?max_fail:int -> ?small:('a -> int) -> QCheck2.Test.t
This argument cannot be applied with label ~retries
File "/home/olivier/compiler/trunk/_opam/lib/lockfree/dune-package", line 1, characters 11-14:
1 | (lang dune 3.0)
               ^^^
Error: Version 3.0 of the dune language is not supported.
Supported versions of this extension in version 3.0 of the dune language:
- 1.0 to 1.12
- 2.0 to 2.9

I am currently looking for the causes.

@jmid
Copy link
Collaborator

jmid commented Mar 8, 2022

With a recent trunk ocaml installed building requires something like the two first steps from the CI:
https://github.com/jmid/multicoretests/blob/483fa6415d2d8c12c92111d6d5218f2457d5667e/.github/workflows/linux-500-workflow.yml#L27-L29

This is not clear from the outside though! To help others it would be nice to write up "Installation instructions" in the README.

The dependencies include

IIUC, part of the above error message complains about not knowing about the new ~retries parameter.

@OlivierNicole
Copy link
Contributor Author

Indeed, opam install . --deps-only allowed me to dune build without errors.

This is not clear from the outside though! To help others it would be nice to write up "Installation instructions" in the README.

Done in #6.

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

No branches or pull requests

2 participants