Atry / fastring

Extremely fast string formatting
Apache License 2.0
127 stars 10 forks source link

Release for Scala 2.13 #30

Open slandelle opened 5 years ago

slandelle commented 5 years ago

Hi @Atry !

Would you so kind as to cross-build for Scala 2.13 please?

Cheers

Atry commented 5 years ago

Of course. Have you tried to create a pull request?

slandelle commented 5 years ago

I tried to, but I'm not familiar with macros nor cross building and compiling for Scala 2.13 is not just a matter of upgrading deps, eg paradise has been merged in scalac.

Atry commented 5 years ago

I think the following settings would help

scalacOptions ++= {
  import Ordering.Implicits._
  if (VersionNumber(scalaVersion.value).numbers >= Seq(2L, 13L)) {
    Some("-Ymacro-annotations")
  } else {
    None
  }
}

libraryDependencies ++= {
  import Ordering.Implicits._
  if (VersionNumber(scalaVersion.value).numbers >= Seq(2L, 13L)) {
    None
  } else {
    Some(compilerPlugin("org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.full))
  }
}
slandelle commented 5 years ago

It turns how it's going to be pretty complicated to cross build :)

abstract class Fastring extends TraversableLike[String, Fastring] with Traversable[String] { self =>

TraversableLike has been dropped in Scala 2.13...

Atry commented 5 years ago

We can remove the super type of Traversable if users do not call methods other than toString on Fastring.