-
Notifications
You must be signed in to change notification settings - Fork 28
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
Compile error in a Scala.js project #52
Comments
I should mention that this can be reproduced by enabling sbt-doctest here: https://github.com/fthomas/refined/blob/d200633c714de3dcb980f55a35520129b1bc91c8/build.sbt#L178 |
The above error can be fixed with --- a/src/main/scala/com/github/tkawachi/doctest/ScalaCheckGen.scala
+++ b/src/main/scala/com/github/tkawachi/doctest/ScalaCheckGen.scala
@@ -22,9 +22,9 @@ object ScalaCheckGen extends TestGen {
}
def generateExample(basename: String, parsed: ParsedDoctest): String = {
- s""" include(new org.scalacheck.Properties("${parsed.symbol}") {
+ s""" {
|${parsed.components.map(gen(parsed.lineNo, _)).mkString("\n\n")}
- | })""".stripMargin
+ | }""".stripMargin
} But now I'm getting runtime errors because of the usage of def sbtDoctestReplString(any: Any): String = {
val s = scala.runtime.ScalaRunTime.replStringOf(any, 1000).init
if (s.headOption == Some('\n')) s.tail else s
} The errors look like this:
|
I think this is related: typelevel/scalacheck#208 |
I'm afraid it's hard to port |
The next version will require JvmPlugin. |
The compilation error reported initially is over. |
I'm trying to use sbt-doctest in refined which is a JVM/JS cross project. Compiling the test sources for Scala.js (
sbt refinedJS/test
) yields the following error:The text was updated successfully, but these errors were encountered: