Closed rossabaker closed 2 years ago
is there anyone watching the repo who would like to take a stab at a PR, even just to see what issues arise? you wouldn't need to commit to seeing it through to the end, any amount of progress would be helpful
I was able to keep it working for now thusly:
libraryDependencies.value.map {
case module if module.name == "twirl-api" =>
module.withDottyCompat(scalaVersion.value)
case module => module
}
I don't recommend publishing libraries on withDottyCompat
, but it seems a fair interim solution for applications.
There is a WIP PR at #394 that I intend to return to... hoping for May. We're a bit backed up dealing with the Bintray situation :-/
I am sorry, but I think at this point I need to just admit that I'm unlikely to return to this, so I'm going to close my PR. Someone else is free to tackle it.
I'd be willing to pick up work on this. I should have some availability next week
@brbrown25 That would be great! Is there anything I can help you with?
@brbrown25 That would be great! Is there anything I can help you with?
I'll start hacking away at it and give you an update next week, just need to familiarize myself with the source as I've mostly been an end user of twirl!
@brbrown25 Thanks, if you need guidance please let me know.
Update, making some good progress. Gonna push up my WIP draft tomorrow. I got most of the basics in place, just need to work through the compiler pieces!
Update, the WIP pr has the correct structure and the most of the cross compilation works. Only thing outstanding is updating the scala 3 version of the compiler module. There's some notes in the discussion on the pr what places will be to be updated. Also the majority of warnings have been resolved except for the CollectionConverts helper
I was able to keep it working for now thusly:
libraryDependencies.value.map { case module if module.name == "twirl-api" => module.withDottyCompat(scalaVersion.value) case module => module }
I don't recommend publishing libraries on
withDottyCompat
, but it seems a fair interim solution for applications.
This is how I am currently getting a project that uses twirl to cross-compile based on the above help.
libraryDependencies := {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, _)) => libraryDependencies.value
case _ =>
libraryDependencies.value.map {
case module if module.name == "twirl-api" =>
module.cross(CrossVersion.for3Use2_13).exclude("org.scala-lang.modules", "scala-xml_2.13")
case module => module
} ++ Seq("org.scala-lang.modules" %% "scala-xml" % "2.0.1")
}
}
I was able to keep it working for now thusly:
@shannonbarnes the pr should hopefully get merged soon and then the interim solution can be replaced with the latest version :)
Implemented in #461, please watch out for the twirl 1.6.0-M2 release coming this week, to help use test and give feedback.
Are there plans to cross-publish Twirl for Scala 3? We have an http4s integration I'd like to keep alive, and we're trying to identify the correct repo structure as we reorganize ourselves.
Thanks for the great tool!
(Bonus keyword: Dotty)