Skip to content

Commit

Permalink
Bump Mill to 0.11.5 (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi authored Nov 14, 2023
1 parent ac506a5 commit da3e02d
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Run tests
run: ./mill -i all __.publishArtifacts __.test
run: ./mill -i __.publishArtifacts + __.test

check-binary-compatibility:
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion .mill-version
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
0.10.10
0.11.5

19 changes: 10 additions & 9 deletions build.sc
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
import mill._
import mill.scalalib.publish.{Developer, License, PomSettings, VersionControl}
import scalalib._
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.3.0`
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.4.0`
import $ivy.`com.github.lolgab::mill-mima::0.0.23`

import de.tobiasroeser.mill.vcs.version.VcsVersion
import $ivy.`com.github.lolgab::mill-mima::0.0.13`
import com.github.lolgab.mill.mima._

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

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

object requests extends Cross[RequestsModule](scalaVersions: _*)
class RequestsModule(val crossScalaVersion: String) extends CrossScalaModule with PublishModule with Mima {
object requests extends Cross[RequestsModule](scalaVersions)
trait RequestsModule extends CrossScalaModule with PublishModule with Mima {
def publishVersion = VcsVersion.vcsState().format()
def mimaPreviousVersions = (Seq("0.7.0", "0.7.1") ++ VcsVersion.vcsState().lastTag.toSeq).distinct
override def mimaBinaryIssueFilters = Seq(
ProblemFilter.exclude[ReversedMissingMethodProblem]("requests.BaseSession.send"),
ProblemFilter.exclude[DirectMissingMethodProblem]("requests.Response.string")
)
def artifactName = "requests"

def pomSettings = PomSettings(
description = "Scala port of the popular Python Requests HTTP client",
organization = "com.lihaoyi",
Expand All @@ -29,10 +30,10 @@ class RequestsModule(val crossScalaVersion: String) extends CrossScalaModule wit
Developer("lihaoyi", "Li Haoyi","https://github.com/lihaoyi")
)
)
def ivyDeps = Agg(
ivy"com.lihaoyi::geny::1.0.0"
)
object test extends Tests with TestModule.Utest {

def ivyDeps = Agg(ivy"com.lihaoyi::geny::1.0.0")

object test extends ScalaTests with TestModule.Utest {
def ivyDeps = Agg(
ivy"com.lihaoyi::utest::0.7.10",
ivy"com.lihaoyi::ujson::1.3.13"
Expand Down
20 changes: 18 additions & 2 deletions mill
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
# 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.10

set -e

if [ -z "${DEFAULT_MILL_VERSION}" ] ; then
DEFAULT_MILL_VERSION=0.11.5
fi

if [ -z "$MILL_VERSION" ] ; then
if [ -f ".mill-version" ] ; then
MILL_VERSION="$(head -n 1 .mill-version 2> /dev/null)"
elif [ -f ".config/mill-version" ] ; then
MILL_VERSION="$(head -n 1 .config/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
Expand Down Expand Up @@ -43,7 +48,18 @@ if [ ! -s "$MILL_EXEC_PATH" ] ; then
unset MILL_DOWNLOAD_URL
fi

if [ -z "$MILL_MAIN_CLI" ] ; then
MILL_MAIN_CLI="${0}"
fi

MILL_FIRST_ARG=""
if [ "$1" = "--bsp" ] || [ "$1" = "-i" ] || [ "$1" = "--interactive" ] || [ "$1" = "--no-server" ] || [ "$1" = "--repl" ] || [ "$1" = "--help" ] ; then
# Need to preserve the first position of those listed options
MILL_FIRST_ARG=$1
shift
fi

unset MILL_DOWNLOAD_PATH
unset MILL_VERSION

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

0 comments on commit da3e02d

Please sign in to comment.