Skip to content

Commit da3e02d

Browse files
authored
Bump Mill to 0.11.5 (#133)
1 parent ac506a5 commit da3e02d

File tree

4 files changed

+31
-13
lines changed

4 files changed

+31
-13
lines changed

.github/workflows/actions.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
distribution: 'temurin'
2424
java-version: ${{ matrix.java }}
2525
- name: Run tests
26-
run: ./mill -i all __.publishArtifacts __.test
26+
run: ./mill -i __.publishArtifacts + __.test
2727

2828
check-binary-compatibility:
2929
runs-on: ubuntu-latest

.mill-version

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
0.10.10
1+
0.11.5
2+

build.sc

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
import mill._
22
import mill.scalalib.publish.{Developer, License, PomSettings, VersionControl}
33
import scalalib._
4-
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.3.0`
4+
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.4.0`
5+
import $ivy.`com.github.lolgab::mill-mima::0.0.23`
6+
57
import de.tobiasroeser.mill.vcs.version.VcsVersion
6-
import $ivy.`com.github.lolgab::mill-mima::0.0.13`
78
import com.github.lolgab.mill.mima._
89

910
val dottyVersion = sys.props.get("dottyVersion")
1011

1112
val scalaVersions = List("2.12.17", "2.13.10", "2.11.12", "3.1.1") ++ dottyVersion
1213

13-
object requests extends Cross[RequestsModule](scalaVersions: _*)
14-
class RequestsModule(val crossScalaVersion: String) extends CrossScalaModule with PublishModule with Mima {
14+
object requests extends Cross[RequestsModule](scalaVersions)
15+
trait RequestsModule extends CrossScalaModule with PublishModule with Mima {
1516
def publishVersion = VcsVersion.vcsState().format()
1617
def mimaPreviousVersions = (Seq("0.7.0", "0.7.1") ++ VcsVersion.vcsState().lastTag.toSeq).distinct
1718
override def mimaBinaryIssueFilters = Seq(
1819
ProblemFilter.exclude[ReversedMissingMethodProblem]("requests.BaseSession.send"),
1920
ProblemFilter.exclude[DirectMissingMethodProblem]("requests.Response.string")
2021
)
21-
def artifactName = "requests"
22+
2223
def pomSettings = PomSettings(
2324
description = "Scala port of the popular Python Requests HTTP client",
2425
organization = "com.lihaoyi",
@@ -29,10 +30,10 @@ class RequestsModule(val crossScalaVersion: String) extends CrossScalaModule wit
2930
Developer("lihaoyi", "Li Haoyi","https://github.com/lihaoyi")
3031
)
3132
)
32-
def ivyDeps = Agg(
33-
ivy"com.lihaoyi::geny::1.0.0"
34-
)
35-
object test extends Tests with TestModule.Utest {
33+
34+
def ivyDeps = Agg(ivy"com.lihaoyi::geny::1.0.0")
35+
36+
object test extends ScalaTests with TestModule.Utest {
3637
def ivyDeps = Agg(
3738
ivy"com.lihaoyi::utest::0.7.10",
3839
ivy"com.lihaoyi::ujson::1.3.13"

mill

+18-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@
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.10.10
76

87
set -e
98

9+
if [ -z "${DEFAULT_MILL_VERSION}" ] ; then
10+
DEFAULT_MILL_VERSION=0.11.5
11+
fi
12+
1013
if [ -z "$MILL_VERSION" ] ; then
1114
if [ -f ".mill-version" ] ; then
1215
MILL_VERSION="$(head -n 1 .mill-version 2> /dev/null)"
16+
elif [ -f ".config/mill-version" ] ; then
17+
MILL_VERSION="$(head -n 1 .config/mill-version 2> /dev/null)"
1318
elif [ -f "mill" ] && [ "$0" != "mill" ] ; then
1419
MILL_VERSION=$(grep -F "DEFAULT_MILL_VERSION=" "mill" | head -n 1 | cut -d= -f2)
1520
else
@@ -43,7 +48,18 @@ if [ ! -s "$MILL_EXEC_PATH" ] ; then
4348
unset MILL_DOWNLOAD_URL
4449
fi
4550

51+
if [ -z "$MILL_MAIN_CLI" ] ; then
52+
MILL_MAIN_CLI="${0}"
53+
fi
54+
55+
MILL_FIRST_ARG=""
56+
if [ "$1" = "--bsp" ] || [ "$1" = "-i" ] || [ "$1" = "--interactive" ] || [ "$1" = "--no-server" ] || [ "$1" = "--repl" ] || [ "$1" = "--help" ] ; then
57+
# Need to preserve the first position of those listed options
58+
MILL_FIRST_ARG=$1
59+
shift
60+
fi
61+
4662
unset MILL_DOWNLOAD_PATH
4763
unset MILL_VERSION
4864

49-
exec $MILL_EXEC_PATH "$@"
65+
exec $MILL_EXEC_PATH $MILL_FIRST_ARG -D "mill.main.cli=${MILL_MAIN_CLI}" "$@"

0 commit comments

Comments
 (0)