Skip to content

Commit

Permalink
Bump uTest to 0.8.4 (#3340)
Browse files Browse the repository at this point in the history
This should avoid problems with ansii escape code crashing
  • Loading branch information
lihaoyi authored Aug 6, 2024
1 parent 86c96f7 commit 2151e93
Show file tree
Hide file tree
Showing 23 changed files with 83 additions and 83 deletions.
2 changes: 1 addition & 1 deletion build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ object Deps {
// tests framework (test)
val scalaCheck = ivy"org.scalacheck::scalacheck:1.18.0"
val scalaTest = ivy"org.scalatest::scalatest:3.2.19"
val utest = ivy"com.lihaoyi::utest:0.8.3"
val utest = ivy"com.lihaoyi::utest:0.8.4"
val zioTest = ivy"dev.zio::zio-test:2.0.22"
}

Expand Down
6 changes: 3 additions & 3 deletions ci/test-mill-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ EXAMPLE=example/scalabuilds/9-realistic

rm -rf $EXAMPLE/out

test ! -d $EXAMPLE/out/foo/3.2.2/compile.dest
test ! -d $EXAMPLE/out/foo/3.3.3/compile.dest
test ! -f $EXAMPLE/out/bar/2.13.8/assembly.dest/out.jar

./mill -i dev.run $EXAMPLE -i "foo[3.2.2].run"
./mill -i dev.run $EXAMPLE -i "foo[3.3.3].run"

test -d $EXAMPLE/out/foo/3.2.2/compile.dest
test -d $EXAMPLE/out/foo/3.3.3/compile.dest

./mill -i dev.run $EXAMPLE show "bar[2.13.8].assembly"

Expand Down
6 changes: 3 additions & 3 deletions ci/test-mill-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ EXAMPLE=example/scalabuilds/9-realistic

rm -rf $EXAMPLE/out

test ! -d $EXAMPLE/out/foo/3.2.2/compile.dest
test ! -d $EXAMPLE/out/foo/3.3.3/compile.dest
test ! -f $EXAMPLE/out/bar/2.13.8/assembly.dest/out.jar

(cd $EXAMPLE && ../../../out/dev/assembly.dest/mill -i "foo[3.2.2].run")
(cd $EXAMPLE && ../../../out/dev/assembly.dest/mill -i "foo[3.3.3].run")

test -d $EXAMPLE/out/foo/3.2.2/compile.dest
test -d $EXAMPLE/out/foo/3.3.3/compile.dest

(cd $EXAMPLE && ../../../out/dev/assembly.dest/mill show "bar[2.13.8].assembly")

Expand Down
2 changes: 1 addition & 1 deletion example/basic/1-simple/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ object foo extends RootModule with ScalaModule {
)

object test extends ScalaTests {
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.7.11")
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.8.4")
def testFramework = "utest.runner.Framework"
}
}
Expand Down
2 changes: 1 addition & 1 deletion example/basic/3-multi-module/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import mill._, scalalib._
trait MyModule extends ScalaModule {
def scalaVersion = "2.13.11"
object test extends ScalaTests {
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.7.11")
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.8.4")
def testFramework = "utest.runner.Framework"
}
}
Expand Down
2 changes: 1 addition & 1 deletion example/basic/5-multiple-test-frameworks/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ object foo extends RootModule with ScalaModule {

object test extends ScalaTests {
def ivyDeps = Agg(
ivy"com.lihaoyi::utest:0.7.11",
ivy"com.lihaoyi::utest:0.8.4",
ivy"org.scalatest::scalatest-freespec:3.2.18"
)
def testFramework = "utest.runner.Framework"
Expand Down
8 changes: 4 additions & 4 deletions example/scalabuilds/5-test-suite/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import mill._, scalalib._
object foo extends ScalaModule {
def scalaVersion = "2.13.8"
object test extends ScalaTests {
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.7.11")
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.8.4")
def testFramework = "utest.runner.Framework"
}
}
Expand Down Expand Up @@ -52,7 +52,7 @@ object bar extends ScalaModule {
def scalaVersion = "2.13.8"

object test extends ScalaTests with TestModule.Utest {
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.7.11")
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.8.4")
}
}
//// SNIPPET:END
Expand Down Expand Up @@ -92,10 +92,10 @@ object qux extends ScalaModule {
def scalaVersion = "2.13.8"

object test extends ScalaTests with TestModule.Utest {
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.7.11")
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.8.4")
}
object integration extends ScalaTests with TestModule.Utest {
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.7.11")
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.8.4")
}
}
//// SNIPPET:END
Expand Down
4 changes: 2 additions & 2 deletions example/scalabuilds/8-compat-modules/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import mill._, scalalib._
object foo extends SbtModule {
def scalaVersion = "2.13.8"
object test extends SbtTests {
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.7.11")
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.8.4")
def testFramework = "utest.runner.Framework"
}
}
Expand All @@ -13,7 +13,7 @@ object foo extends SbtModule {
object bar extends Cross[BarModule]("2.12.17", "2.13.8")
trait BarModule extends CrossSbtModule {
object test extends CrossSbtTests {
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.7.11")
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.8.4")
def testFramework = "utest.runner.Framework"
}
}
Expand Down
14 changes: 7 additions & 7 deletions example/scalabuilds/9-realistic/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ trait MyModule extends PublishModule {
trait MyScalaModule extends MyModule with CrossScalaModule {
def ivyDeps = Agg(ivy"com.lihaoyi::scalatags:0.12.0")
object test extends ScalaTests {
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.7.11")
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.8.4")
def testFramework = "utest.runner.Framework"
}
}

val scalaVersions = Seq("2.13.8", "3.2.2")
val scalaVersions = Seq("2.13.8", "3.3.3")

object foo extends Cross[FooModule](scalaVersions)
trait FooModule extends MyScalaModule {
Expand Down Expand Up @@ -84,12 +84,12 @@ object qux extends JavaModule with MyModule
> mill resolve __.run
bar[2.13.8].run
bar[2.13.8].test.run
bar[3.2.2].run
bar[3.2.2].test.run
bar[3.3.3].run
bar[3.3.3].test.run
foo[2.13.8].run
foo[2.13.8].test.run
foo[3.2.2].run
foo[3.2.2].test.run
foo[3.3.3].run
foo[3.3.3].test.run
qux.run
> mill foo[2.13.8].run
Expand All @@ -98,7 +98,7 @@ Foo.value: <h1>hello</h1>
Bar.value: <p>world Specific code for Scala 2.x</p>
Qux.value: 31337
> mill bar[3.2.2].test
> mill bar[3.3.3].test
+ bar.BarTests.test ... <p>world Specific code for Scala 3.x</p>
> mill qux.run
Expand Down
2 changes: 1 addition & 1 deletion example/scalamodule/12-contrib-scoverage/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ object foo extends RootModule with ScoverageModule {
)

object test extends ScoverageTests /*with TestModule.Utest */{
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.7.11")
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.8.4")
def testFramework = "utest.runner.Framework"
}
}
Expand Down
4 changes: 2 additions & 2 deletions example/scalamodule/4-test-deps/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ object qux extends ScalaModule {
def moduleDeps = Seq(baz)

object test extends ScalaTests {
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.7.11")
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.8.4")
def testFramework = "utest.runner.Framework"
def moduleDeps = super.moduleDeps ++ Seq(baz.test)
}
Expand All @@ -29,7 +29,7 @@ object baz extends ScalaModule {
def scalaVersion = "2.13.8"

object test extends ScalaTests {
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.7.11")
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.8.4")
def testFramework = "utest.runner.Framework"
}
}
Expand Down
2 changes: 1 addition & 1 deletion example/thirdparty/acyclic/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import mill._, scalalib._, publish._
object Deps {
def acyclic = ivy"com.lihaoyi:::acyclic:0.3.6"
def scalaCompiler(scalaVersion: String) = ivy"org.scala-lang:scala-compiler:$scalaVersion"
val utest = ivy"com.lihaoyi::utest:0.8.1"
val utest = ivy"com.lihaoyi::utest:0.8.4"
}

val crosses =
Expand Down
4 changes: 2 additions & 2 deletions example/thirdparty/fansi/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ trait FansiModule extends PublishModule with CrossScalaModule with PlatformScala
def ivyDeps = Agg(ivy"com.lihaoyi::sourcecode::0.3.0")

trait FansiTests extends ScalaTests with TestModule.Utest {
def ivyDeps = Agg(ivy"com.lihaoyi::utest::0.8.1")
def ivyDeps = Agg(ivy"com.lihaoyi::utest::0.8.4")
}
}

Expand All @@ -33,7 +33,7 @@ object fansi extends Module {

object js extends Cross[JsFansiModule](scalaVersions)
trait JsFansiModule extends FansiModule with ScalaJSModule {
def scalaJSVersion = "1.10.1"
def scalaJSVersion = "1.16.0"
object test extends FansiTests with ScalaJSTests
}

Expand Down
2 changes: 1 addition & 1 deletion example/web/1-todo-webapp/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ object root extends RootModule with ScalaModule {
def testFramework = "utest.runner.Framework"

def ivyDeps = Agg(
ivy"com.lihaoyi::utest::0.7.10",
ivy"com.lihaoyi::utest::0.8.4",
ivy"com.lihaoyi::requests::0.6.9",
)
}
Expand Down
2 changes: 1 addition & 1 deletion example/web/2-webapp-cache-busting/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ object root extends RootModule with ScalaModule {
object test extends ScalaTests {
def testFramework = "utest.runner.Framework"
def ivyDeps = Agg(
ivy"com.lihaoyi::utest::0.7.10",
ivy"com.lihaoyi::utest::0.8.4",
ivy"com.lihaoyi::requests::0.6.9",
)
}
Expand Down
6 changes: 3 additions & 3 deletions example/web/3-scalajs-module/build.sc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import mill._, scalalib._, scalajslib._

object foo extends ScalaJSModule {
def scalaVersion = "2.13.8"
def scalaJSVersion = "1.13.0"
def scalaVersion = "2.13.14"
def scalaJSVersion = "1.16.0"
def ivyDeps = Agg(ivy"com.lihaoyi::scalatags::0.12.0")
object test extends ScalaJSTests {
def ivyDeps = Agg(ivy"com.lihaoyi::utest::0.7.11")
def ivyDeps = Agg(ivy"com.lihaoyi::utest::0.8.4")
def testFramework = "utest.runner.Framework"
}
}
Expand Down
10 changes: 5 additions & 5 deletions example/web/4-webapp-scalajs/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import mill._, scalalib._, scalajslib._

object root extends RootModule with ScalaModule {

def scalaVersion = "2.13.8"
def scalaVersion = "2.13.14"
def ivyDeps = Agg(
ivy"com.lihaoyi::cask:0.9.1",
ivy"com.lihaoyi::scalatags:0.12.0"
Expand All @@ -22,14 +22,14 @@ object root extends RootModule with ScalaModule {
def testFramework = "utest.runner.Framework"

def ivyDeps = Agg(
ivy"com.lihaoyi::utest::0.7.10",
ivy"com.lihaoyi::utest::0.8.4",
ivy"com.lihaoyi::requests::0.6.9",
)
}

object client extends ScalaJSModule {
def scalaVersion = "2.13.8"
def scalaJSVersion = "1.13.0"
def scalaVersion = "2.13.14"
def scalaJSVersion = "1.16.0"
def ivyDeps = Agg(ivy"org.scala-js::scalajs-dom::2.2.0")
}
}
Expand Down Expand Up @@ -57,7 +57,7 @@ object root extends RootModule with ScalaModule {
...
> curl http://localhost:8082/static/main.js
...Scala.js...
..."org.scalajs.linker.runtime.RuntimeLong"...
...
> ./mill clean runBackground
Expand Down
4 changes: 2 additions & 2 deletions example/web/5-webapp-scalajs-shared/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ trait AppScalaModule extends ScalaModule {
}

trait AppScalaJSModule extends AppScalaModule with ScalaJSModule {
def scalaJSVersion = "1.13.0"
def scalaJSVersion = "1.16.0"
}

object root extends RootModule with AppScalaModule {
Expand All @@ -23,7 +23,7 @@ object root extends RootModule with AppScalaModule {
object test extends ScalaTests with TestModule.Utest {

def ivyDeps = Agg(
ivy"com.lihaoyi::utest::0.7.10",
ivy"com.lihaoyi::utest::0.8.4",
ivy"com.lihaoyi::requests::0.6.9",
)
}
Expand Down
30 changes: 15 additions & 15 deletions example/web/6-cross-version-platform-publishing/build.sc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import mill._, scalalib._, scalajslib._, publish._

object foo extends Cross[FooModule]("2.13.8", "3.2.2")
object foo extends Cross[FooModule]("2.13.14", "3.3.3")
trait FooModule extends Cross.Module[String] {
trait Shared extends CrossScalaModule with CrossValue with PlatformScalaModule with PublishModule {
def publishVersion = "0.0.1"
Expand All @@ -18,12 +18,12 @@ trait FooModule extends Cross.Module[String] {
}

trait FooTestModule extends TestModule {
def ivyDeps = Agg(ivy"com.lihaoyi::utest::0.7.11")
def ivyDeps = Agg(ivy"com.lihaoyi::utest::0.8.4")
def testFramework = "utest.runner.Framework"
}

trait SharedJS extends Shared with ScalaJSModule {
def scalaJSVersion = "1.13.0"
def scalaJSVersion = "1.16.0"
}

object bar extends Module {
Expand Down Expand Up @@ -52,46 +52,46 @@ trait FooModule extends Cross.Module[String] {
}

// This example demonstrates how to publish Scala modules which are both
// cross-version and cross-platform: running on both Scala 2.13.8/3.2.2 as
// cross-version and cross-platform: running on both Scala 2.13.14/3.3.3 as
// well as Scala-JVM/JS.

/** Usage
> ./mill show foo[2.13.8].bar.jvm.sources
> ./mill show foo[2.13.14].bar.jvm.sources
[
".../foo/bar/src",
".../foo/bar/src-jvm",
".../foo/bar/src-2.13.8",
".../foo/bar/src-2.13.8-jvm",
".../foo/bar/src-2.13.14",
".../foo/bar/src-2.13.14-jvm",
".../foo/bar/src-2.13",
".../foo/bar/src-2.13-jvm",
".../foo/bar/src-2",
".../foo/bar/src-2-jvm"
]
> ./mill show foo[3.2.2].qux.js.sources
> ./mill show foo[3.3.3].qux.js.sources
[
".../foo/qux/src",
".../foo/qux/src-js",
".../foo/qux/src-3.2.2",
".../foo/qux/src-3.2.2-js",
".../foo/qux/src-3.2",
".../foo/qux/src-3.2-js",
".../foo/qux/src-3.3.3",
".../foo/qux/src-3.3.3-js",
".../foo/qux/src-3.3",
".../foo/qux/src-3.3-js",
".../foo/qux/src-3",
".../foo/qux/src-3-js"
]
> ./mill foo[2.13.8].qux.jvm.run
> ./mill foo[2.13.14].qux.jvm.run
Bar.value: <p>world Specific code for Scala 2.x</p>
Parsing JSON with ujson.read
Qux.main: Set(<p>i</p>, <p>cow</p>, <p>me</p>)
> ./mill foo[3.2.2].qux.js.run
> ./mill foo[3.3.3].qux.js.run
Bar.value: <p>world Specific code for Scala 3.x</p>
Parsing JSON with js.JSON.parse
Qux.main: Set(<p>i</p>, <p>cow</p>, <p>me</p>)
> ./mill foo[3.2.2].__.js.test
> ./mill foo[3.3.3].__.js.test
+ bar.BarTests.test ... <p>world Specific code for Scala 3.x</p>
+ qux.QuxTests.parseJsonGetKeys ... Set(i, cow, me)
Expand Down
Loading

0 comments on commit 2151e93

Please sign in to comment.