Skip to content

Commit aee3ae7

Browse files
authored
Dependency updates (#72)
* Update versions, set Scala 3 to LTS (3.3) * Add mill launcher script
1 parent bca6151 commit aee3ae7

File tree

5 files changed

+69
-20
lines changed

5 files changed

+69
-20
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Setup Mill
3434
uses: jodersky/setup-mill@master
3535
with:
36-
mill-version: 0.10.7
36+
mill-version: 0.10.12
3737

3838
- name: Run tests
3939
run: |

.mill-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.10.10
1+
0.10.12

.scalafmt.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "3.7.0"
1+
version = "3.8.0"
22
runner.dialect = scala213
33
maxColumn = 120
44
fileOverride {

build.sc

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import mill.define.Target
22
import mill.util.Jvm
33
import $ivy.`com.lihaoyi::mill-contrib-bloop:$MILL_VERSION`
4-
import $ivy.`io.github.davidgregory084::mill-tpolecat::0.3.2`
4+
import $ivy.`io.github.davidgregory084::mill-tpolecat::0.3.5`
55
import $ivy.`io.chris-kipp::mill-ci-release::0.1.9`
66

77
import os.Path
@@ -15,15 +15,15 @@ import io.github.davidgregory084._
1515
import io.kipp.mill.ci.release.CiReleaseModule
1616

1717
object versions {
18-
val scala212Version = "2.12.16"
18+
val scala212Version = "2.12.1"
1919
val scala213Version = "2.13.11"
20-
val scala3Version = "3.1.2"
21-
val scalaJSVersion = "1.10.1"
22-
val scalaNativeVersion = "0.4.11"
23-
val munitVersion = "0.7.29"
24-
val munitNativeVersion = "1.0.0-M7"
25-
val fs2 = "3.3.0"
26-
val weaver = "0.8.0"
20+
val scala3Version = "3.3.3"
21+
val scalaJSVersion = "1.14.0"
22+
val scalaNativeVersion = "0.4.17"
23+
val munitVersion = "1.0.0-M9"
24+
val fs2Version = "3.10.0"
25+
val weaverVersion = "0.8.3"
26+
val jsoniterVersion = "2.17.0"
2727

2828
val scala213 = "2.13"
2929
val scala212 = "2.12"
@@ -40,7 +40,7 @@ import versions._
4040
object core extends RPCCrossPlatformModule { cross =>
4141

4242
def crossPlatformIvyDeps: T[Agg[Dep]] = Agg(
43-
ivy"com.github.plokhotnyuk.jsoniter-scala::jsoniter-scala-macros::2.17.0"
43+
ivy"com.github.plokhotnyuk.jsoniter-scala::jsoniter-scala-macros::${jsoniterVersion}"
4444
)
4545

4646
object jvm extends mill.Cross[JvmModule](scala213, scala3)
@@ -63,7 +63,7 @@ object fs2 extends RPCCrossPlatformModule { cross =>
6363

6464
override def crossPlatformModuleDeps = Seq(core)
6565
def crossPlatformIvyDeps: T[Agg[Dep]] = Agg(
66-
ivy"co.fs2::fs2-core::${versions.fs2}"
66+
ivy"co.fs2::fs2-core::${fs2Version}"
6767
)
6868

6969
object jvm extends mill.Cross[JvmModule](scala213, scala3)
@@ -86,13 +86,13 @@ object fs2 extends RPCCrossPlatformModule { cross =>
8686
object examples extends mill.define.Module {
8787

8888
object server extends ScalaModule {
89-
def ivyDeps = Agg(ivy"co.fs2::fs2-io:${versions.fs2}")
89+
def ivyDeps = Agg(ivy"co.fs2::fs2-io:${fs2Version}")
9090
def moduleDeps = Seq(fs2.jvm(versions.scala213))
9191
def scalaVersion = versions.scala213Version
9292
}
9393

9494
object client extends ScalaModule {
95-
def ivyDeps = Agg(ivy"co.fs2::fs2-io:${versions.fs2}")
95+
def ivyDeps = Agg(ivy"co.fs2::fs2-io:$fs2Version")
9696
def moduleDeps = Seq(fs2.jvm(versions.scala213))
9797
def scalaVersion = versions.scala213Version
9898
def forkEnv: Target[Map[String, String]] = T {
@@ -118,7 +118,7 @@ trait RPCCrossPlatformModule extends Module { shared =>
118118
override def platformLabel: String = "jvm"
119119

120120
trait WeaverTests extends Tests {
121-
def ivyDeps = super.ivyDeps() ++ Agg(ivy"com.disneystreaming::weaver-cats::$weaver")
121+
def ivyDeps = super.ivyDeps() ++ Agg(ivy"com.disneystreaming::weaver-cats::$weaverVersion")
122122
def testFramework = "weaver.framework.CatsEffect"
123123
}
124124

@@ -144,7 +144,7 @@ trait RPCCrossPlatformModule extends Module { shared =>
144144
override def skipIdea = true
145145

146146
trait WeaverTests extends Tests {
147-
def ivyDeps = super.ivyDeps() ++ Agg(ivy"com.disneystreaming::weaver-cats::$weaver")
147+
def ivyDeps = super.ivyDeps() ++ Agg(ivy"com.disneystreaming::weaver-cats::$weaverVersion")
148148
def testFramework = "weaver.framework.CatsEffect"
149149
}
150150

@@ -180,12 +180,12 @@ trait RPCCrossPlatformModule extends Module { shared =>
180180
override def skipBloop = true
181181

182182
trait WeaverTests extends Tests {
183-
def ivyDeps = super.ivyDeps() ++ Agg(ivy"com.disneystreaming::weaver-cats::$weaver")
183+
def ivyDeps = super.ivyDeps() ++ Agg(ivy"com.disneystreaming::weaver-cats::$weaverVersion")
184184
def testFramework = "weaver.framework.CatsEffect"
185185
}
186186

187187
trait MunitTests extends Tests with TestModule.Munit {
188-
def ivyDeps = super.ivyDeps() ++ Agg(ivy"org.scalameta::munit::$munitNativeVersion")
188+
def ivyDeps = super.ivyDeps() ++ Agg(ivy"org.scalameta::munit::$munitVersion")
189189
}
190190

191191
trait Tests extends super.Tests with mill.contrib.Bloop.Module {

mill

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/usr/bin/env sh
2+
3+
# This is a wrapper script, that automatically download mill from GitHub release pages
4+
# You can give the required mill version with MILL_VERSION env variable
5+
# If no version is given, it falls back to the value of DEFAULT_MILL_VERSION
6+
DEFAULT_MILL_VERSION=0.10.12
7+
8+
set -e
9+
10+
if [ -z "$MILL_VERSION" ] ; then
11+
if [ -f ".mill-version" ] ; then
12+
MILL_VERSION="$(head -n 1 .mill-version 2> /dev/null)"
13+
elif [ -f "mill" ] && [ "$0" != "mill" ] ; then
14+
MILL_VERSION=$(grep -F "DEFAULT_MILL_VERSION=" "mill" | head -n 1 | cut -d= -f2)
15+
else
16+
MILL_VERSION=$DEFAULT_MILL_VERSION
17+
fi
18+
fi
19+
20+
if [ "x${XDG_CACHE_HOME}" != "x" ] ; then
21+
MILL_DOWNLOAD_PATH="${XDG_CACHE_HOME}/mill/download"
22+
else
23+
MILL_DOWNLOAD_PATH="${HOME}/.cache/mill/download"
24+
fi
25+
MILL_EXEC_PATH="${MILL_DOWNLOAD_PATH}/${MILL_VERSION}"
26+
27+
version_remainder="$MILL_VERSION"
28+
MILL_MAJOR_VERSION="${version_remainder%%.*}"; version_remainder="${version_remainder#*.}"
29+
MILL_MINOR_VERSION="${version_remainder%%.*}"; version_remainder="${version_remainder#*.}"
30+
31+
if [ ! -s "$MILL_EXEC_PATH" ] ; then
32+
mkdir -p "$MILL_DOWNLOAD_PATH"
33+
if [ "$MILL_MAJOR_VERSION" -gt 0 ] || [ "$MILL_MINOR_VERSION" -ge 5 ] ; then
34+
ASSEMBLY="-assembly"
35+
fi
36+
DOWNLOAD_FILE=$MILL_EXEC_PATH-tmp-download
37+
MILL_VERSION_TAG=$(echo $MILL_VERSION | sed -E 's/([^-]+)(-M[0-9]+)?(-.*)?/\1\2/')
38+
MILL_DOWNLOAD_URL="https://github.com/lihaoyi/mill/releases/download/${MILL_VERSION_TAG}/$MILL_VERSION${ASSEMBLY}"
39+
curl --fail -L -o "$DOWNLOAD_FILE" "$MILL_DOWNLOAD_URL"
40+
chmod +x "$DOWNLOAD_FILE"
41+
mv "$DOWNLOAD_FILE" "$MILL_EXEC_PATH"
42+
unset DOWNLOAD_FILE
43+
unset MILL_DOWNLOAD_URL
44+
fi
45+
46+
unset MILL_DOWNLOAD_PATH
47+
unset MILL_VERSION
48+
49+
exec $MILL_EXEC_PATH "$@"

0 commit comments

Comments
 (0)