dependabot[bot] on github_actions
Bump coursier/cache-action from… (compare)
alexarchambault on master
Update sbt-mima-plugin to 0.9.1… (compare)
case class Foo(accountId: Long, name: String)and
case class Bar(accountId: Long, name: String)such that accountId is either equal or not for all instances of Foo or Bar. Is there a way to do that? Obviously I could just write a generator and choose accountId and create new instance manually, but some of these case classes have a lot parameters
Arbitraryinstances? this doesn't work for some reason
case class B(i:Int) case class A(b:B) implicit val _ = Arbitrary(implicitly[Arbitrary[B]].arbitrary.filter(_ == 0))) val a = implicitly[Arbitrary[A]]
aonly generate B(0) instances?
Arbitrary, but implicit instances of
Arbitrary[A :+: B :+: C]too, do you know?
IndexedStateTfrom https://github.com/typelevel/cats/blob/master/core/src/main/scala/cats/data/IndexedStateT.scala to encode an input and output state of a transition.
Arbitrarys ignore other implicits in scope? I haven’t been able to confirm or deny yet but it seems to be the case. For example:
case class Foo(bar: Bar) implicit val arbBar: Arbitrary[Bar] = somePredefinedArbitraryForBar // This is not used implicit val arbFoo: Arbitrary[Foo] = MkArbitrary[Foo].arbitrary
could not find implicit value for parameter mkArb: org.scalacheck.derive.MkCoproductArbitrary[takt.data.valkyrie.deployables.etl.VAL1081.ValkyrieType]
ava.lang.IllegalArgumentException: requirement failed: Duration is limited to +-(2^63-1)ns (ca. 292 years) [info] at scala.concurrent.duration.FiniteDuration.<init>(Duration.scala:583) [info] at scala.concurrent.duration.Duration$.apply(Duration.scala:31) [info] at scala.concurrent.duration.package$DurationLong$.durationIn$extension(package.scala:48) [info] at scala.concurrent.duration.package$DurationLong.durationIn(package.scala:48)
import /*the automatic derivation from the library*/ implicit val arbitraryDuration: Arbitrary[Duration] = ... implicitly[Arbitrary[SomethingThatNeedsDuration]] // this should use arbitraryDuration
Was just about to post practically the same question as above ... I have:
case class Dense[K: Field](layout: Layout, stride: Int)
but if I put an
implicit val stride: Arbitrary[Int] = ... before
forAll, in order to limit the values of
stride, it's not being picked up. It sounds like the same problem as above?