Skip to content

Commit

Permalink
Support Scala Native 0.5.0 (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi authored Apr 15, 2024
1 parent 2335502 commit 679d3fd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .mill-version
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
0.11.0

0.11.7-29-f2e220
18 changes: 11 additions & 7 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import mill.scalalib.api.ZincWorkerUtil.isScala3

val dottyVersions = sys.props.get("dottyVersion").toList

val scalaVersions = List("2.12.17", "2.13.10", "2.11.12", "3.1.3") ++ dottyVersions
val scalaVersions = List("2.12.17", "2.13.10", "3.3.1") ++ dottyVersions

trait ScalatagsPublishModule extends CrossScalaModule with PublishModule with PlatformScalaModule with Mima{
def ivyDeps = Agg(
ivy"com.lihaoyi::sourcecode::0.3.0",
ivy"com.lihaoyi::geny::1.0.0",
ivy"com.lihaoyi::sourcecode::0.4.0",
ivy"com.lihaoyi::geny::1.1.0",
)

def compileIvyDeps = T {
Expand Down Expand Up @@ -43,12 +43,16 @@ trait ScalatagsPublishModule extends CrossScalaModule with PublishModule with Pl
)
)

def mimaReportBinaryIssues() =
if (crossScalaVersion.startsWith("3.") || this.isInstanceOf[ScalaNativeModule] || this.isInstanceOf[ScalaJSModule]) T.command()
else super.mimaReportBinaryIssues()

def mimaPreviousVersions = Seq("0.11.0", "0.11.1", "0.12.0")
}

trait CommonTestModule extends ScalaModule with TestModule.Utest with BuildInfo {
def ivyDeps = Agg(
ivy"com.lihaoyi::utest::0.8.1",
ivy"com.lihaoyi::utest::0.8.3",
ivy"org.scala-lang.modules::scala-xml:${if(scalaVersion().startsWith("2.11.")) "1.3.0" else "2.1.0"}"
)

Expand All @@ -70,7 +74,7 @@ object scalatags extends Module {
object js extends Cross[JSScalatagsModule](scalaVersions)
trait JSScalatagsModule
extends ScalaJSModule with ScalatagsPublishModule {
def scalaJSVersion = "1.10.1"
def scalaJSVersion = "1.12.0"
def ivyDeps = super.ivyDeps() ++ Agg(ivy"org.scala-js::scalajs-dom::2.3.0")
private def sourceMapOptions = T.task {
val vcsState = VcsVersion.vcsState()
Expand All @@ -95,7 +99,7 @@ object scalatags extends Module {

object native extends Cross[NativeScalatagsModule](scalaVersions)
trait NativeScalatagsModule extends ScalaNativeModule with ScalatagsPublishModule {
def scalaNativeVersion = "0.4.5"
def scalaNativeVersion = "0.5.0"
// No released Scala Native Scala 3 version yet
def mimaPreviousArtifacts = if(isScala3(crossScalaVersion)) Agg.empty[Dep] else super.mimaPreviousArtifacts()
object test extends ScalaNativeTests with CommonTestModule
Expand All @@ -104,6 +108,6 @@ object scalatags extends Module {

object example extends ScalaJSModule{
def scalaVersion = scalaVersions.head
def scalaJSVersion = "1.10.1"
def scalaJSVersion = "1.12.0"
def moduleDeps = Seq(scalatags.js(scalaVersions.head))
}
8 changes: 8 additions & 0 deletions readme/Readme.scalatex
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,14 @@

@def pr(s: Int) = a(s, href:="https://github.com/lihaoyi/scalatags/pull/"+s)
@sect{Changelog}
@sect{0.10.0}
@ul
@li
Support for Scala Native 0.5.0
@li
Dropped Scala 2.11.x support
@li
Minimum version of Scala 3 increased to 3.3.1
@sect{0.9.3}
@ul
@li
Expand Down

0 comments on commit 679d3fd

Please sign in to comment.