@@ -30,7 +30,7 @@ import scala.util.control.NonFatal
3030import scala .util .{Properties , Try }
3131
3232trait Build {
33- def inputs : ModuleInputs
33+ def inputs : Module
3434 def options : BuildOptions
3535 def scope : Scope
3636 def outputOpt : Option [os.Path ]
@@ -43,17 +43,17 @@ trait Build {
4343object Build {
4444
4545 final case class Successful (
46- inputs : ModuleInputs ,
47- options : BuildOptions ,
48- scalaParams : Option [ScalaParameters ],
49- scope : Scope ,
50- sources : Sources ,
51- artifacts : Artifacts ,
52- project : Project ,
53- output : os.Path ,
54- diagnostics : Option [Seq [(Either [String , os.Path ], bsp4j.Diagnostic )]],
55- generatedSources : Seq [GeneratedSource ],
56- isPartial : Boolean
46+ inputs : Module ,
47+ options : BuildOptions ,
48+ scalaParams : Option [ScalaParameters ],
49+ scope : Scope ,
50+ sources : Sources ,
51+ artifacts : Artifacts ,
52+ project : Project ,
53+ output : os.Path ,
54+ diagnostics : Option [Seq [(Either [String , os.Path ], bsp4j.Diagnostic )]],
55+ generatedSources : Seq [GeneratedSource ],
56+ isPartial : Boolean
5757 ) extends Build {
5858 def success : Boolean = true
5959 def successfulOpt : Some [this .type ] = Some (this )
@@ -171,24 +171,24 @@ object Build {
171171 }
172172
173173 final case class Failed (
174- inputs : ModuleInputs ,
175- options : BuildOptions ,
176- scope : Scope ,
177- sources : Sources ,
178- artifacts : Artifacts ,
179- project : Project ,
180- diagnostics : Option [Seq [(Either [String , os.Path ], bsp4j.Diagnostic )]]
174+ inputs : Module ,
175+ options : BuildOptions ,
176+ scope : Scope ,
177+ sources : Sources ,
178+ artifacts : Artifacts ,
179+ project : Project ,
180+ diagnostics : Option [Seq [(Either [String , os.Path ], bsp4j.Diagnostic )]]
181181 ) extends Build {
182182 def success : Boolean = false
183183 def successfulOpt : None .type = None
184184 def outputOpt : None .type = None
185185 }
186186
187187 final case class Cancelled (
188- inputs : ModuleInputs ,
189- options : BuildOptions ,
190- scope : Scope ,
191- reason : String
188+ inputs : Module ,
189+ options : BuildOptions ,
190+ scope : Scope ,
191+ reason : String
192192 ) extends Build {
193193 def success : Boolean = false
194194 def successfulOpt : None .type = None
@@ -200,10 +200,10 @@ object Build {
200200 * Using only the command-line options not the ones from the sources.
201201 */
202202 def updateInputs (
203- inputs : ModuleInputs ,
204- options : BuildOptions ,
205- testOptions : Option [BuildOptions ] = None
206- ): ModuleInputs = {
203+ inputs : Module ,
204+ options : BuildOptions ,
205+ testOptions : Option [BuildOptions ] = None
206+ ): Module = {
207207
208208 // If some options are manually overridden, append a hash of the options to the project name
209209 // Using options, not options0 - only the command-line options are taken into account. No hash is
@@ -220,7 +220,7 @@ object Build {
220220 }
221221
222222 private def allInputs (
223- inputs : ModuleInputs ,
223+ inputs : Module ,
224224 options : BuildOptions ,
225225 logger : Logger
226226 )(using ScalaCliInvokeData ) =
@@ -237,9 +237,8 @@ object Build {
237237 )
238238
239239 private def build (
240- inputs : ModuleInputs ,
241- crossSources : CrossSources ,
242- options : BuildOptions ,
240+ inputs : Module ,
241+ crossSources : CrossSources ,options : BuildOptions ,
243242 logger : Logger ,
244243 buildClient : BloopBuildClient ,
245244 compiler : ScalaCompiler ,
@@ -252,7 +251,7 @@ object Build {
252251 val sharedOptions = crossSources.sharedOptions(options)
253252 val crossOptions = sharedOptions.crossOptions
254253
255- def doPostProcess (build : Build , inputs : ModuleInputs , scope : Scope ): Unit = build match {
254+ def doPostProcess (build : Build , inputs : Module , scope : Scope ): Unit = build match {
256255 case build : Build .Successful =>
257256 for (sv <- build.project.scalaCompiler.map(_.scalaVersion))
258257 postProcess(
@@ -431,17 +430,17 @@ object Build {
431430 }
432431
433432 private def build (
434- inputs : ModuleInputs ,
435- sources : Sources ,
436- generatedSources : Seq [GeneratedSource ],
437- options : BuildOptions ,
438- scope : Scope ,
439- logger : Logger ,
440- buildClient : BloopBuildClient ,
441- compiler : ScalaCompiler ,
442- buildTests : Boolean ,
443- partial : Option [Boolean ],
444- actionableDiagnostics : Option [Boolean ]
433+ inputs : Module ,
434+ sources : Sources ,
435+ generatedSources : Seq [GeneratedSource ],
436+ options : BuildOptions ,
437+ scope : Scope ,
438+ logger : Logger ,
439+ buildClient : BloopBuildClient ,
440+ compiler : ScalaCompiler ,
441+ buildTests : Boolean ,
442+ partial : Option [Boolean ],
443+ actionableDiagnostics : Option [Boolean ]
445444 )(using ScalaCliInvokeData ): Either [BuildException , Build ] = either {
446445
447446 val build0 = value {
@@ -503,9 +502,9 @@ object Build {
503502 root / Constants .workspaceDirName / projectName.name / s " resources- ${scope.name}"
504503
505504 def scalaNativeSupported (
506- options : BuildOptions ,
507- inputs : ModuleInputs ,
508- logger : Logger
505+ options : BuildOptions ,
506+ inputs : Module ,
507+ logger : Logger
509508 ): Either [BuildException , Option [ScalaNativeCompatibilityError ]] =
510509 either {
511510 val scalaParamsOpt = value(options.scalaParams)
@@ -562,7 +561,7 @@ object Build {
562561 }
563562
564563 def build (
565- inputs : ModuleInputs ,
564+ inputs : Module ,
566565 options : BuildOptions ,
567566 compilerMaker : ScalaCompilerMaker ,
568567 docCompilerMakerOpt : Option [ScalaCompilerMaker ],
@@ -642,16 +641,16 @@ object Build {
642641 }
643642
644643 def watch (
645- inputs : ModuleInputs ,
646- options : BuildOptions ,
647- compilerMaker : ScalaCompilerMaker ,
648- docCompilerMakerOpt : Option [ScalaCompilerMaker ],
649- logger : Logger ,
650- crossBuilds : Boolean ,
651- buildTests : Boolean ,
652- partial : Option [Boolean ],
653- actionableDiagnostics : Option [Boolean ],
654- postAction : () => Unit = () => ()
644+ inputs : Module ,
645+ options : BuildOptions ,
646+ compilerMaker : ScalaCompilerMaker ,
647+ docCompilerMakerOpt : Option [ScalaCompilerMaker ],
648+ logger : Logger ,
649+ crossBuilds : Boolean ,
650+ buildTests : Boolean ,
651+ partial : Option [Boolean ],
652+ actionableDiagnostics : Option [Boolean ],
653+ postAction : () => Unit = () => ()
655654 )(action : Either [BuildException , Builds ] => Unit )(using ScalaCliInvokeData ): Watcher = {
656655
657656 val buildClient = BloopBuildClient .create(
@@ -846,15 +845,15 @@ object Build {
846845 * a bloop [[Project ]]
847846 */
848847 def buildProject (
849- inputs : ModuleInputs ,
850- sources : Sources ,
851- generatedSources : Seq [GeneratedSource ],
852- options : BuildOptions ,
853- compilerJvmVersionOpt : Option [Positioned [Int ]],
854- scope : Scope ,
855- logger : Logger ,
856- artifacts : Artifacts ,
857- maybeRecoverOnError : BuildException => Option [BuildException ] = e => Some (e)
848+ inputs : Module ,
849+ sources : Sources ,
850+ generatedSources : Seq [GeneratedSource ],
851+ options : BuildOptions ,
852+ compilerJvmVersionOpt : Option [Positioned [Int ]],
853+ scope : Scope ,
854+ logger : Logger ,
855+ artifacts : Artifacts ,
856+ maybeRecoverOnError : BuildException => Option [BuildException ] = e => Some (e)
858857 ): Either [BuildException , Project ] = either {
859858
860859 val allSources = sources.paths.map(_._1) ++ generatedSources.map(_.generated)
@@ -1038,16 +1037,16 @@ object Build {
10381037 }
10391038
10401039 def prepareBuild (
1041- inputs : ModuleInputs ,
1042- sources : Sources ,
1043- generatedSources : Seq [GeneratedSource ],
1044- options : BuildOptions ,
1045- compilerJvmVersionOpt : Option [Positioned [Int ]],
1046- scope : Scope ,
1047- compiler : ScalaCompiler ,
1048- logger : Logger ,
1049- buildClient : BloopBuildClient ,
1050- maybeRecoverOnError : BuildException => Option [BuildException ] = e => Some (e)
1040+ inputs : Module ,
1041+ sources : Sources ,
1042+ generatedSources : Seq [GeneratedSource ],
1043+ options : BuildOptions ,
1044+ compilerJvmVersionOpt : Option [Positioned [Int ]],
1045+ scope : Scope ,
1046+ compiler : ScalaCompiler ,
1047+ logger : Logger ,
1048+ buildClient : BloopBuildClient ,
1049+ maybeRecoverOnError : BuildException => Option [BuildException ] = e => Some (e)
10511050 ): Either [BuildException , (os.Path , Option [ScalaParameters ], Artifacts , Project , Boolean )] =
10521051 either {
10531052
@@ -1119,15 +1118,15 @@ object Build {
11191118 }
11201119
11211120 def buildOnce (
1122- inputs : ModuleInputs ,
1123- sources : Sources ,
1124- generatedSources : Seq [GeneratedSource ],
1125- options : BuildOptions ,
1126- scope : Scope ,
1127- logger : Logger ,
1128- buildClient : BloopBuildClient ,
1129- compiler : ScalaCompiler ,
1130- partialOpt : Option [Boolean ]
1121+ inputs : Module ,
1122+ sources : Sources ,
1123+ generatedSources : Seq [GeneratedSource ],
1124+ options : BuildOptions ,
1125+ scope : Scope ,
1126+ logger : Logger ,
1127+ buildClient : BloopBuildClient ,
1128+ compiler : ScalaCompiler ,
1129+ partialOpt : Option [Boolean ]
11311130 ): Either [BuildException , Build ] = either {
11321131
11331132 if (options.platform.value == Platform .Native )
@@ -1289,14 +1288,14 @@ object Build {
12891288 else path.toString
12901289
12911290 private def jmhBuild (
1292- inputs : ModuleInputs ,
1293- build : Build .Successful ,
1294- logger : Logger ,
1295- javaCommand : String ,
1296- buildClient : BloopBuildClient ,
1297- compiler : ScalaCompiler ,
1298- buildTests : Boolean ,
1299- actionableDiagnostics : Option [Boolean ]
1291+ inputs : Module ,
1292+ build : Build .Successful ,
1293+ logger : Logger ,
1294+ javaCommand : String ,
1295+ buildClient : BloopBuildClient ,
1296+ compiler : ScalaCompiler ,
1297+ buildTests : Boolean ,
1298+ actionableDiagnostics : Option [Boolean ]
13001299 )(using ScalaCliInvokeData ): Either [BuildException , Option [Build ]] = either {
13011300 val jmhProjectName = inputs.projectName.name + " _jmh"
13021301 val jmhOutputDir = inputs.workspace / Constants .workspaceDirName / jmhProjectName
0 commit comments