- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 420
build.mill files compiled by Scala 3 #3369
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
          
     Merged
      
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            101 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      0eded58
              
                FIX METALS - mill-build/build.sc -> mill-build/build.mill
              
              
                bishabosha 3a19851
              
                Part 1 - fix compilation errors and stub macros
              
              
                bishabosha 3c75dcb
              
                Part 2 - reimplement discover macro
              
              
                bishabosha 6509bca
              
                Part 3 - move implementation of Caller.generate to Module
              
              
                bishabosha 9300acd
              
                Part 4 - reimplement Applicative and Target macros
              
              
                bishabosha d8bc295
              
                Part 6 - implement EnclosingClass, pass specific integration tests
              
              
                bishabosha 28f82ae
              
                Part 7 - implement Cross.Factory macro (TODO split shims out)
              
              
                bishabosha 89bf556
              
                Part 8 - adjust Zinc reporter instead of linenumbers plugin
              
              
                bishabosha 82f5a45
              
                Part 9 - fix CodeGen integration tests for Scala 3
              
              
                bishabosha 49e2dc2
              
                Part 10 - fix GenIdea
              
              
                bishabosha 18302af
              
                Part 12 - rework contrib.scoverage.api to be java based.
              
              
                bishabosha 8ab1d80
              
                TEMP: skip integration.feature[plugin-classpath].local.test
              
              
                bishabosha f179432
              
                Part 13 - fix contrib.playlib resolution of twirl and router worker
              
              
                bishabosha 8e76ffb
              
                Part 14 - fix contrib.proguard default options to filter scala.AnyKind
              
              
                bishabosha 3c0ed75
              
                TEMP: skip scalafix ExplicitResultType for scala 3, fix binary to 2.13
              
              
                bishabosha 0a56c0c
              
                Fix resolution of Mima previous artifacts
              
              
                bishabosha c64535b
              
                TEMP: skip mima checking because scala 3 introduces too many errors
              
              
                bishabosha c91fe8f
              
                Add .zed to .gitignore
              
              
                bishabosha 43d7f7a
              
                Part NN - Implement Scala 3 syntax support
              
              
                bishabosha dd88778
              
                generate patch diff for bootstrap
              
              
                bishabosha 27612d1
              
                Adjust DocAnnotationsTests: elide line number and extra interfaces
              
              
                bishabosha c466f2f
              
                fix integration.feature[bsp-server] tests
              
              
                bishabosha 39da1a5
              
                TEMP: Zinc invalidation difference
              
              
                bishabosha 93cb8a3
              
                scala 3 syntax uses Scala 3 enum, improve error message
              
              
                bishabosha 4bfeb89
              
                first pass resolving conflicts
              
              
                lihaoyi 36964b8
              
                wip
              
              
                lihaoyi fcfec9f
              
                __.compile passes
              
              
                lihaoyi f1ecfc3
              
                test fixes
              
              
                lihaoyi a98e4ba
              
                downgrade os-lib for now
              
              
                lihaoyi b9e6aa8
              
                fixe
              
              
                lihaoyi b6fbb75
              
                .
              
              
                lihaoyi 4b5ef73
              
                .
              
              
                lihaoyi c4205b9
              
                bump to java 11 in CI
              
              
                lihaoyi 9378f18
              
                .
              
              
                lihaoyi afe359a
              
                .
              
              
                lihaoyi 5f3b8e4
              
                enable testForkGrouping in integration tests
              
              
                lihaoyi e4e1241
              
                .
              
              
                lihaoyi ad14453
              
                hack around dotty scaladoc not working
              
              
                lihaoyi 2b70bb1
              
                autofix
              
              
                lihaoyi 21f3fc8
              
                .
              
              
                lihaoyi 0aa74aa
              
                fix-external-module-alias
              
              
                lihaoyi 2e36503
              
                update-bootstrap-patch
              
              
                lihaoyi 9d036c4
              
                fix-mill-bootstrap-patch
              
              
                lihaoyi 587cd05
              
                fix-mill-bootstrap-patch
              
              
                lihaoyi 754f342
              
                merge-compiles-again
              
              
                lihaoyi 19c178b
              
                .
              
              
                lihaoyi ee43679
              
                update out-dir tests
              
              
                lihaoyi 34e68c9
              
                Merge branch 'main' into 3369
              
              
                lihaoyi 22cb185
              
                fix
              
              
                lihaoyi 9bd5671
              
                fix mill.integration.CodeSigSubfolderTests.subfolder-renames-same-order
              
              
                lihaoyi 6d4770d
              
                fix mill.integration.CodeSigSubfolderTests.subfolder-renames-reorder
              
              
                lihaoyi 0a6facf
              
                fix
              
              
                lihaoyi 9e43437
              
                scala 3.6.2
              
              
                lihaoyi df5c3ee
              
                update-mill-moduledefs
              
              
                lihaoyi 5ac3820
              
                fix-writing-mill-plugins
              
              
                lihaoyi 07a8b60
              
                update patch
              
              
                lihaoyi 625332e
              
                .
              
              
                lihaoyi e293dea
              
                .
              
              
                lihaoyi 6e0709e
              
                cleanup
              
              
                lihaoyi effcc13
              
                Revert "cleanup"
              
              
                lihaoyi 611e7db
              
                spanning forest logging
              
              
                lihaoyi 9a6c173
              
                tweak spanning forest logging
              
              
                lihaoyi a04cf57
              
                remove println
              
              
                lihaoyi 7ff0bb1
              
                Revert "remove println"
              
              
                lihaoyi 879e54a
              
                tweak spanning forest logging
              
              
                lihaoyi dbc4d91
              
                .
              
              
                lihaoyi 6653a6f
              
                tweak breadth-first
              
              
                lihaoyi 5b26ed0
              
                fix ide tests
              
              
                lihaoyi 2da127e
              
                merge
              
              
                lihaoyi 741db37
              
                merge
              
              
                lihaoyi 10c6217
              
                update-patch
              
              
                lihaoyi d08c1d6
              
                .
              
              
                lihaoyi 08423f9
              
                .
              
              
                lihaoyi 4953f4e
              
                disable mima
              
              
                lihaoyi 51ad27b
              
                quote then
              
              
                lihaoyi 0e350eb
              
                .
              
              
                lihaoyi 1006ff2
              
                Merge branch 'main' into scala3-build-sc
              
              
                lihaoyi 656e2a2
              
                .
              
              
                lihaoyi 977b17f
              
                Merge branch 'main' into scala3-build-sc
              
              
                lihaoyi 27b7d05
              
                merge
              
              
                lihaoyi be891ab
              
                wip
              
              
                lihaoyi a854cc8
              
                fix-compile
              
              
                lihaoyi 86ebd56
              
                fix-compile
              
              
                lihaoyi e93a693
              
                merge
              
              
                lihaoyi fa4afcb
              
                merge
              
              
                lihaoyi 388a216
              
                .
              
              
                lihaoyi 0fde17c
              
                Merge branch 'main' into scala3-build-sc
              
              
                lihaoyi 9881698
              
                .
              
              
                lihaoyi 1b81c2b
              
                Merge commit 'fetch_head' into 3369
              
              
                lihaoyi 739c0d9
              
                revert-patch
              
              
                lihaoyi a57e421
              
                update patch
              
              
                lihaoyi 9f075d0
              
                .
              
              
                lihaoyi 0f2589c
              
                Merge branch 'main' into scala3-build-sc
              
              
                lihaoyi ff28b9d
              
                merge
              
              
                lihaoyi bb1e745
              
                Merge commit 'fetch_head' into 3369
              
              
                lihaoyi 4458498
              
                update patch
              
              
                lihaoyi 11faa95
              
                disable proguard test
              
              
                lihaoyi ae41d01
              
                disable proguard test
              
              
                lihaoyi b730c4d
              
                fix proguard comment
              
              
                lihaoyi c77e1ff
              
                fix idea test
              
              
                lihaoyi e96ac93
              
                fix patch
              
              
                lihaoyi File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -5,6 +5,7 @@ output/ | |
