Skip to content

Commit

Permalink
Support Scala-Native 0.5.0, bump minimum versions of Scala 2 and Scal…
Browse files Browse the repository at this point in the history
…a 3 accordingly (#73)

This would be the first step in getting the rest of com.lihaoyi out for
scala native 0.5.0

Given the version support drops, which version should we bump here?
Would it be the major version (i.e. geny 2.0.0), or a minor version
(i.e. geny 1.1.0)? I am inclined to make it a minor version, reflecting
the fact that Scala 3.1.3 is not LTS so dropping support is not a huge
deal
  • Loading branch information
lihaoyi authored Apr 14, 2024
1 parent 332c75d commit 43d4238
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .mill-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.11
0.11.7-29-f2e220
6 changes: 6 additions & 0 deletions Readme.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,12 @@ particular usage pattern.

== Changelog

=== master

* Support for Scala-Native 0.5.0
* Minimum version of Scala 3 increased from 3.1.3 to 3.3.1
* Minimum version of Scala 2 increased from 2.11.x to 2.12.x

=== 1.0.0 - 2022-09-15

* Support Semantic Versioning
Expand Down
40 changes: 15 additions & 25 deletions build.sc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// plugins
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.3.0`
import $ivy.`com.github.lolgab::mill-mima::0.0.13`
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.4.0`
import $ivy.`com.github.lolgab::mill-mima::0.0.23`

// imports
import mill._, scalalib._, scalajslib._, scalanativelib._, publish._
Expand All @@ -11,16 +11,11 @@ import mill.scalalib.api.ZincWorkerUtil
val communityBuildDottyVersion = sys.props.get("dottyVersion").toList

val scalaVersions = Seq(
"3.1.3",
"3.3.1",
"2.13.8",
"2.12.17",
"2.11.12"
) ++ communityBuildDottyVersion

val scalaJSVersions = scalaVersions.map((_, "1.10.1"))
val scalaNativeVersions = scalaVersions.map((_, "0.4.5"))


trait MimaCheck extends Mima {
override def mimaPreviousVersions = T{
val sv = scalaVersion()
Expand Down Expand Up @@ -69,22 +64,18 @@ trait Common extends CrossScalaModule {
}

trait CommonTestModule extends ScalaModule with TestModule.Utest {
override def ivyDeps = Agg(ivy"com.lihaoyi::utest::0.8.1")
override def ivyDeps = Agg(ivy"com.lihaoyi::utest::0.8.3")
}

object geny extends Module {
object jvm extends Cross[JvmGenyModule](scalaVersions: _*)
class JvmGenyModule(val crossScalaVersion: String)
extends Common with ScalaModule with GenyPublishModule
{
object test extends Tests with CommonTestModule
object jvm extends Cross[JvmGenyModule](scalaVersions)
trait JvmGenyModule extends Common with ScalaModule with GenyPublishModule {
object test extends ScalaTests with CommonTestModule
}

object js extends Cross[JSGenyModule](scalaJSVersions: _*)
class JSGenyModule(val crossScalaVersion: String, crossJSVersion: String)
extends Common with ScalaJSModule with GenyPublishModule
{
def scalaJSVersion = crossJSVersion
object js extends Cross[JSGenyModule](scalaVersions)
trait JSGenyModule extends Common with ScalaJSModule with GenyPublishModule {
def scalaJSVersion = "1.12.0"
private def sourceMapOptions = T.task {
val vcsState = VcsVersion.vcsState()
vcsState.lastTag.collect {
Expand All @@ -96,14 +87,13 @@ object geny extends Module {
}
override def scalacOptions = super.scalacOptions() ++ sourceMapOptions()

object test extends Tests with CommonTestModule
object test extends ScalaJSTests with CommonTestModule
}

object native extends Cross[NativeGenyModule](scalaNativeVersions: _*)
class NativeGenyModule(val crossScalaVersion: String, crossScalaNativeVersion: String)
extends Common with ScalaNativeModule with GenyPublishModule
object native extends Cross[NativeGenyModule](scalaVersions)
trait NativeGenyModule extends Common with ScalaNativeModule with GenyPublishModule
{
def scalaNativeVersion = crossScalaNativeVersion
object test extends Tests with CommonTestModule
def scalaNativeVersion = "0.5.0"
object test extends ScalaNativeTests with CommonTestModule
}
}

0 comments on commit 43d4238

Please sign in to comment.