stedolan / crowbar

Property fuzzing for OCaml
MIT License
180 stars 31 forks source link

Upgrade to dune and Opam 2 #49

Closed NathanReb closed 5 years ago

NathanReb commented 5 years ago

I took the liberty to upgrade from jbuilder to dune and from opam 1.2 to 2.0.

I also added some missing test dependencies and fixed a bunch of warnings 27.

There are some remaining warnings:

File "src/crowbar.ml", line 12, characters 0-335:
Warning 37: constructor Const is never used to build values.
(However, this constructor appears in patterns.)

Suggests that Const _ from the gen type is never used since the type is abstract and such a value is never built in Crowbar itself. I'm not sure if that variant should be removed, if we should expose a way to build constant generators or simply locally ignore that warning.

File "src/crowbar.ml", line 399, characters 0-230:
Warning 34: unused type mode.

The type mode is indeed neither used nor exposed so I'm guessing it could be removed but wanted to hear your opinion before going ahead and remove it.

NathanReb commented 5 years ago

Actually, regarding Const, I'm using it for the shuffle generator so we should definitely keep it.

Exposing a const : 'a -> 'a gen could prove useful as well though!

stedolan commented 5 years ago

Thanks! I've removed Const and mode on master. (constant generators are available and useful, but internally they're a special case of map)