Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency updates #72

Merged
merged 3 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Setup Mill
uses: jodersky/setup-mill@master
with:
mill-version: 0.10.7
mill-version: 0.10.12

- name: Run tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .mill-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.10
0.10.12
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "3.7.0"
version = "3.8.0"
runner.dialect = scala213
maxColumn = 120
fileOverride {
Expand Down
34 changes: 17 additions & 17 deletions build.sc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import mill.define.Target
import mill.util.Jvm
import $ivy.`com.lihaoyi::mill-contrib-bloop:$MILL_VERSION`
import $ivy.`io.github.davidgregory084::mill-tpolecat::0.3.2`
import $ivy.`io.github.davidgregory084::mill-tpolecat::0.3.5`
import $ivy.`io.chris-kipp::mill-ci-release::0.1.9`

import os.Path
Expand All @@ -15,15 +15,15 @@ import io.github.davidgregory084._
import io.kipp.mill.ci.release.CiReleaseModule

object versions {
val scala212Version = "2.12.16"
val scala212Version = "2.12.1"
val scala213Version = "2.13.11"
val scala3Version = "3.1.2"
val scalaJSVersion = "1.10.1"
val scalaNativeVersion = "0.4.11"
val munitVersion = "0.7.29"
val munitNativeVersion = "1.0.0-M7"
val fs2 = "3.3.0"
val weaver = "0.8.0"
val scala3Version = "3.3.3"
val scalaJSVersion = "1.14.0"
val scalaNativeVersion = "0.4.17"
val munitVersion = "1.0.0-M9"
val fs2Version = "3.10.0"
val weaverVersion = "0.8.3"
val jsoniterVersion = "2.17.0"

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

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

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

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

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

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

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

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

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

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

Expand Down Expand Up @@ -180,12 +180,12 @@ trait RPCCrossPlatformModule extends Module { shared =>
override def skipBloop = true

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

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

trait Tests extends super.Tests with mill.contrib.Bloop.Module {
Expand Down
49 changes: 49 additions & 0 deletions mill
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/usr/bin/env sh

# This is a wrapper script, that automatically download mill from GitHub release pages
# You can give the required mill version with MILL_VERSION env variable
# If no version is given, it falls back to the value of DEFAULT_MILL_VERSION
DEFAULT_MILL_VERSION=0.10.12

set -e

if [ -z "$MILL_VERSION" ] ; then
if [ -f ".mill-version" ] ; then
MILL_VERSION="$(head -n 1 .mill-version 2> /dev/null)"
elif [ -f "mill" ] && [ "$0" != "mill" ] ; then
MILL_VERSION=$(grep -F "DEFAULT_MILL_VERSION=" "mill" | head -n 1 | cut -d= -f2)
else
MILL_VERSION=$DEFAULT_MILL_VERSION
fi
fi

if [ "x${XDG_CACHE_HOME}" != "x" ] ; then
MILL_DOWNLOAD_PATH="${XDG_CACHE_HOME}/mill/download"
else
MILL_DOWNLOAD_PATH="${HOME}/.cache/mill/download"
fi
MILL_EXEC_PATH="${MILL_DOWNLOAD_PATH}/${MILL_VERSION}"

version_remainder="$MILL_VERSION"
MILL_MAJOR_VERSION="${version_remainder%%.*}"; version_remainder="${version_remainder#*.}"
MILL_MINOR_VERSION="${version_remainder%%.*}"; version_remainder="${version_remainder#*.}"

if [ ! -s "$MILL_EXEC_PATH" ] ; then
mkdir -p "$MILL_DOWNLOAD_PATH"
if [ "$MILL_MAJOR_VERSION" -gt 0 ] || [ "$MILL_MINOR_VERSION" -ge 5 ] ; then
ASSEMBLY="-assembly"
fi
DOWNLOAD_FILE=$MILL_EXEC_PATH-tmp-download
MILL_VERSION_TAG=$(echo $MILL_VERSION | sed -E 's/([^-]+)(-M[0-9]+)?(-.*)?/\1\2/')
MILL_DOWNLOAD_URL="https://github.com/lihaoyi/mill/releases/download/${MILL_VERSION_TAG}/$MILL_VERSION${ASSEMBLY}"
curl --fail -L -o "$DOWNLOAD_FILE" "$MILL_DOWNLOAD_URL"
chmod +x "$DOWNLOAD_FILE"
mv "$DOWNLOAD_FILE" "$MILL_EXEC_PATH"
unset DOWNLOAD_FILE
unset MILL_DOWNLOAD_URL
fi

unset MILL_DOWNLOAD_PATH
unset MILL_VERSION

exec $MILL_EXEC_PATH "$@"
Loading