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

Update Mill to 0.12.1 #3250

Draft
wants to merge 32 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d2071c8
Update Mill to 0.12.0
lolgab Oct 25, 2024
d3314ef
Merge remote-tracking branch 'upstream/main' into update-mill-0.12
lolgab Oct 26, 2024
83a7a11
Avoid using positional arguments
lolgab Oct 26, 2024
33e6c4a
Avoid positional arguments
lolgab Oct 26, 2024
3c77c91
Use `T.workspace` when possible
lolgab Oct 26, 2024
7933c3f
Use os.pwd in static code
lolgab Oct 26, 2024
9ac1db4
Use `MILL_WORKSPACE_ROOT` instead of os.pwd
lolgab Oct 26, 2024
f736bc5
Avoid positional arguments
lolgab Oct 26, 2024
559cf98
Pass `streamOut = false` to return the stdout instead of printing it
lolgab Oct 26, 2024
9118013
Avoid positional arguments
lolgab Oct 26, 2024
1e0cd8c
Fix ScalaCliSuite paths
lolgab Oct 26, 2024
35cf7be
Fix locationAbsolutePath
lolgab Oct 26, 2024
0114814
Revert making copyCsjniutilTo a Task
lolgab Oct 27, 2024
d94f82f
Use .mill.scala suffix
lolgab Oct 27, 2024
9b3c5f4
Make TestUtil compile again
lolgab Oct 27, 2024
2976243
Update mill-native-image to 0.1.28
lolgab Oct 28, 2024
497cb51
Avoid positional arguments
lolgab Oct 28, 2024
92e2df3
Avoid positional arguments
lolgab Oct 28, 2024
b6fa7a4
Avoid positional arguments
lolgab Oct 28, 2024
4e466c9
Run Scalafmt
lolgab Oct 28, 2024
681fe6c
.
lolgab Oct 28, 2024
251c03e
Update Mill to 0.12.1
lolgab Oct 29, 2024
690240f
.
lolgab Oct 29, 2024
da08eeb
Pass T.workspace to Upload.copyLauncher
lolgab Oct 29, 2024
d6de239
.
lolgab Oct 29, 2024
38f71c5
.
lolgab Oct 29, 2024
382b5dd
Update mill-scalafix to 0.4.2
lolgab Oct 29, 2024
e7b1b5d
Update Scalafix and run it only on one version of Scala per module
lolgab Oct 29, 2024
abb34dc
Run Scalafix on all code using new config
lolgab Oct 29, 2024
fb66ee4
.
lolgab Oct 29, 2024
283f17f
Merge remote-tracking branch 'upstream/main' into update-mill-0.12
lolgab Oct 29, 2024
fc61fe1
Support directory with trailing slash
lolgab Oct 30, 2024
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/scripts/build-linux-aarch64-from-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ eval "$(cs java --env --jvm temurin:17 --jvm-index https://github.com/coursier/j
git config --global --add safe.directory "$(pwd)"

./mill -i show 'cli[]'.nativeImage
./mill -i copyDefaultLauncher ./artifacts
./mill -i copyDefaultLauncher --directory ./artifacts
if "true" == $(./mill -i ci.shouldPublish); then
.github/scripts/generate-os-packages.sh
fi
2 changes: 1 addition & 1 deletion .github/scripts/generate-docker-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
WORKDIR="$ROOT/out/docker-workdir"

mkdir -p "$WORKDIR"
./mill -i copyTo 'cli[]'.nativeImageStatic "$WORKDIR/scala-cli" 1>&2
./mill -i copyTo --task 'cli[]'.nativeImageStatic --dest "$WORKDIR/scala-cli" 1>&2

cd "$WORKDIR"
docker build -t scala-cli -f "$ROOT/.github/scripts/docker/ScalaCliDockerFile" .
4 changes: 2 additions & 2 deletions .github/scripts/generate-native-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if [[ "$OSTYPE" == "msys" ]]; then
export GRAALVM_HOME="$JAVA_HOME"
export PATH="$(pwd)/bin:$PATH"
echo "PATH=$PATH"
./mill.bat -i "$COMMAND" generate-native-image.bat ""
./mill.bat -i "$COMMAND" --scriptDest generate-native-image.bat --imageDest ""
./generate-native-image.bat
else
if [ $# == "0" ]; then
Expand All @@ -42,7 +42,7 @@ else
esac
fi

./mill -i "$COMMAND" generate-native-image.sh ""
./mill -i "$COMMAND" --scriptDest generate-native-image.sh --imageDest ""
bash ./generate-native-image.sh
"${CLEANUP[@]}"
fi
8 changes: 4 additions & 4 deletions .github/scripts/generate-os-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ launcher() {
launcherName="scala"
fi

"$mill" -i copyTo "$launcherMillCommand" "$launcherName" 1>&2
"$mill" -i copyTo --task "$launcherMillCommand" --dest "$launcherName" 1>&2
echo "$launcherName"
}

version() {
"$mill" -i writePackageVersionTo scala-cli-version 1>&2
"$mill" -i writePackageVersionTo --dest scala-cli-version 1>&2
cat scala-cli-version
}

shortVersion() {
"$mill" -i writeShortPackageVersionTo scala-cli-short-version 1>&2
"$mill" -i writeShortPackageVersionTo --dest scala-cli-short-version 1>&2
cat scala-cli-short-version
}

Expand Down Expand Up @@ -89,7 +89,7 @@ generate_msi() {

# Having the MSI automatically install Visual C++ redistributable when needed,
# see https://wixtoolset.org/documentation/manual/v3/howtos/redistributables_and_install_checks/install_vcredist.html
"$mill" -i ci.writeWixConfigExtra wix-visual-cpp-redist.xml
"$mill" -i ci.writeWixConfigExtra --dest wix-visual-cpp-redist.xml

packager \
--msi \
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/generate-slim-docker-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
WORKDIR="$ROOT/out/docker-slim-workdir"

mkdir -p "$WORKDIR"
./mill -i copyTo 'cli[]'.nativeImageMostlyStatic "$WORKDIR/scala-cli" 1>&2
./mill -i copyTo --task 'cli[]'.nativeImageMostlyStatic --dest "$WORKDIR/scala-cli" 1>&2

cd "$WORKDIR"
docker build -t scala-cli-slim -f "$ROOT/.github/scripts/docker/ScalaCliSlimDockerFile" .
2 changes: 1 addition & 1 deletion .github/scripts/publish-sdkman.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
set -eu

version() {
"./mill" -i writePackageVersionTo scala-cli-version 1>&2
"./mill" -i writePackageVersionTo --dest scala-cli-version 1>&2
cat scala-cli-version
}

Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
with:
jvm: "temurin:17"
- name: Copy launcher
run: ./mill -i copyJvmLauncher artifacts/
run: ./mill -i copyJvmLauncher --directory artifacts/
if: runner.os == 'Linux'
- name: Copy bootstrapped launcher
run: ./mill -i copyJvmBootstrappedLauncher artifacts/
run: ./mill -i copyJvmBootstrappedLauncher --directory artifacts/
if: runner.os == 'Linux'
- uses: actions/upload-artifact@v3
if: runner.os == 'Linux'
Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
if: env.SHOULD_PUBLISH == 'true'
run: .github/scripts/generate-os-packages.sh
- name: Copy artifacts
run: ./mill -i copyDefaultLauncher artifacts/
run: ./mill -i copyDefaultLauncher --directory artifacts/
- uses: actions/upload-artifact@v3
with:
name: linux-launchers
Expand Down Expand Up @@ -413,7 +413,7 @@ jobs:
if: env.SHOULD_PUBLISH == 'true'
run: .github/scripts/generate-os-packages.sh
- name: Copy artifacts
run: ./mill -i copyDefaultLauncher artifacts/
run: ./mill -i copyDefaultLauncher --directory artifacts/
- uses: actions/upload-artifact@v3
with:
name: macos-launchers
Expand Down Expand Up @@ -616,7 +616,7 @@ jobs:
if: env.SHOULD_PUBLISH == 'true'
run: .github/scripts/generate-os-packages.sh
- name: Copy artifacts
run: ./mill -i copyDefaultLauncher artifacts/
run: ./mill -i copyDefaultLauncher --directory artifacts/
- uses: actions/upload-artifact@v3
with:
name: macos-m1-launchers
Expand Down Expand Up @@ -822,7 +822,7 @@ jobs:
run: .github/scripts/generate-os-packages.sh
shell: bash
- name: Copy artifacts
run: ./mill -i copyDefaultLauncher artifacts/
run: ./mill -i copyDefaultLauncher --directory artifacts/
- uses: actions/upload-artifact@v3
with:
name: windows-launchers
Expand Down Expand Up @@ -1050,7 +1050,7 @@ jobs:
run: .github/scripts/generate-native-image.sh mostly-static
shell: bash
- name: Copy artifacts
run: ./mill -i copyMostlyStaticLauncher artifacts/
run: ./mill -i copyMostlyStaticLauncher --directory artifacts/
- uses: actions/upload-artifact@v3
with:
name: mostly-static-launchers
Expand Down Expand Up @@ -1253,7 +1253,7 @@ jobs:
run: .github/scripts/generate-native-image.sh static
shell: bash
- name: Copy artifacts
run: ./mill -i copyStaticLauncher artifacts/
run: ./mill -i copyStaticLauncher --directory artifacts/
- uses: actions/upload-artifact@v3
with:
name: static-launchers
Expand Down Expand Up @@ -1551,7 +1551,7 @@ jobs:
- name: Java Home
run: echo "$JAVA_HOME"
- name: Build Scala CLI
run: ./mill copyJvmLauncher build
run: ./mill copyJvmLauncher --directory build
- name: Build Benchmark
run: java -jar ./build/scala-cli --power package --standalone gcbenchmark/gcbenchmark.scala -o gc
- name: Run Benchmark
Expand Down
2 changes: 1 addition & 1 deletion .mill-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.11.12
0.12.1
1 change: 1 addition & 0 deletions .scalafix.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ OrganizeImports {
expandRelative = true
groups = ["*", "re:javax?\\.", "scala."]
groupedImports = AggressiveMerge
targetDialect = Scala3
}
1 change: 1 addition & 0 deletions .scalafix3.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ OrganizeImports {
groups = ["*", "re:javax?\\.", "scala."]
groupedImports = AggressiveMerge
removeUnused = false # added for Scala 3
targetDialect = Scala3
}
Loading
Loading