@@ -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 )
@@ -166,24 +166,24 @@ object Build {
166
166
}
167
167
168
168
final case class Failed (
169
- inputs : Module ,
170
- options : BuildOptions ,
171
- scope : Scope ,
172
- sources : Sources ,
173
- artifacts : Artifacts ,
174
- project : Project ,
175
- diagnostics : Option [Seq [(Either [String , os.Path ], bsp4j.Diagnostic )]]
169
+ inputs : Module ,
170
+ options : BuildOptions ,
171
+ scope : Scope ,
172
+ sources : Sources ,
173
+ artifacts : Artifacts ,
174
+ project : Project ,
175
+ diagnostics : Option [Seq [(Either [String , os.Path ], bsp4j.Diagnostic )]]
176
176
) extends Build {
177
177
def success : Boolean = false
178
178
def successfulOpt : None .type = None
179
179
def outputOpt : None .type = None
180
180
}
181
181
182
182
final case class Cancelled (
183
- inputs : Module ,
184
- options : BuildOptions ,
185
- scope : Scope ,
186
- reason : String
183
+ inputs : Module ,
184
+ options : BuildOptions ,
185
+ scope : Scope ,
186
+ reason : String
187
187
) extends Build {
188
188
def success : Boolean = false
189
189
def successfulOpt : None .type = None
@@ -195,9 +195,9 @@ object Build {
195
195
* Using only the command-line options not the ones from the sources.
196
196
*/
197
197
def updateInputs (
198
- inputs : Module ,
199
- options : BuildOptions ,
200
- testOptions : Option [BuildOptions ] = None
198
+ inputs : Module ,
199
+ options : BuildOptions ,
200
+ testOptions : Option [BuildOptions ] = None
201
201
): Module = {
202
202
203
203
// If some options are manually overridden, append a hash of the options to the project name
@@ -229,9 +229,7 @@ object Build {
229
229
logger,
230
230
options.suppressWarningOptions,
231
231
options.internal.exclude
232
- )
233
-
234
- private def build (
232
+ )private def build (
235
233
inputs : Module ,
236
234
crossSources : CrossSources ,options : BuildOptions ,
237
235
logger : Logger ,
@@ -424,17 +422,17 @@ object Build {
424
422
}
425
423
426
424
private def build (
427
- inputs : Module ,
428
- sources : Sources ,
429
- generatedSources : Seq [GeneratedSource ],
430
- options : BuildOptions ,
431
- scope : Scope ,
432
- logger : Logger ,
433
- buildClient : BloopBuildClient ,
434
- compiler : ScalaCompiler ,
435
- buildTests : Boolean ,
436
- partial : Option [Boolean ],
437
- actionableDiagnostics : Option [Boolean ]
425
+ inputs : Module ,
426
+ sources : Sources ,
427
+ generatedSources : Seq [GeneratedSource ],
428
+ options : BuildOptions ,
429
+ scope : Scope ,
430
+ logger : Logger ,
431
+ buildClient : BloopBuildClient ,
432
+ compiler : ScalaCompiler ,
433
+ buildTests : Boolean ,
434
+ partial : Option [Boolean ],
435
+ actionableDiagnostics : Option [Boolean ]
438
436
)(using ScalaCliInvokeData ): Either [BuildException , Build ] = either {
439
437
440
438
val build0 = value {
@@ -496,9 +494,9 @@ object Build {
496
494
root / Constants .workspaceDirName / projectName.name / s " resources- ${scope.name}"
497
495
498
496
def scalaNativeSupported (
499
- options : BuildOptions ,
500
- inputs : Module ,
501
- logger : Logger
497
+ options : BuildOptions ,
498
+ inputs : Module ,
499
+ logger : Logger
502
500
): Either [BuildException , Option [ScalaNativeCompatibilityError ]] =
503
501
either {
504
502
val scalaParamsOpt = value(options.scalaParams)
@@ -635,16 +633,16 @@ object Build {
635
633
}
636
634
637
635
def watch (
638
- inputs : Module ,
639
- options : BuildOptions ,
640
- compilerMaker : ScalaCompilerMaker ,
641
- docCompilerMakerOpt : Option [ScalaCompilerMaker ],
642
- logger : Logger ,
643
- crossBuilds : Boolean ,
644
- buildTests : Boolean ,
645
- partial : Option [Boolean ],
646
- actionableDiagnostics : Option [Boolean ],
647
- postAction : () => Unit = () => ()
636
+ inputs : Module ,
637
+ options : BuildOptions ,
638
+ compilerMaker : ScalaCompilerMaker ,
639
+ docCompilerMakerOpt : Option [ScalaCompilerMaker ],
640
+ logger : Logger ,
641
+ crossBuilds : Boolean ,
642
+ buildTests : Boolean ,
643
+ partial : Option [Boolean ],
644
+ actionableDiagnostics : Option [Boolean ],
645
+ postAction : () => Unit = () => ()
648
646
)(action : Either [BuildException , Builds ] => Unit )(using ScalaCliInvokeData ): Watcher = {
649
647
650
648
val buildClient = BloopBuildClient .create(
@@ -839,15 +837,15 @@ object Build {
839
837
* a bloop [[Project ]]
840
838
*/
841
839
def buildProject (
842
- inputs : Module ,
843
- sources : Sources ,
844
- generatedSources : Seq [GeneratedSource ],
845
- options : BuildOptions ,
846
- compilerJvmVersionOpt : Option [Positioned [Int ]],
847
- scope : Scope ,
848
- logger : Logger ,
849
- artifacts : Artifacts ,
850
- maybeRecoverOnError : BuildException => Option [BuildException ] = e => Some (e)
840
+ inputs : Module ,
841
+ sources : Sources ,
842
+ generatedSources : Seq [GeneratedSource ],
843
+ options : BuildOptions ,
844
+ compilerJvmVersionOpt : Option [Positioned [Int ]],
845
+ scope : Scope ,
846
+ logger : Logger ,
847
+ artifacts : Artifacts ,
848
+ maybeRecoverOnError : BuildException => Option [BuildException ] = e => Some (e)
851
849
): Either [BuildException , Project ] = either {
852
850
853
851
val allSources = sources.paths.map(_._1) ++ generatedSources.map(_.generated)
@@ -1031,16 +1029,16 @@ object Build {
1031
1029
}
1032
1030
1033
1031
def prepareBuild (
1034
- inputs : Module ,
1035
- sources : Sources ,
1036
- generatedSources : Seq [GeneratedSource ],
1037
- options : BuildOptions ,
1038
- compilerJvmVersionOpt : Option [Positioned [Int ]],
1039
- scope : Scope ,
1040
- compiler : ScalaCompiler ,
1041
- logger : Logger ,
1042
- buildClient : BloopBuildClient ,
1043
- maybeRecoverOnError : BuildException => Option [BuildException ] = e => Some (e)
1032
+ inputs : Module ,
1033
+ sources : Sources ,
1034
+ generatedSources : Seq [GeneratedSource ],
1035
+ options : BuildOptions ,
1036
+ compilerJvmVersionOpt : Option [Positioned [Int ]],
1037
+ scope : Scope ,
1038
+ compiler : ScalaCompiler ,
1039
+ logger : Logger ,
1040
+ buildClient : BloopBuildClient ,
1041
+ maybeRecoverOnError : BuildException => Option [BuildException ] = e => Some (e)
1044
1042
): Either [BuildException , (os.Path , Option [ScalaParameters ], Artifacts , Project , Boolean )] =
1045
1043
either {
1046
1044
@@ -1112,15 +1110,15 @@ object Build {
1112
1110
}
1113
1111
1114
1112
def buildOnce (
1115
- inputs : Module ,
1116
- sources : Sources ,
1117
- generatedSources : Seq [GeneratedSource ],
1118
- options : BuildOptions ,
1119
- scope : Scope ,
1120
- logger : Logger ,
1121
- buildClient : BloopBuildClient ,
1122
- compiler : ScalaCompiler ,
1123
- partialOpt : Option [Boolean ]
1113
+ inputs : Module ,
1114
+ sources : Sources ,
1115
+ generatedSources : Seq [GeneratedSource ],
1116
+ options : BuildOptions ,
1117
+ scope : Scope ,
1118
+ logger : Logger ,
1119
+ buildClient : BloopBuildClient ,
1120
+ compiler : ScalaCompiler ,
1121
+ partialOpt : Option [Boolean ]
1124
1122
): Either [BuildException , Build ] = either {
1125
1123
1126
1124
if (options.platform.value == Platform .Native )
@@ -1282,14 +1280,14 @@ object Build {
1282
1280
else path.toString
1283
1281
1284
1282
private def jmhBuild (
1285
- inputs : Module ,
1286
- build : Build .Successful ,
1287
- logger : Logger ,
1288
- javaCommand : String ,
1289
- buildClient : BloopBuildClient ,
1290
- compiler : ScalaCompiler ,
1291
- buildTests : Boolean ,
1292
- actionableDiagnostics : Option [Boolean ]
1283
+ inputs : Module ,
1284
+ build : Build .Successful ,
1285
+ logger : Logger ,
1286
+ javaCommand : String ,
1287
+ buildClient : BloopBuildClient ,
1288
+ compiler : ScalaCompiler ,
1289
+ buildTests : Boolean ,
1290
+ actionableDiagnostics : Option [Boolean ]
1293
1291
)(using ScalaCliInvokeData ): Either [BuildException , Option [Build ]] = either {
1294
1292
val jmhProjectName = inputs.projectName.name + " _jmh"
1295
1293
val jmhOutputDir = inputs.workspace / Constants .workspaceDirName / jmhProjectName
0 commit comments