IntersectMBO / plutus

The Plutus language implementation and tools
Apache License 2.0
1.55k stars 465 forks source link

Switch from `hedgehog` to `QuickCheck` #6095

Open ana-pantilie opened 1 month ago

ana-pantilie commented 1 month ago

There are multiple places throughout the codebase which use hedgehog, and we should migrate those to QuickCheck. See https://github.com/IntersectMBO/plutus/pull/5927#discussion_r1588316757 for the reasoning behind this transition.

effectfully commented 1 month ago

There are multiple places throughout the codebase which use hedgehog, and we should migrate those to QuickCheck.

A number of those aren't really helpful and so we shouldn't bother moving them. E.g. PlutusCore.Generators.Hedgehog.Test and everything it depends upon isn't really worth the trouble of moving from hedgehog to QuickCheck (I know that, because I implemented it, it did catch a few bugs, but overall it's just a worse version of PIR generators).

So we really only should bother moving those tests that are

  1. important
  2. would benefit from the QuickCheck infra
  3. not too much of a hassle to transition

I would very much prefer us to implement new tests with QuickCheck, but I think keeping hedgehog ones in the codebase is fine when the costs of transition outweigh the benefits.