Skip to content

Commit 09b48f6

Browse files
Revert "Update libs for scala3"
This reverts commit 4a16144.
1 parent 4a16144 commit 09b48f6

File tree

4 files changed

+25
-51
lines changed

4 files changed

+25
-51
lines changed

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,3 @@
22
*.iml
33
.idea/
44
/lowered.hnir
5-
/target
6-
/target/*
7-
/project
8-
/project/*
9-
.bsp

autowire/test/src/autowire/UpickleTests.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ object UpickleTests extends TestSuite {
228228
test("invalidJson") - {
229229
test - check(Map("x" -> "]", "ys" -> "2}34")) {
230230
case Error.InvalidInput(
231-
Error.Param.Invalid("x", ParseException("expected json value got ] (line 1, column 1)", _)),
231+
Error.Param.Invalid("x", ParseException("expected json value got ] (line 1, column 1)", _, _, _)),
232232
Error.Param.Invalid("ys", AbortException("expected sequence got number", _, _, _, _))
233233
) =>
234234
}
@@ -239,15 +239,15 @@ object UpickleTests extends TestSuite {
239239
}
240240
test - check(Map("x" -> "]", "ys" -> "[234]")) {
241241
case Error.InvalidInput(
242-
Error.Param.Invalid("x", ParseException("expected json value got ] (line 1, column 1)", _))
242+
Error.Param.Invalid("x", ParseException("expected json value got ] (line 1, column 1)", _, _, _))
243243
) =>
244244
}
245245
}
246246

247247
test("mix") - {
248248
test - check(Map("x" -> "]")) {
249249
case Error.InvalidInput(
250-
Error.Param.Invalid("x", ParseException("expected json value got ] (line 1, column 1)", _)),
250+
Error.Param.Invalid("x", ParseException("expected json value got ] (line 1, column 1)", _, _, _)),
251251
Error.Param.Missing("ys")
252252
) =>
253253
}

build.sc

Lines changed: 21 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,56 +3,39 @@ import scalalib._
33
import scalajslib._
44
import scalanativelib._
55
import publish._
6-
import mill.scalalib.api.Util.isScala3
76

8-
val scala213 = "2.13.7"
9-
val scala31 = "3.1.0"
7+
val scala212 = "2.12.13"
8+
val scala213 = "2.13.4"
109

11-
val scalaJS06 = "0.6.33"
12-
val scalaJS1 = "1.8.0"
13-
val scalaNative = "0.4.0"
14-
15-
val crossVersions = Seq(scala213, scala31)
16-
17-
val scalaJSVersions = Seq(
18-
(scala213, scalaJS06),
19-
(scala213, scalaJS1),
20-
(scala31, scalaJS1)
21-
)
22-
23-
val scalaNativeVersions = Seq(
24-
(scala213, scalaNative)
25-
)
10+
val crossVersions = Seq(scala212, scala213)
2611

2712
object autowire extends Module{
2813
object jvm extends Cross[autowireJvmModule](crossVersions:_*)
2914
class autowireJvmModule(val crossScalaVersion: String) extends AutowireModule{
3015
object test extends Tests with CommonTestModule
3116
}
3217

33-
object js extends Cross[autowireJsModule](scalaJSVersions:_*)
34-
class autowireJsModule(val crossScalaVersion: String, val crossScalaJSVersion: String) extends AutowireModule with ScalaJSModule{
35-
def scalaJSVersion = "1.8.0"
18+
object js extends Cross[autowireJsModule](crossVersions:_*)
19+
class autowireJsModule(val crossScalaVersion: String) extends AutowireModule with ScalaJSModule{
20+
def scalaJSVersion = "1.4.0"
3621
object test extends CommonTestModule with Tests
3722
}
3823

39-
object native extends Cross[autowireNativeModule](scalaNativeVersions:_*)
24+
object native extends Cross[autowireNativeModule](crossVersions:_*)
4025
class autowireNativeModule(val crossScalaVersion: String) extends AutowireModule with ScalaNativeModule{
4126
def scalaNativeVersion = "0.4.0"
4227
object test extends CommonTestModule with Tests
4328
}
4429
}
4530

4631
trait AutowireModule extends CrossScalaModule with PublishModule{
47-
def scalacPluginIvyDeps = Agg(ivy"com.lihaoyi:acyclic_2.13.0:0.3.0")
48-
def compileIvyDeps = if (!isScala3(crossScalaVersion)) Agg(
49-
ivy"com.lihaoyi:acyclic_2.13.0:0.3.0",
50-
ivy"org.scala-lang:scala-reflect:${crossScalaVersion}"
51-
)
52-
else Agg.empty[Dep]
53-
32+
def scalacPluginIvyDeps = Agg(ivy"com.lihaoyi::acyclic:0.2.0")
33+
def compileIvyDeps = Agg(
34+
ivy"com.lihaoyi::acyclic:0.2.0",
35+
ivy"org.scala-lang:scala-reflect:${scalaVersion()}"
36+
)
5437
def artifactName = "autowire"
55-
def publishVersion = "0.3.4"
38+
def publishVersion = "0.3.3"
5639
def pomSettings = PomSettings(
5740
description = artifactName(),
5841
organization = "com.lihaoyi",
@@ -75,20 +58,16 @@ trait AutowireModule extends CrossScalaModule with PublishModule{
7558
def millSourcePath = super.millSourcePath / os.up
7659
}
7760
trait CommonTestModule extends ScalaModule with TestModule{
78-
79-
def ivyDeps = T{ super.ivyDeps() ++
61+
def ivyDeps = T{ super.ivyDeps() ++
8062
Agg(
81-
ivy"com.lihaoyi::utest::0.7.10",
82-
ivy"com.lihaoyi::upickle::1.4.3"
63+
ivy"com.lihaoyi::utest::0.7.7",
64+
ivy"com.lihaoyi::upickle::1.2.3"
8365
)
8466
}
85-
def scalacPluginIvyDeps = Agg(ivy"com.lihaoyi:acyclic_2.13.0:0.3.0")
86-
def compileIvyDeps = T{
87-
if (!isScala3(scalaVersion())) Agg(
88-
ivy"com.lihaoyi::acyclic:0.2.0",
89-
ivy"org.scala-lang:scala-reflect:2.13.7"
90-
)
91-
else Agg.empty[Dep]
92-
}
67+
def scalacPluginIvyDeps = Agg(ivy"com.lihaoyi::acyclic:0.2.0")
68+
def compileIvyDeps = Agg(
69+
ivy"com.lihaoyi::acyclic:0.2.0",
70+
ivy"org.scala-lang:scala-reflect:${scalaVersion()}"
71+
)
9372
def testFrameworks = Seq("utest.runner.Framework")
9473
}

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.11
6+
DEFAULT_MILL_VERSION=0.9.5
77

88
set -e
99

0 commit comments

Comments
 (0)