@@ -43,17 +43,17 @@ trait Build {
43
43
object Build {
44
44
45
45
final case class Successful (
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
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
57
57
) extends Build {
58
58
def success : Boolean = true
59
59
def successfulOpt : Some [this .type ] = Some (this )
@@ -171,24 +171,24 @@ object Build {
171
171
}
172
172
173
173
final case class Failed (
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 )]]
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 )]]
181
181
) extends Build {
182
182
def success : Boolean = false
183
183
def successfulOpt : None .type = None
184
184
def outputOpt : None .type = None
185
185
}
186
186
187
187
final case class Cancelled (
188
- inputs : Module ,
189
- options : BuildOptions ,
190
- scope : Scope ,
191
- reason : String
188
+ inputs : Module ,
189
+ options : BuildOptions ,
190
+ scope : Scope ,
191
+ reason : String
192
192
) extends Build {
193
193
def success : Boolean = false
194
194
def successfulOpt : None .type = None
@@ -200,9 +200,9 @@ object Build {
200
200
* Using only the command-line options not the ones from the sources.
201
201
*/
202
202
def updateInputs (
203
- inputs : Module ,
204
- options : BuildOptions ,
205
- testOptions : Option [BuildOptions ] = None
203
+ inputs : Module ,
204
+ options : BuildOptions ,
205
+ testOptions : Option [BuildOptions ] = None
206
206
): Module = {
207
207
208
208
// If some options are manually overridden, append a hash of the options to the project name
@@ -234,9 +234,7 @@ object Build {
234
234
logger,
235
235
options.suppressWarningOptions,
236
236
options.internal.exclude
237
- )
238
-
239
- private def build (
237
+ )private def build (
240
238
inputs : Module ,
241
239
crossSources : CrossSources ,options : BuildOptions ,
242
240
logger : Logger ,
@@ -429,17 +427,17 @@ object Build {
429
427
}
430
428
431
429
private def build (
432
- inputs : Module ,
433
- sources : Sources ,
434
- generatedSources : Seq [GeneratedSource ],
435
- options : BuildOptions ,
436
- scope : Scope ,
437
- logger : Logger ,
438
- buildClient : BloopBuildClient ,
439
- compiler : ScalaCompiler ,
440
- buildTests : Boolean ,
441
- partial : Option [Boolean ],
442
- actionableDiagnostics : Option [Boolean ]
430
+ inputs : Module ,
431
+ sources : Sources ,
432
+ generatedSources : Seq [GeneratedSource ],
433
+ options : BuildOptions ,
434
+ scope : Scope ,
435
+ logger : Logger ,
436
+ buildClient : BloopBuildClient ,
437
+ compiler : ScalaCompiler ,
438
+ buildTests : Boolean ,
439
+ partial : Option [Boolean ],
440
+ actionableDiagnostics : Option [Boolean ]
443
441
)(using ScalaCliInvokeData ): Either [BuildException , Build ] = either {
444
442
445
443
val build0 = value {
@@ -501,9 +499,9 @@ object Build {
501
499
root / Constants .workspaceDirName / projectName.name / s " resources- ${scope.name}"
502
500
503
501
def scalaNativeSupported (
504
- options : BuildOptions ,
505
- inputs : Module ,
506
- logger : Logger
502
+ options : BuildOptions ,
503
+ inputs : Module ,
504
+ logger : Logger
507
505
): Either [BuildException , Option [ScalaNativeCompatibilityError ]] =
508
506
either {
509
507
val scalaParamsOpt = value(options.scalaParams)
@@ -640,16 +638,16 @@ object Build {
640
638
}
641
639
642
640
def watch (
643
- inputs : Module ,
644
- options : BuildOptions ,
645
- compilerMaker : ScalaCompilerMaker ,
646
- docCompilerMakerOpt : Option [ScalaCompilerMaker ],
647
- logger : Logger ,
648
- crossBuilds : Boolean ,
649
- buildTests : Boolean ,
650
- partial : Option [Boolean ],
651
- actionableDiagnostics : Option [Boolean ],
652
- postAction : () => Unit = () => ()
641
+ inputs : Module ,
642
+ options : BuildOptions ,
643
+ compilerMaker : ScalaCompilerMaker ,
644
+ docCompilerMakerOpt : Option [ScalaCompilerMaker ],
645
+ logger : Logger ,
646
+ crossBuilds : Boolean ,
647
+ buildTests : Boolean ,
648
+ partial : Option [Boolean ],
649
+ actionableDiagnostics : Option [Boolean ],
650
+ postAction : () => Unit = () => ()
653
651
)(action : Either [BuildException , Builds ] => Unit )(using ScalaCliInvokeData ): Watcher = {
654
652
655
653
val buildClient = BloopBuildClient .create(
@@ -844,15 +842,15 @@ object Build {
844
842
* a bloop [[Project ]]
845
843
*/
846
844
def buildProject (
847
- inputs : Module ,
848
- sources : Sources ,
849
- generatedSources : Seq [GeneratedSource ],
850
- options : BuildOptions ,
851
- compilerJvmVersionOpt : Option [Positioned [Int ]],
852
- scope : Scope ,
853
- logger : Logger ,
854
- artifacts : Artifacts ,
855
- maybeRecoverOnError : BuildException => Option [BuildException ] = e => Some (e)
845
+ inputs : Module ,
846
+ sources : Sources ,
847
+ generatedSources : Seq [GeneratedSource ],
848
+ options : BuildOptions ,
849
+ compilerJvmVersionOpt : Option [Positioned [Int ]],
850
+ scope : Scope ,
851
+ logger : Logger ,
852
+ artifacts : Artifacts ,
853
+ maybeRecoverOnError : BuildException => Option [BuildException ] = e => Some (e)
856
854
): Either [BuildException , Project ] = either {
857
855
858
856
val allSources = sources.paths.map(_._1) ++ generatedSources.map(_.generated)
@@ -1036,16 +1034,16 @@ object Build {
1036
1034
}
1037
1035
1038
1036
def prepareBuild (
1039
- inputs : Module ,
1040
- sources : Sources ,
1041
- generatedSources : Seq [GeneratedSource ],
1042
- options : BuildOptions ,
1043
- compilerJvmVersionOpt : Option [Positioned [Int ]],
1044
- scope : Scope ,
1045
- compiler : ScalaCompiler ,
1046
- logger : Logger ,
1047
- buildClient : BloopBuildClient ,
1048
- maybeRecoverOnError : BuildException => Option [BuildException ] = e => Some (e)
1037
+ inputs : Module ,
1038
+ sources : Sources ,
1039
+ generatedSources : Seq [GeneratedSource ],
1040
+ options : BuildOptions ,
1041
+ compilerJvmVersionOpt : Option [Positioned [Int ]],
1042
+ scope : Scope ,
1043
+ compiler : ScalaCompiler ,
1044
+ logger : Logger ,
1045
+ buildClient : BloopBuildClient ,
1046
+ maybeRecoverOnError : BuildException => Option [BuildException ] = e => Some (e)
1049
1047
): Either [BuildException , (os.Path , Option [ScalaParameters ], Artifacts , Project , Boolean )] =
1050
1048
either {
1051
1049
@@ -1117,15 +1115,15 @@ object Build {
1117
1115
}
1118
1116
1119
1117
def buildOnce (
1120
- inputs : Module ,
1121
- sources : Sources ,
1122
- generatedSources : Seq [GeneratedSource ],
1123
- options : BuildOptions ,
1124
- scope : Scope ,
1125
- logger : Logger ,
1126
- buildClient : BloopBuildClient ,
1127
- compiler : ScalaCompiler ,
1128
- partialOpt : Option [Boolean ]
1118
+ inputs : Module ,
1119
+ sources : Sources ,
1120
+ generatedSources : Seq [GeneratedSource ],
1121
+ options : BuildOptions ,
1122
+ scope : Scope ,
1123
+ logger : Logger ,
1124
+ buildClient : BloopBuildClient ,
1125
+ compiler : ScalaCompiler ,
1126
+ partialOpt : Option [Boolean ]
1129
1127
): Either [BuildException , Build ] = either {
1130
1128
1131
1129
if (options.platform.value == Platform .Native )
@@ -1287,14 +1285,14 @@ object Build {
1287
1285
else path.toString
1288
1286
1289
1287
private def jmhBuild (
1290
- inputs : Module ,
1291
- build : Build .Successful ,
1292
- logger : Logger ,
1293
- javaCommand : String ,
1294
- buildClient : BloopBuildClient ,
1295
- compiler : ScalaCompiler ,
1296
- buildTests : Boolean ,
1297
- actionableDiagnostics : Option [Boolean ]
1288
+ inputs : Module ,
1289
+ build : Build .Successful ,
1290
+ logger : Logger ,
1291
+ javaCommand : String ,
1292
+ buildClient : BloopBuildClient ,
1293
+ compiler : ScalaCompiler ,
1294
+ buildTests : Boolean ,
1295
+ actionableDiagnostics : Option [Boolean ]
1298
1296
)(using ScalaCliInvokeData ): Either [BuildException , Option [Build ]] = either {
1299
1297
val jmhProjectName = inputs.projectName.name + " _jmh"
1300
1298
val jmhOutputDir = inputs.workspace / Constants .workspaceDirName / jmhProjectName
0 commit comments