-
Notifications
You must be signed in to change notification settings - Fork 49
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
Scala 3.0.0-M3 #158
Scala 3.0.0-M3 #158
Conversation
modules/core/src/weaver/Runner.scala
Outdated
|
||
// Recursively consumes from a channel until a "None" gets produced, | ||
// indicating the end of the stream. | ||
def consume( | ||
private def consume( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should probably make this package private, I know I use it internally.
@@ -31,7 +34,7 @@ object PropertyDogFoodTest extends IOSuite { | |||
// 100 checks sleeping 1 second each should not take 100 seconds | |||
test("Checks are parallelised") { dogfood => | |||
for { | |||
(_, events) <- dogfood.runSuite(Meta.ParallelChecks) | |||
events <- dogfood.runSuite(Meta.ParallelChecks).map(_._2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC that's because better-monadic-for is not available on Scala 3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes me SO GODDAMN ANGRY
"scalafix" :: | ||
"test:scalafix" :: state | ||
"scalafix" :: | ||
"test:scalafix" :: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because scalafix can actually change the formatting :-/
), | ||
libraryDependencies ++= { | ||
if (virtualAxes.value.contains(VirtualAxis.jvm)) | ||
Seq( | ||
"org.scala-js" %%% "scalajs-stubs" % "1.0.0" % "provided" | ||
("org.scala-js" %%% "scalajs-stubs" % "1.0.0" % "provided").withDottyCompat( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this dep is like 2 annotations, may be we can copypaste it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mmm not sure how we could do it without polluting the user's classpath tbh. I think having the dotty compat on this one is low risk for the time being, since it's a compile-only thing.
build.sbt
Outdated
@@ -217,7 +221,8 @@ lazy val specs2 = projectMatrix | |||
name := "specs2", | |||
testFrameworks := Seq(new TestFramework("weaver.framework.CatsEffect")), | |||
libraryDependencies ++= Seq( | |||
"org.specs2" %%% "specs2-matcher" % "4.10.5" | |||
("org.specs2" %%% "specs2-matcher" % "4.10.5").withDottyCompat( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not seeing a 3.0.0-M3 release yet, so this might have to become onlyScala2 for the time being.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i.e. with making it scala 2 only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i.e. with making it scala 2 only?
yes
project/WeaverPlugin.scala
Outdated
scalaVersions.map(addOne(_, platform, catsEffectAxis)).reduce(_ andThen _) | ||
} | ||
|
||
def onlyCatsEffect2( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's try and make this a bit more conceptually consistent, by changing it to :
def sparse(
withCE3 : Boolean = true,
withJS: Boolean = true,
withScala3: Boolean = true
)
|
||
object Expectable { | ||
def apply[F[_], B](implicit ev: Expectable[F, B]): Expectable[F, B] = ev | ||
implicit def syncExpectable[F[_]: Sync]: Expectable[F, Expectations] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be constrained to Applicative
, with pure
being used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love me a bit of Sync here and there. Good point, not sure why I needed this.
@@ -6,6 +6,24 @@ import cats.data.{ NonEmptyList, Validated, ValidatedNel } | |||
import cats.effect.Sync | |||
import cats.syntax.all._ | |||
|
|||
trait Expectable[F[_], A] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this should be in core
, since we only use it for scalacheck. Maybe we should rename it to Prop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be we can move it into Checkers
itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the companion object, sure ...
Super early version, most compilation works (apart from scalacheck)scalacheck worksDirty comments left here'n'thereLots of compat layers,
lots ofwithDottyCompat
Given it's a test framework, it might not be a horrible idea to publish versions with withDottyCompat.Tested with locally published eed3si9n/expecty#350.15.0 is publishedTODO: