Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
ac22329
Initially copy and adapt some code to support `mill init` from an exi…
ShreckYe Feb 4, 2025
d2ad688
Add a cross module for the models and split the code because Mill use…
ShreckYe Feb 5, 2025
39f928e
Initially implement assembling and adding the `sbt-mill-init-generate…
ShreckYe Feb 6, 2025
3c9f155
Add code to add the sbt plugin and run the `millInitGenerateProjectTr…
ShreckYe Feb 6, 2025
923ddf4
Remove the files generated by sbt in "main/init/sbt/test/resources/sc…
ShreckYe Feb 6, 2025
268eb63
Replace "SBT"s with lowercase "sbt"
ShreckYe Feb 6, 2025
86e1807
Move the old "sbt-mill-init-generate-project-tree" Mill module and ru…
ShreckYe Feb 6, 2025
9991d8a
Remove unneeded code in the generated sbt plugin project and add µTes…
ShreckYe Feb 6, 2025
a253537
Move `ProjectTreePlugin` into the sbt project and set up the build lo…
ShreckYe Feb 7, 2025
01bfcf5
Initially complete implementing `SbtBuildGenMain` and the sbt plugin …
ShreckYe Feb 15, 2025
8b141aa
Remove the unnecessary code marked with TODOs to be removed in the pr…
ShreckYe Feb 15, 2025
1fd0b65
Do not diff a subproject's `BuildInfo` with `ThisBuild`'s anymore in …
ShreckYe Feb 16, 2025
f38991b
Move the "mill.scalalib.SbtModule" import into `SbtBuildGenMain` to f…
ShreckYe Feb 16, 2025
f70e818
Export and import sbt's `scalaVersion` too
ShreckYe Feb 16, 2025
7e1e2b6
Exclude the Scala Standard Libraries
ShreckYe Feb 16, 2025
6f4c45d
Add the https://github.com/pbassiner/sbt-multi-project-example projec…
ShreckYe Feb 16, 2025
913ef1d
Generate the expected snapshots for "sbt-multi-project-example" and i…
ShreckYe Feb 16, 2025
ac9d657
Generate the expected snapshots for "sbt-multi-project-example" with …
ShreckYe Feb 16, 2025
f8d748b
Set the settings in `ThisBuild` in "sbt-multi-project-example" so the…
ShreckYe Feb 16, 2025
4156577
Add POM settings in `ThisBuild` in "sbt-multi-project-example" to tes…
ShreckYe Feb 16, 2025
f0d1378
Stop updating the expected test sample snapshots
ShreckYe Feb 16, 2025
ea780d7
Copy and adapt the docs and some code for sbt from those for Gradle r…
ShreckYe Feb 16, 2025
b59e33f
Copy and adapt the integration tests for sbt from those for Gradle, r…
ShreckYe Feb 17, 2025
31154ac
Add a TODO
ShreckYe Feb 17, 2025
3d2fafe
Add the example tests, and add more and rearrange the integration tes…
ShreckYe Feb 18, 2025
44f6ada
Set up sbt in the CI to fix the failing CI tests
ShreckYe Feb 19, 2025
802f005
Move `setup-sbt` to `post-build-setup`
ShreckYe Feb 19, 2025
39baa2d
Refine a TODO
ShreckYe Feb 19, 2025
0c9b749
Merge branch 'main' into init-from-sbt
ShreckYe Feb 19, 2025
3db8288
Fix compiling and test issues after the merge
ShreckYe Feb 19, 2025
918359e
Split the `sbt assembly` command into a tuple, and replace `scala.sys…
ShreckYe Feb 19, 2025
4419d7f
Fix calling the sbt command in the `sbtPluginJarResources` Mill task …
ShreckYe Feb 19, 2025
68d830f
Get the `sbt millInitExportBuild` command to work on Windows with a w…
ShreckYe Feb 19, 2025
7155ec8
Fix a bug that the exported projects are ordered differently in diffe…
ShreckYe Feb 19, 2025
3ef1bef
Try fixing integration test timeout in the CI
ShreckYe Feb 20, 2025
1655bb9
Fix a compiling error introduced in the previous commit
ShreckYe Feb 20, 2025
6b717b7
Try fixing more integration test failures on CI, both on Linux with J…
ShreckYe Feb 20, 2025
018cd53
Fix the failing example tests added in commit 3d2fafed6a2cdcbce2f8c6c…
ShreckYe Feb 20, 2025
4112c6f
Run `./mill mill.scalalib.scalafmt.ScalafmtModule/reformatAll` since …
ShreckYe Feb 20, 2025
40cdaa3
Add one more exception in docs from the integration test failures fix…
ShreckYe Feb 20, 2025
3cfb3aa
Add `setup-sbt` in `autofix.ci` too as it fails without it
ShreckYe Feb 20, 2025
e66f8ee
Merge branch 'main' into init-from-sbt
ShreckYe Feb 20, 2025
7ed2c3a
Fix the merge
ShreckYe Feb 20, 2025
ee28377
Support converting child projects nested in a parent directory which …
ShreckYe Feb 22, 2025
88c31b1
Run more `compile` and `test` tasks in the submodules of part of the …
ShreckYe Feb 22, 2025
f533126
Reformat `GradleBuildGenMain.scala`
ShreckYe Feb 22, 2025
6e48c2b
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 22, 2025
2286ed0
Fix the integration tests failing on windows caused by `split('\n')`
ShreckYe Feb 22, 2025
768a2b1
Fix the bug the converted sbt test modules extend `MavenTests` instea…
ShreckYe Feb 23, 2025
cd168ff
Update (fix) an integration test accordingly
ShreckYe Feb 23, 2025
9ee23de
Try fixing Mill `test` in the converted project of `MillInitScalaCsv1…
ShreckYe Feb 23, 2025
87afa17
Move the `jvmId` config arg to `BasicConfig` and support it in `SbtBu…
ShreckYe Feb 23, 2025
02206a6
Support the `baseProject` config arg too in `SbtBuildGenMain` and upd…
ShreckYe Feb 23, 2025
c819207
Fix assertions in `MillInitSbtMultiProjectExampleTests` that fail due…
ShreckYe Feb 23, 2025
22033e9
Support comparing a module's `def`'s with and extending super base mo…
ShreckYe Feb 24, 2025
34b837d
Fix assertions in `MillInitSbtMultiProjectExampleTests` that fail due…
ShreckYe Feb 24, 2025
729fc9d
Fix bugs introduced in commit 22033e909dd461689b374815ca4602b087b8830…
ShreckYe Feb 24, 2025
f1bfd9a
Fix some grammar mistakes
ShreckYe Feb 24, 2025
af5454d
Rename some integration tests for explicitness and consistency
ShreckYe Feb 24, 2025
8794040
Update `MillInitSbtZioHttpTests` with the result and improve `testAll…
ShreckYe Feb 24, 2025
ca1c827
Support more `CrossVersion` types
ShreckYe Feb 24, 2025
1cd32b0
Fix a warning discovered by CI `lint-autofix`
ShreckYe Feb 24, 2025
d34d385
Fix a warning by making a def private
ShreckYe Feb 24, 2025
1d8011c
Supported converting `type, `classifier`, and `exclusions` in sbt dep…
ShreckYe Feb 24, 2025
12e9d73
Run more `compile` and `test` tasks in the submodules of all the conv…
ShreckYe Feb 25, 2025
2be0d80
Reformat "main/init/package.mill" as `lint-autofix` fails on CI
ShreckYe Feb 25, 2025
44c7381
Add a comment
ShreckYe Feb 25, 2025
8ca434a
Review the reasons why the tasks succeed or fail and improve comments…
ShreckYe Feb 25, 2025
75af776
Run more `compile` and `test` tasks in `MillInitSbtScalaCheckTests`
ShreckYe Feb 25, 2025
6cac44b
Merge branch 'main' into init-from-sbt
ShreckYe Feb 25, 2025
c2256f8
Reformat
ShreckYe Feb 25, 2025
10d2076
Add some `override`s following commit 57ab8e6218f5fab869e238037edfc8d…
ShreckYe Feb 25, 2025
d0d1e39
Update the expected test snapshots and fix the unit tests broken by t…
ShreckYe Feb 25, 2025
3933fde
Revert to using a Mill module for the sbt plugin
ShreckYe Feb 26, 2025
144f16f
remove unnecessary files in the original sbt project, move `ExportBui…
ShreckYe Feb 26, 2025
c91b342
Copy the "sbt.autoplugins" file packaged in the jar generated by the …
ShreckYe Feb 26, 2025
bc5d03d
Add the sbt library as `compileIvyDeps`
ShreckYe Feb 26, 2025
f07f565
Exclude the Scala libraries from the assembly jar too
ShreckYe Feb 26, 2025
0147fcc
Merge branch 'init-from-sbt-use-mill-module-for-sbt-plugin' into init…
ShreckYe Feb 26, 2025
2ca01b2
Revamp the integration test code as requested
ShreckYe Feb 27, 2025
5a7696b
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 27, 2025
46e475c
Clean up
ShreckYe Feb 27, 2025
5f9abe0
Replace `OM` with `Option[M]` as requested in https://github.com/com-…
ShreckYe Feb 27, 2025
629bec5
Replace "scalacenter/library-example" with "scala/scala3-example-proj…
ShreckYe Feb 27, 2025
62db02d
Support converting sbt dependency configurations with multiple config…
ShreckYe Feb 27, 2025
2c6799f
Render `def testSandboxWorkingDir = false` in the test modules by def…
ShreckYe Feb 27, 2025
a83cf62
Fix `MillInitSbtGatlingTests` that fails on Windows and a link to a s…
ShreckYe Feb 28, 2025
3a99f85
Add assertions on the number of source files produced the `allSourceF…
ShreckYe Mar 1, 2025
3c22ec6
Not stream the output via `os.Inherit` by default in `testMillInit`
ShreckYe Mar 1, 2025
8ba4322
Use the `testMillInit` helper in `MillInitMavenTests.scala` and `Mill…
ShreckYe Mar 3, 2025
323c0bf
Combine all the successful tasks into one command by default to speed…
ShreckYe Mar 3, 2025
88b087d
Fix `MillInitGradleEhcache3Tests` failing on Linux with JDK 11 on CI
ShreckYe Mar 3, 2025
7548a98
Call `writeMillJvmVersionTemurin11` instead as the issue in the previ…
ShreckYe Mar 4, 2025
978ba8c
Rename the sbt plugin module to `exportplugin` as requested in https:…
ShreckYe Mar 4, 2025
be4457c
Pull the latest commit and remove the special case in `MillInitSbtGat…
ShreckYe Mar 4, 2025
0fb0af6
Fix a bug in the module code that the custom error message is not pri…
ShreckYe Mar 4, 2025
a04fe27
Run the wildcard task when possible in `testMillInit` with `combineSu…
ShreckYe Mar 4, 2025
819226f
Try fixing the failing test on Linux with JDK 11 on CI and print it o…
ShreckYe Mar 4, 2025
93e87cd
Merge branch 'main' into init-from-sbt
ShreckYe Mar 4, 2025
c903ee2
Skip `MillInitSbtGatlingTests` on Windows
ShreckYe Mar 5, 2025
a23caa6
Make `lowerCaseOsName` a private method as requested in https://githu…
ShreckYe Mar 5, 2025
a2bbacf
Merge branch 'main' into init-from-sbt
ShreckYe Mar 5, 2025
77f17ac
Reuse `workerScalaVersion212`
ShreckYe Mar 5, 2025
f64f8f4
`git checkout main -- build.mill` and update to resolve https://githu…
ShreckYe Mar 5, 2025
92b5978
Bump sbt to 1.10.10
ShreckYe Mar 5, 2025
085cf48
Add a system property `TEST_SBT_VERSION` to stick a single source of …
ShreckYe Mar 5, 2025
5cd08ea
[autofix.ci] apply automated fixes
autofix-ci[bot] Mar 5, 2025
1ee8163
Update integration/feature/init/src/MillInitSbtTests.scala
ShreckYe Mar 5, 2025
4dd7803
Replace another `sys.props("TEST_SBT_VERSION")` as in the previous co…
ShreckYe Mar 5, 2025
3e88144
Use `BuildInfo` to pass the sbt version to the runtime in the `main/i…
ShreckYe Mar 5, 2025
d147b86
Fix bugs in `testModulesByGroup` pointed out at https://github.com/co…
ShreckYe Mar 7, 2025
b27db68
Merge branch 'main' into init-from-sbt
ShreckYe Mar 7, 2025
4fc62e9
update-patch
lihaoyi Mar 7, 2025
222a15d
Get sbt's inter-project dependencies from sbt `buildDependencies` ins…
ShreckYe Mar 9, 2025
2955888
Get Gradle's inter-project dependencies from Gradle `ProjectDependenc…
ShreckYe Mar 10, 2025
c24db27
Merge branch 'init-from-sbt-retrieve-inter-project-dependencies-direc…
ShreckYe Mar 10, 2025
474ca86
Remove unnecessary `getGav` methods and rename existing ones to be mo…
ShreckYe Mar 10, 2025
29aca35
Support ScalaCheck in `TestModule` and its build generation in `Build…
ShreckYe Mar 11, 2025
c429b0a
update-patch
lihaoyi Mar 11, 2025
69c9e69
disable work stealing by default
lihaoyi Mar 11, 2025
b612235
fix build file
lihaoyi Mar 11, 2025
3539185
fmt
lihaoyi Mar 11, 2025
347bfe7
Add a `customSbt` config arg
ShreckYe Mar 11, 2025
1705d86
Improve the exception message when the sbt command fails
ShreckYe Mar 11, 2025
e2d831f
Merge branch 'main' into init-from-sbt
lihaoyi Mar 12, 2025
347e7a1
Update BuildGenUtil.scala
lihaoyi Mar 13, 2025
c8a9254
fixes
lihaoyi Mar 13, 2025
70db57b
patch
lihaoyi Mar 13, 2025
524f558
patch
lihaoyi Mar 13, 2025
27117dd
split migrating off into a separate job
lihaoyi Mar 13, 2025
3e1edf8
fix-docs-and-gha
lihaoyi Mar 14, 2025
e46a255
fmt
lihaoyi Mar 14, 2025
9d3cc05
update-patch
lihaoyi Mar 14, 2025
e6e2668
break out migrating integration test folder
lihaoyi Mar 14, 2025
9db467b
update-patch
lihaoyi Mar 14, 2025
ba6fbee
merge
lihaoyi Mar 14, 2025
5a54230
java11
lihaoyi Mar 14, 2025
b29f6d8
generalize examples to work on windows
lihaoyi Mar 14, 2025
3f9b180
skip bad test on windows
lihaoyi Mar 14, 2025
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
3 changes: 2 additions & 1 deletion .github/actions/post-build-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ runs:
name: ${{ inputs.os }}-selective-execution-artifact

- run: mv out/mill-selective-execution/mill-selective-execution.json out/mill-selective-execution.json
shell: bash
shell: bash

2 changes: 1 addition & 1 deletion .github/actions/pre-build-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ runs:
- uses: actions/checkout@v4

- run: echo temurin:${{ inputs.java-version }} > .mill-jvm-version
shell: bash
shell: bash
2 changes: 2 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: sbt/setup-sbt@v1

- run: |
./mill __.fix + mill.javalib.palantirformat.PalantirFormatModule/ + mill.scalalib.scalafmt.ScalafmtModule/ + mill.kotlinlib.ktlint.KtlintModule/
./mill --meta-level 1 mill.scalalib.scalafmt.ScalafmtModule/
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/post-build-selective.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ on:
install-android-sdk:
default: false
type: boolean
install-sbt:
default: false
type: boolean

jobs:
run:
Expand All @@ -48,6 +51,9 @@ jobs:
- uses: ./.github/actions/setup-android
if: ${{ inputs.install-android-sdk }}

- uses: sbt/setup-sbt@v1
if: ${{ inputs.install-sbt }}

- uses: ./.github/actions/post-build-selective

with:
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,57 +133,75 @@ jobs:
- java-version: 17
millargs: "'{core,main,scalalib,testrunner,bsp,testkit}.__.test'"
install-android-sdk: false
install-sbt: true

- java-version: 11
millargs: "'{scalajslib,scalanativelib,kotlinlib,pythonlib,javascriptlib}.__.test'"
install-android-sdk: false
install-sbt: false

- java-version: 17
millargs: "contrib.__.test"
install-android-sdk: false
install-sbt: false

- java-version: 17
millargs: "example.javalib.__.local.server.test"
install-android-sdk: false
install-sbt: false

- java-version: 17
millargs: "example.kotlinlib.__.local.server.test"
install-android-sdk: false
install-sbt: false

# Run this one using `.native` as a smoketest. Also make sure the java-version
# is the same as that used in the `build-linux` job to avoid diverging code
# hashes (https://github.com/com-lihaoyi/mill/pull/4410)
- java-version: 11
millargs: "example.scalalib.__.native.server.test"
install-android-sdk: false
install-sbt: false

- java-version: 17
millargs: "'example.android.__.local.server.test'"
install-android-sdk: true
install-sbt: false

- java-version: 11
millargs: "'{example,integration}.migrating.__.local.server.test'"
install-android-sdk: false
install-sbt: true

- java-version: 17
millargs: "'example.{pythonlib,javascriptlib}.__.local.server.test'"
install-android-sdk: false
install-sbt: false

- java-version: 11
millargs: "'example.thirdparty[{mockito,commons-io}].local.server.test'"
install-android-sdk: false
install-sbt: false

- java-version: 17
millargs: "'example.thirdparty[{netty,gatling}].local.server.test'"
install-android-sdk: false
install-sbt: false

- java-version: '17'
millargs: "'example.thirdparty[arrow].local.server.test'"
install-android-sdk: false
install-sbt: false

- java-version: 11
millargs: "'example.{cli,fundamentals,depth,extending}.__.local.server.test'"
install-android-sdk: false
install-sbt: false

- java-version: 11
millargs: "'integration.{failure,feature,ide}.__.packaged.server.test'"
install-android-sdk: false
install-sbt: false

# run this specifically in `native` mode to make sure our non-JVM native image
# launcher is able to bootstrap everything necessary without a JVM installed
Expand All @@ -196,14 +214,17 @@ jobs:
- java-version: 17
millargs: "'integration.invalidation.__.packaged.fork.test'"
install-android-sdk: false
install-sbt: false

- java-version: 17
millargs: "'integration.invalidation.__.packaged.server.test'"
install-android-sdk: false
install-sbt: false

uses: ./.github/workflows/post-build-selective.yml
with:
install-android-sdk: ${{ matrix.install-android-sdk }}
install-sbt: ${{ matrix.install-sbt }}
java-version: ${{ matrix.java-version }}
millargs: ${{ matrix.millargs }}
shell: bash
Expand All @@ -222,15 +243,23 @@ jobs:
# * At least one job for each of fork/server tests, and example/integration tests
- java-version: 11
millargs: '"{main,scalalib,bsp}.__.test"'
install-sbt: false

- java-version: 11
millargs: '"example.scalalib.{basic,publishing}.__.local.fork.test"'
install-sbt: false

- java-version: 11
millargs: '"example.migrating.{scalalib,javalib}.__.local.fork.test"'
install-sbt: true

- java-version: 17
millargs: "'integration.{feature,failure}.__.packaged.fork.test'"
install-sbt: false

- java-version: 11 # Run this with Mill native launcher as a smoketest
millargs: "'integration.invalidation.__.native.server.test'"
install-sbt: false

- java-version: 17
millargs: "'integration.bootstrap[no-java-bootstrap].native.server.test'"
Expand All @@ -244,6 +273,7 @@ jobs:
# running the graal native image binary on windows
coursierarchive: "C:/coursier-arc"
shell: powershell
install-sbt: ${{ matrix.install-sbt }}

itest:
needs: build-linux
Expand Down
9 changes: 7 additions & 2 deletions build.mill
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ object Deps {
val scala2Version = "2.13.15"
// The Scala 2.12.x version to use for some workers
val workerScalaVersion212 = "2.12.20"
val sbtScalaVersion212 = workerScalaVersion212

val testScala213Version = "2.13.15"
// Scala Native 4.2 will not get releases for new Scala version
Expand Down Expand Up @@ -220,6 +221,7 @@ object Deps {
ivy"org.apache.maven.resolver:maven-resolver-transport-wagon:$mavenResolverVersion"
val coursierJvmIndexVersion = "0.0.4-84-f852c6"
val gradleApi = ivy"dev.gradleplugins:gradle-api:8.11.1"
val sbt = ivy"org.scala-sbt:sbt:1.10.10"

object RuntimeDeps {
val dokkaVersion = "2.0.0"
Expand Down Expand Up @@ -568,7 +570,8 @@ trait MillBaseTestsModule extends TestModule {
s"-DTEST_TEST_INTERFACE_VERSION=${Deps.sbtTestInterface.version}",
s"-DTEST_ZIOTEST_VERSION=${Deps.TestDeps.zioTest.version}",
s"-DTEST_ZINC_VERSION=${Deps.zinc.version}",
s"-DTEST_KOTLIN_VERSION=${Deps.kotlinCompiler.version}"
s"-DTEST_KOTLIN_VERSION=${Deps.kotlinCompiler.version}",
s"-DTEST_SBT_VERSION=${Deps.sbt.version}"
)
}

Expand Down Expand Up @@ -713,8 +716,10 @@ trait MillStableScalaModule extends MillPublishScalaModule with Mima {
}
}

trait MillPublishCrossScalaModule extends MillPublishJavaModule with CrossScalaModule

object bridge extends Cross[BridgeModule](compilerBridgeScalaVersions)
trait BridgeModule extends MillPublishJavaModule with CrossScalaModule {
trait BridgeModule extends MillPublishCrossScalaModule {
def scalaVersion = crossScalaVersion
def publishVersion = bridgeVersion
def artifactName = "mill-scala-compiler-bridge"
Expand Down
Loading
Loading