| .idea_modules | ||
| .idea | ||
| .vscode/ | ||
| .zed/ | ||
| out/ | ||
| /.bloop/ | ||
| /.metals/ | ||
|  | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| rules = [ | ||
| RemoveUnused, | ||
| NoAutoTupling | ||
| # ExplicitResultTypes | ||
| ] | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -51,7 +51,7 @@ object Deps { | |
| // The Scala version to use | ||
| // When updating, run "Publish Bridges" Github Actions for the new version | ||
| // and then add to it `bridgeScalaVersions` | ||
| val scalaVersion = "2.13.15" | ||
| val scalaVersion = "3.6.2" | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So mill itself will depend on the latest Scala 3 version? I think this is cool. | ||
| val scala2Version = "2.13.15" | ||
| // The Scala 2.12.x version to use for some workers | ||
| val workerScalaVersion212 = "2.12.20" | ||
|  | @@ -65,14 +65,21 @@ object Deps { | |
|  | ||
| object Scalajs_1 { | ||
| val scalaJsVersion = "1.18.1" | ||
| val scalajsEnvJsdomNodejs = ivy"org.scala-js::scalajs-env-jsdom-nodejs:1.1.0" | ||
| val scalajsEnvExoegoJsdomNodejs = ivy"net.exoego::scalajs-env-jsdom-nodejs:2.1.0" | ||
| val scalajsEnvNodejs = ivy"org.scala-js::scalajs-env-nodejs:1.4.0" | ||
| val scalajsEnvPhantomjs = ivy"org.scala-js::scalajs-env-phantomjs:1.0.0" | ||
| val scalajsEnvSelenium = ivy"org.scala-js::scalajs-env-selenium:1.1.1" | ||
| val scalajsSbtTestAdapter = ivy"org.scala-js::scalajs-sbt-test-adapter:${scalaJsVersion}" | ||
| val scalajsLinker = ivy"org.scala-js::scalajs-linker:${scalaJsVersion}" | ||
| val scalajsImportMap = ivy"com.armanbilge::scalajs-importmap:0.1.1" | ||
| val scalajsEnvJsdomNodejs = | ||
| ivy"org.scala-js::scalajs-env-jsdom-nodejs:1.1.0".withDottyCompat(scalaVersion) | ||
| val scalajsEnvExoegoJsdomNodejs = | ||
| ivy"net.exoego::scalajs-env-jsdom-nodejs:2.1.0".withDottyCompat(scalaVersion) | ||
| val scalajsEnvNodejs = ivy"org.scala-js::scalajs-env-nodejs:1.4.0".withDottyCompat(scalaVersion) | ||
| val scalajsEnvPhantomjs = | ||
| ivy"org.scala-js::scalajs-env-phantomjs:1.0.0".withDottyCompat(scalaVersion) | ||
| val scalajsEnvSelenium = | ||
| ivy"org.scala-js::scalajs-env-selenium:1.1.1".withDottyCompat(scalaVersion) | ||
| val scalajsSbtTestAdapter = | ||
| ivy"org.scala-js::scalajs-sbt-test-adapter:${scalaJsVersion}".withDottyCompat(scalaVersion) | ||
| val scalajsLinker = | ||
| ivy"org.scala-js::scalajs-linker:${scalaJsVersion}".withDottyCompat(scalaVersion) | ||
| val scalajsImportMap = | ||
| ivy"com.armanbilge::scalajs-importmap:0.1.1".withDottyCompat(scalaVersion) | ||
| } | ||
|  | ||
| object Scalanative_0_5 { | ||
|  | @@ -99,9 +106,11 @@ object Deps { | |
| } | ||
| object Play_2_7 extends Play { | ||
| val playVersion = "2.7.9" | ||
| override def scalaVersion: String = Deps.scala2Version | ||
| } | ||
| object Play_2_8 extends Play { | ||
| val playVersion = "2.8.22" | ||
| override def scalaVersion: String = Deps.scala2Version | ||
| } | ||
| object Play_2_9 extends Play { | ||
| val playVersion = "2.9.6" | ||
|  | @@ -115,12 +124,13 @@ object Deps { | |
| val acyclic = ivy"com.lihaoyi:::acyclic:0.3.15" | ||
| val ammoniteVersion = "3.0.1" | ||
| val asmTree = ivy"org.ow2.asm:asm-tree:9.7.1" | ||
| val bloopConfig = ivy"ch.epfl.scala::bloop-config:1.5.5" | ||
| val bloopConfig = ivy"ch.epfl.scala::bloop-config:1.5.5".withDottyCompat(scalaVersion) | ||
|  | ||
| val coursierVersion = "2.1.24" | ||
| val coursier = ivy"io.get-coursier::coursier:$coursierVersion" | ||
| val coursier = ivy"io.get-coursier::coursier:$coursierVersion".withDottyCompat(scalaVersion) | ||
| val coursierInterface = ivy"io.get-coursier:interface:1.0.27" | ||
| val coursierJvm = ivy"io.get-coursier::coursier-jvm:$coursierVersion" | ||
| val coursierJvm = | ||
| ivy"io.get-coursier::coursier-jvm:$coursierVersion".withDottyCompat(scalaVersion) | ||
|  | ||
| val cask = ivy"com.lihaoyi::cask:0.9.4" | ||
| val castor = ivy"com.lihaoyi::castor:0.3.0" | ||
|  | @@ -151,38 +161,45 @@ object Deps { | |
| val osLib = ivy"com.lihaoyi::os-lib:0.11.4-M4" | ||
| val pprint = ivy"com.lihaoyi::pprint:0.9.0" | ||
| val mainargs = ivy"com.lihaoyi::mainargs:0.7.6" | ||
| val millModuledefsVersion = "0.11.2" | ||
| val millModuledefsVersion = "0.11.3-M3" | ||
| val millModuledefsString = s"com.lihaoyi::mill-moduledefs:${millModuledefsVersion}" | ||
| val millModuledefs = ivy"${millModuledefsString}" | ||
| val millModuledefsPlugin = | ||
| ivy"com.lihaoyi:::scalac-mill-moduledefs-plugin:${millModuledefsVersion}" | ||
| // can't use newer versions, as these need higher Java versions | ||
| val testng = ivy"org.testng:testng:7.5.1" | ||
| val sbtTestInterface = ivy"org.scala-sbt:test-interface:1.0" | ||
| def scalaCompiler(scalaVersion: String) = ivy"org.scala-lang:scala-compiler:${scalaVersion}" | ||
| val scalafmtDynamic = ivy"org.scalameta::scalafmt-dynamic:3.8.5" | ||
| def scalaCompiler(scalaVersion: String) = { | ||
| if (ZincWorkerUtil.isScala3(scalaVersion)) ivy"org.scala-lang:scala3-compiler_3:${scalaVersion}" | ||
| else ivy"org.scala-lang:scala-compiler:${scalaVersion}" | ||
| } | ||
| val scalafmtDynamic = ivy"org.scalameta::scalafmt-dynamic:3.8.5".withDottyCompat(scalaVersion) | ||
| def scalap(scalaVersion: String) = ivy"org.scala-lang:scalap:${scalaVersion}" | ||
| def scalaReflect(scalaVersion: String) = ivy"org.scala-lang:scala-reflect:${scalaVersion}" | ||
| def scalaReflect(scalaVersion: String) = | ||
| if (ZincWorkerUtil.isScala3(scalaVersion)) | ||
| ivy"org.scala-lang:scala-reflect:${Deps.scala2Version}" | ||
| else ivy"org.scala-lang:scala-reflect:${scalaVersion}" | ||
| val scoverage2Version = "2.2.1" | ||
| val scalacScoverage2Plugin = ivy"org.scoverage:::scalac-scoverage-plugin:${scoverage2Version}" | ||
| val scalacScoverage2Reporter = ivy"org.scoverage::scalac-scoverage-reporter:${scoverage2Version}" | ||
| val scalacScoverage2Domain = ivy"org.scoverage::scalac-scoverage-domain:${scoverage2Version}" | ||
| val scalacScoverage2Serializer = | ||
| ivy"org.scoverage::scalac-scoverage-serializer:${scoverage2Version}" | ||
| val scalaparse = ivy"com.lihaoyi::scalaparse:${fastparse.version}" | ||
| val scalatags = ivy"com.lihaoyi::scalatags:0.13.1" | ||
| val scalatags = ivy"com.lihaoyi::scalatags:0.13.1".withDottyCompat(scalaVersion) | ||
| def scalaXml = ivy"org.scala-lang.modules::scala-xml:2.3.0" | ||
| // keep in sync with doc/antora/antory.yml | ||
| val semanticDBscala = ivy"org.scalameta:::semanticdb-scalac:4.12.4" | ||
| val semanticDbJava = ivy"com.sourcegraph:semanticdb-java:0.10.3" | ||
| val sourcecode = ivy"com.lihaoyi::sourcecode:0.4.2" | ||
| val sourcecode = ivy"com.lihaoyi::sourcecode:0.4.3-M5" | ||
| val upickle = ivy"com.lihaoyi::upickle:3.3.1" | ||
| val windowsAnsi = ivy"io.github.alexarchambault.windows-ansi:windows-ansi:0.0.6" | ||
| val zinc = ivy"org.scala-sbt::zinc:1.10.7" | ||
| val zinc = ivy"org.scala-sbt::zinc:1.10.7".withDottyCompat(scalaVersion) | ||
| // keep in sync with doc/antora/antory.yml | ||
| val bsp4j = ivy"ch.epfl.scala:bsp4j:2.2.0-M2" | ||
| val fansi = ivy"com.lihaoyi::fansi:0.5.0" | ||
| val jarjarabrams = ivy"com.eed3si9n.jarjarabrams::jarjar-abrams-core:1.14.0" | ||
| val jarjarabrams = | ||
| ivy"com.eed3si9n.jarjarabrams::jarjar-abrams-core:1.14.0".withDottyCompat(scalaVersion) | ||
| val requests = ivy"com.lihaoyi::requests:0.9.0" | ||
| val logback = ivy"ch.qos.logback:logback-classic:1.5.16" | ||
| val sonatypeCentralClient = ivy"com.lumidion::sonatype-central-client-requests:0.3.0" | ||
|  | @@ -302,7 +319,7 @@ def millBinPlatform: T[String] = Task { | |
| def baseDir = build.millSourcePath | ||
|  | ||
| val essentialBridgeScalaVersions = | ||
| Seq(Deps.scalaVersion, Deps.workerScalaVersion212) | ||
| Seq(Deps.scalaVersion, Deps.scala2Version, Deps.workerScalaVersion212) | ||
| // published compiler bridges | ||
| val bridgeScalaVersions = Seq( | ||
| // Our version of Zinc doesn't work with Scala 2.12.0 and 2.12.4 compiler | ||
|  | @@ -448,30 +465,60 @@ trait MillPublishJavaModule extends MillJavaModule with PublishModule { | |
| */ | ||
| trait MillScalaModule extends ScalaModule with MillJavaModule with ScalafixModule { outer => | ||
| def scalaVersion = Deps.scalaVersion | ||
| def scalafixScalaBinaryVersion = ZincWorkerUtil.scalaBinaryVersion(scalaVersion()) | ||
| def scalapVersion: T[String] = Deps.scala2Version | ||
| def scalafixScalaBinaryVersion = T { | ||
| def sv = scalaVersion() | ||
| if (ZincWorkerUtil.isScala3(sv)) "2.13" | ||
| else ZincWorkerUtil.scalaBinaryVersion(sv) | ||
| } | ||
|  | ||
| def scalafixConfig = T { | ||
| if (ZincWorkerUtil.isScala3(scalaVersion())) Some(T.workspace / ".scalafix-3.conf") else None | ||
| } | ||
| def semanticDbVersion = Deps.semanticDBscala.version | ||
| def scalacOptions = | ||
| super.scalacOptions() ++ Seq( | ||
| "-deprecation", | ||
| "-P:acyclic:force", | ||
| "-feature", | ||
| "-Xlint:unused", | ||
| "-Xlint:adapted-args", | ||
| "-Xsource:3", | ||
| "-Wconf:msg=inferred type changes:silent", | ||
| "-Wconf:msg=case companions no longer extend FunctionN:silent", | ||
| "-Wconf:msg=access modifiers for:silent", | ||
| "-Wconf:msg=found in a package prefix of the required type:silent" | ||
| "-feature" | ||
| ) ++ ( | ||
| if (ZincWorkerUtil.isScala3(scalaVersion())) Seq( | ||
| // "-Werror", | ||
| "-Wunused:all" | ||
| // "-no-indent", | ||
| // "-Wvalue-discard", | ||
| // "-Wshadow:all", | ||
| // "-Wsafe-init", | ||
| // "-Wnonunit-statement", | ||
| // "-Wimplausible-patterns", | ||
| ) | ||
| else Seq( | ||
| "-P:acyclic:force", | ||
| "-Xlint:unused", | ||
| "-Xlint:adapted-args", | ||
| "-Xsource:3", | ||
| "-Wconf:msg=inferred type changes:silent", | ||
| "-Wconf:msg=case companions no longer extend FunctionN:silent", | ||
| "-Wconf:msg=access modifiers for:silent", | ||
| "-Wconf:msg=found in a package prefix of the required type:silent" | ||
| ) | ||
| ) | ||
|  | ||
| def scalacPluginIvyDeps = | ||
| def scalacPluginIvyDeps = T { | ||
| val sv = scalaVersion() | ||
| val binaryVersion = ZincWorkerUtil.scalaBinaryVersion(sv) | ||
| val hasModuleDefs = binaryVersion == "2.13" || binaryVersion == "3" | ||
| super.scalacPluginIvyDeps() ++ | ||
| Agg(Deps.acyclic) ++ | ||
| Agg.when(scalaVersion().startsWith("2.13."))(Deps.millModuledefsPlugin) | ||
| Agg.when(binaryVersion != "3")(Deps.acyclic) ++ | ||
| Agg.when(hasModuleDefs)(Deps.millModuledefsPlugin) | ||
| } | ||
|  | ||
| def mandatoryIvyDeps = | ||
| def mandatoryIvyDeps = T { | ||
| val sv = scalaVersion() | ||
| val binaryVersion = ZincWorkerUtil.scalaBinaryVersion(sv) | ||
| val hasModuleDefs = binaryVersion == "2.13" || binaryVersion == "3" | ||
| super.mandatoryIvyDeps() ++ | ||
| Agg.when(scalaVersion().startsWith("2.13."))(Deps.millModuledefs) | ||
| Agg.when(hasModuleDefs)(Deps.millModuledefs) | ||
| } | ||
|  | ||
| /** Default tests module. */ | ||
| lazy val test: MillScalaTests = new MillScalaTests {} | ||
|  | @@ -487,7 +534,8 @@ trait MillScalaModule extends ScalaModule with MillJavaModule with ScalafixModul | |
| trait MillBaseTestsModule extends TestModule { | ||
| def forkArgs = Task { | ||
| Seq( | ||
| s"-DMILL_SCALA_2_13_VERSION=${Deps.scalaVersion}", | ||
| s"-DMILL_SCALA_3_NEXT_VERSION=${Deps.scalaVersion}", | ||
| s"-DMILL_SCALA_2_13_VERSION=${Deps.scala2Version}", | ||
| s"-DMILL_SCALA_2_12_VERSION=${Deps.workerScalaVersion212}", | ||
| s"-DTEST_SCALA_2_13_VERSION=${Deps.testScala213Version}", | ||
| s"-DTEST_SCALA_2_13_VERSION_FOR_SCALANATIVE_4_2=${Deps.testScala213VersionForScalaNative42}", | ||
|  | @@ -506,6 +554,7 @@ trait MillBaseTestsModule extends TestModule { | |
| } | ||
|  | ||
| def testFramework = "mill.UTestFramework" | ||
| def testForkGrouping = discoveredTestClasses().grouped(1).toSeq | ||
| } | ||
|  | ||
| /** Published module which does not contain strictly handled API. */ | ||
|  | @@ -618,15 +667,31 @@ trait MillStableScalaModule extends MillPublishScalaModule with Mima { | |
| Agg.from( | ||
| Settings.mimaBaseVersions | ||
| .filter(v => !skipPreviousVersions().contains(v)) | ||
| .map(version => | ||
| ivy"${pomSettings().organization}:${artifactId()}:${version}" | ||
| ) | ||
| .map({ version => | ||
| val patchedSuffix = { | ||
| val base = artifactSuffix() | ||
| version match { | ||
| case s"0.$minor.$_" if minor.toIntOption.exists(_ < 12) => | ||
| base match { | ||
| case "_3" => "_2.13" | ||
| case s"_3_$suffix" => s"_2.13_$suffix" | ||
| case _ => base | ||
| } | ||
| case _ => base | ||
| } | ||
| } | ||
| val patchedId = artifactName() + patchedSuffix | ||
| ivy"${pomSettings().organization}:${patchedId}:${version}" | ||
| }) | ||
| ) | ||
| } | ||
|  | ||
| def mimaExcludeAnnotations = Seq("mill.api.internal", "mill.api.experimental") | ||
| def mimaCheckDirection = CheckDirection.Backward | ||
| def skipPreviousVersions: T[Seq[String]] = T(Seq.empty[String]) | ||
| // def mimaCheckDirection = CheckDirection.Backward | ||
| def skipPreviousVersions: T[Seq[String]] = T { | ||
| T.log.info("Skipping mima for previous versions (!!1000s of errors due to Scala 3)") | ||
| mimaPreviousVersions() // T(Seq.empty[String]) | ||
| } | ||
| } | ||
|  | ||
| object bridge extends Cross[BridgeModule](compilerBridgeScalaVersions) | ||
|  | @@ -638,8 +703,11 @@ trait BridgeModule extends MillPublishJavaModule with CrossScalaModule { | |
| def crossFullScalaVersion = true | ||
| def ivyDeps = Agg( | ||
| ivy"org.scala-sbt:compiler-interface:${Deps.zinc.version}", | ||
| ivy"org.scala-sbt:util-interface:${Deps.zinc.version}", | ||
| ivy"org.scala-lang:scala-compiler:${crossScalaVersion}" | ||
| ivy"org.scala-sbt:util-interface:${Deps.zinc.version}" | ||
| ) ++ Agg( | ||
| if (ZincWorkerUtil.isScala3(crossScalaVersion)) | ||
| ivy"org.scala-lang::scala3-compiler:${crossScalaVersion}" | ||
| else ivy"org.scala-lang:scala-compiler:${crossScalaVersion}" | ||
| ) | ||
|  | ||
| def resources = Task { | ||
|  | @@ -648,7 +716,9 @@ trait BridgeModule extends MillPublishJavaModule with CrossScalaModule { | |
| } | ||
|  | ||
| def compilerBridgeIvyDeps: T[Agg[Dep]] = Agg( | ||
| ivy"org.scala-sbt::compiler-bridge:${Deps.zinc.version}".exclude("*" -> "*") | ||
| (if (ZincWorkerUtil.isScala3(crossScalaVersion)) | ||
| ivy"org.scala-lang:scala3-sbt-bridge:${crossScalaVersion}" | ||
| else ivy"org.scala-sbt::compiler-bridge:${Deps.zinc.version}").exclude("*" -> "*") | ||
| ) | ||
|  | ||
| def compilerBridgeSourceJars: T[Agg[PathRef]] = Task { | ||
|  | @@ -723,6 +793,6 @@ implicit object DepSegment extends Cross.ToSegments[Dep]({ dep => | |
| */ | ||
| object dummy extends Cross[DependencyFetchDummy](dummyDeps) | ||
| trait DependencyFetchDummy extends ScalaModule with Cross.Module[Dep] { | ||
| def scalaVersion = Deps.scalaVersion | ||
| def scalaVersion = Deps.scala2Version | ||
| def compileIvyDeps = Agg(crossValue) | ||
| } | ||
      
      Oops, something went wrong.
        
    
  
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be in
.git/info/exclude, since it's user specific and not project specific?