Skip to content

Commit b7913bd

Browse files
authored
Support Scala Native Scala 3 (#97)
1 parent ad396aa commit b7913bd

File tree

4 files changed

+21
-24
lines changed

4 files changed

+21
-24
lines changed

.mill-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.9.6-61-bd7927
1+
0.10.0-21-c4247b

build.sc

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version_mill0.9:0.1.1`
1+
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.1.4`
22

33
import mill._
44
import mill.define.Target
@@ -10,21 +10,17 @@ import de.tobiasroeser.mill.vcs.version.VcsVersion
1010

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

13-
val scalaVersions = "2.12.13" :: "2.13.4" :: "2.11.12" :: "3.0.0" :: dottyVersions
14-
val scala2Versions = scalaVersions.filter(_.startsWith("2."))
15-
16-
val scalaJSVersions = for {
17-
scalaV <- scala2Versions
18-
scalaJSV <- Seq("0.6.33", "1.5.1")
19-
} yield (scalaV, scalaJSV)
13+
val scala2AndDottyVersions = "2.12.13" :: "2.13.4" :: "2.11.12" :: dottyVersions
14+
val scala30 = "3.0.0"
15+
val scala31 = "3.1.0"
2016

2117
val scalaNativeVersions = for {
22-
scalaV <- scala2Versions
23-
scalaNativeV <- Seq("0.4.0")
18+
scalaV <- scala31 :: scala2AndDottyVersions
19+
scalaNativeV <- Seq("0.4.3")
2420
} yield (scalaV, scalaNativeV)
2521

2622
object os extends Module {
27-
object jvm extends Cross[OsJvmModule](scalaVersions:_*)
23+
object jvm extends Cross[OsJvmModule](scala30 :: scala2AndDottyVersions:_*)
2824

2925
class OsJvmModule(val crossScalaVersion: String) extends OsModule {
3026
def platformSegment = "jvm"
@@ -36,7 +32,7 @@ object os extends Module {
3632

3733
class OsNativeModule(val crossScalaVersion: String, crossScalaNativeVersion: String) extends OsModule with ScalaNativeModule {
3834
def platformSegment = "native"
39-
def millSourcePath = super.millSourcePath / ammonite.ops.up
35+
def millSourcePath = super.millSourcePath / _root_.os.up
4036
def scalaNativeVersion = crossScalaNativeVersion
4137
object test extends Tests with OsLibTestModule{
4238
def platformSegment = "native"
@@ -45,7 +41,7 @@ object os extends Module {
4541
}
4642

4743
object watch extends Module {
48-
object jvm extends Cross[WatchJvmModule](scalaVersions:_*)
44+
object jvm extends Cross[WatchJvmModule](scala30 :: scala2AndDottyVersions:_*)
4945
class WatchJvmModule(val crossScalaVersion: String) extends WatchModule {
5046
def platformSegment = "jvm"
5147
def moduleDeps = super.moduleDeps :+ os.jvm()
@@ -83,31 +79,31 @@ trait OsLibModule extends CrossScalaModule with PublishModule{
8379
organization = "com.lihaoyi",
8480
url = "https://github.com/lihaoyi/os",
8581
licenses = Seq(License.MIT),
86-
scm = SCM(
87-
"git://github.com/lihaoyi/os.git",
88-
"scm:git://github.com/lihaoyi/os.git"
82+
versionControl = VersionControl.github(
83+
owner = "com-lihaoyi",
84+
repo = "os-lib"
8985
),
9086
developers = Seq(
91-
Developer("lihaoyi", "Li Haoyi","https://github.com/lihaoyi")
87+
Developer("lihaoyi", "Li Haoyi", "https://github.com/lihaoyi")
9288
)
9389
)
9490

9591
def platformSegment: String
96-
def millSourcePath = super.millSourcePath / ammonite.ops.up
92+
def millSourcePath = super.millSourcePath / _root_.os.up
9793
def sources = T.sources(
9894
millSourcePath / "src",
9995
millSourcePath / s"src-$platformSegment"
10096
)
101-
def acyclicDep: T[Agg[Dep]] = T { if (!isDotty) Agg(ivy"com.lihaoyi::acyclic:0.2.1") else Agg() }
97+
def acyclicDep: T[Agg[Dep]] = T { if (!isDotty) Agg(ivy"com.lihaoyi:::acyclic:0.3.2") else Agg() }
10298
def compileIvyDeps = acyclicDep
10399
def scalacOptions = T { if (!isDotty) Seq("-P:acyclic:force") else Seq.empty }
104100
def scalacPluginIvyDeps = acyclicDep
105101
}
106102

107103
trait OsLibTestModule extends ScalaModule with TestModule{
108104
def ivyDeps = Agg(
109-
ivy"com.lihaoyi::utest::0.7.10",
110-
ivy"com.lihaoyi::sourcecode::0.2.7"
105+
ivy"com.lihaoyi::utest::0.7.11",
106+
ivy"com.lihaoyi::sourcecode::0.2.8"
111107
)
112108

113109
def platformSegment: String
@@ -124,7 +120,7 @@ trait OsModule extends OsLibModule{
124120
def artifactName = "os-lib"
125121

126122
def ivyDeps = Agg(
127-
ivy"com.lihaoyi::geny::0.7.0"
123+
ivy"com.lihaoyi::geny::0.7.1"
128124
)
129125
}
130126

mill

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This is a wrapper script, that automatically download mill from GitHub release pages
44
# You can give the required mill version with MILL_VERSION env variable
55
# If no version is given, it falls back to the value of DEFAULT_MILL_VERSION
6-
DEFAULT_MILL_VERSION=0.9.6-61-bd7927
6+
DEFAULT_MILL_VERSION=0.10.0-21-c4247b
77

88
set -e
99

os/src/Model.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import java.nio.file.{Files, LinkOption, Paths}
55
import java.nio.file.attribute._
66

77
import scala.io.Codec
8+
import scala.language.implicitConversions
89
import scala.util.Try
910

1011
/**

0 commit comments

Comments
 (0)