From 5a6185671eac6991c6a91687588a18347f5eef45 Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Tue, 22 Oct 2024 08:36:45 +0800 Subject: [PATCH 1/5] Update .mill-version --- .mill-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mill-version b/.mill-version index 5746d36d5..53cf705c9 100644 --- a/.mill-version +++ b/.mill-version @@ -1 +1 @@ -0.11.12 \ No newline at end of file +0.12.0-RC3-102-b8217f From 6a8c49815f207b7cdc3e8ef611e603435444eba6 Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Tue, 22 Oct 2024 10:24:28 +0800 Subject: [PATCH 2/5] wip --- build.sc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.sc b/build.sc index 3763f887a..902523261 100644 --- a/build.sc +++ b/build.sc @@ -190,6 +190,8 @@ trait AmmInternalModule extends CrossSbtModule with Bloop.Module { trait AmmTests extends super.Tests with TestModule.Utest { def ivyDeps = super.ivyDeps() ++ Agg(Deps.utest) def forkArgs = Seq("-Xmx2g", "-Dfile.encoding=UTF8") + def testForkGrouping = discoveredTestClasses().grouped(1).toSeq + def testSandboxWorkingDir = false } def allBoundIvyDeps = T { transitiveIvyDeps() ++ scalaLibraryIvyDeps().map(bindDependency()) } def sources = T.sources { From b0db0c59b03160d151581dc57f00bc98409a2a84 Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Tue, 22 Oct 2024 10:26:40 +0800 Subject: [PATCH 3/5] wip --- mill | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/mill b/mill index d400d4288..d03a045cb 100755 --- a/mill +++ b/mill @@ -3,10 +3,13 @@ # 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.7 set -e +if [ -z "${DEFAULT_MILL_VERSION}" ] ; then + DEFAULT_MILL_VERSION=0.11.12 +fi + if [ -z "$MILL_VERSION" ] ; then if [ -f ".mill-version" ] ; then MILL_VERSION="$(head -n 1 .mill-version 2> /dev/null)" @@ -37,7 +40,7 @@ if [ ! -s "$MILL_EXEC_PATH" ] ; then 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}" + MILL_DOWNLOAD_URL="https://repo1.maven.org/maven2/com/lihaoyi/mill-dist/$MILL_VERSION/mill-dist-$MILL_VERSION.jar" curl --fail -L -o "$DOWNLOAD_FILE" "$MILL_DOWNLOAD_URL" chmod +x "$DOWNLOAD_FILE" mv "$DOWNLOAD_FILE" "$MILL_EXEC_PATH" @@ -45,7 +48,20 @@ 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="" + + # first arg is a long flag for "--interactive" or starts with "-i" +if [ "$1" = "--bsp" ] || [ "${1#"-i"}" != "$1" ] || [ "$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}" "$@" From bba851a0c86a5586baed912ed44189f95cb05837 Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Tue, 22 Oct 2024 10:53:29 +0800 Subject: [PATCH 4/5] Update build.sc --- build.sc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.sc b/build.sc index 902523261..cac003c33 100644 --- a/build.sc +++ b/build.sc @@ -911,6 +911,7 @@ def publishDocs(skipDeploy: Boolean = false): Command[Unit] = { "sbt", "readme/run" ).call( + cwd = T.workspace, env = Map( "AMMONITE_ASSEMBLY" -> ammoniteAssembly().path.toString, "CONSTANTS_FILE" -> generateConstantsFile(returnDirectory = false).toString @@ -971,6 +972,7 @@ def publishDocs(skipDeploy: Boolean = false): Command[Unit] = { "sbt", "readme/run" ).call( + cwd = T.workspace, env = Map( "AMMONITE_ASSEMBLY" -> ammoniteAssembly().path.toString, "CONSTANTS_FILE" -> constantsFile.toString From fa781f4153753a51692fe8b71531261e85498cc8 Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Thu, 24 Oct 2024 07:29:09 +0800 Subject: [PATCH 5/5] Update .mill-version --- .mill-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mill-version b/.mill-version index 53cf705c9..ac454c6a1 100644 --- a/.mill-version +++ b/.mill-version @@ -1 +1 @@ -0.12.0-RC3-102-b8217f +0.12.0