-
Notifications
You must be signed in to change notification settings - Fork 154
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
Bump sbt-doctest to 0.6.0 #306
Conversation
Codecov Report
@@ Coverage Diff @@
## master #306 +/- ##
=======================================
Coverage 99.26% 99.26%
=======================================
Files 37 37
Lines 407 407
Branches 4 3 -1
=======================================
Hits 404 404
Misses 3 3 Continue to review full report at Codecov.
|
Thanks! If this is supposed to run the doctests in JS, then this line needs to be removed too: Line 267 in 1b659a1
|
@fthomas I've removed the configuration you pointed out and it gives me:
I'm not the best person to tell what would be the root cause of these errors.
|
The errors indicate that sbt-doctest's refined doesn't use property tests in doctests, so it could be possible to run them on JS with a different test framework. Probably by setting |
I've employed uTest in this tentative. /cc @tkawachi I've raised tkawachi/sbt-doctest#95 Below we can see a snippet of one of the offending files generated by package eu.timepit.refined.api
import utest._
object RefTypeDoctest extends TestSuite {
val tests = this {
def sbtDoctestTypeEquals[A](a1: => A)(a2: => A): Unit = ()
def sbtDoctestReplString(any: Any): String = {
val s = scala.runtime.ScalaRunTime.replStringOf(any, 1000).init
if (s.headOption == Some('\n')) s.tail else s
}
"RefType.scala:34: refine"-{
import eu.timepit.refined.api.{ Refined, RefType }
import eu.timepit.refined.numeric.Positive
"example at line 43: RefType[Refined].refine[Positive](10)"-{
val _actual_ = sbtDoctestReplString(RefType[Refined].refine[Positive](10))
val _expected_ = "Right(10)"
assert( _expected_ == _actual_ ) //
sbtDoctestTypeEquals(RefType[Refined].refine[Positive](10))((RefType[Refined].refine[Positive](10)): Either[String, Refined[Int, Positive]])
}
}
...
} |
BEWARE: The build pass, but I had to disable fatal warnings, which is not what we want. |
I've been looking for the string |
I added the first commit of this PR to #315 so that we can have a sbt-doctest that is also available for sbt 1.0.0. |
Closing since refined is already updated to sbt-doctest 0.7.1 and I'm okay with not running doctest in the JS build. |
Please advise if tkawachi/sbt-doctest#52 can be closed.
/cc @tkawachi