etaty / scalacheck-magnolia

replace scalacheck-shapeless with scalacheck-magnolia for insane compilation speed up

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scalacheck Magnolia

Generation of arbitrary case classes / ADTs instances with Scalacheck and Magnolia!

Why?

Because scalacheck-shapeless is good but too slow. Also this is much smaller and understandable, thanks to Magnolia!

Install

Just copy the files in src/main/scala to your project. It's 2 files, less than 60 lines in total! And you don't have to care about updating Scalacheck or Magnolia

How to use it?

import scalacheckmagnolia.MagnoliaArbitrary._
import org.scalacheck._

case class Example(a: String, b: Long)

val arbitraryExample = implicitly[Arbitrary[Example]]

println(arbitraryExample.arbitrary.sample.get)

Links

About

replace scalacheck-shapeless with scalacheck-magnolia for insane compilation speed up

License:Apache License 2.0


Languages

Language:Scala 100.0%