@@ -209,16 +209,14 @@ object ZincRunner extends WorkerMain[ZincRunnerWorkerConfig] {
209
209
210
210
val compileOptions =
211
211
CompileOptions .create
212
- .withSources(sources.map(source => PlainVirtualFile (source.toAbsolutePath().normalize())).toArray)
213
- .withClasspath((classesOutputDir +: deps.map(_.classpath)).map(path => PlainVirtualFile (path)).toArray)
212
+ .withSources(sources.view. map(source => PlainVirtualFile (source.toAbsolutePath().normalize())).toArray)
213
+ .withClasspath((classesOutputDir +: deps.view. map(_.classpath)).map(path => PlainVirtualFile (path)).toArray)
214
214
.withClassesDirectory(classesOutputDir)
215
- .withJavacOptions(workRequest.javaCompilerOptions.toArray )
215
+ .withJavacOptions(workRequest.javaCompilerOptions)
216
216
.withScalacOptions(
217
- (
218
- workRequest.plugins.map(p => s " -Xplugin: $p" ) ++
219
- workRequest.compilerOptions ++
220
- workRequest.compilerOptionsReferencingPaths
221
- ).toArray,
217
+ workRequest.plugins.view.map(p => s " -Xplugin: $p" ).toArray ++
218
+ workRequest.compilerOptions ++
219
+ workRequest.compilerOptionsReferencingPaths.toArray,
222
220
)
223
221
224
222
val compilers = {
@@ -304,11 +302,6 @@ object ZincRunner extends WorkerMain[ZincRunnerWorkerConfig] {
304
302
305
303
// create analyses
306
304
val pathString = analysisStorePath.toAbsolutePath().normalize().toString()
307
- val analysisStoreText = AnalysisUtil .getAnalysisStore(
308
- new File (pathString.substring(0 , pathString.length() - 3 ) + " .text.gz" ),
309
- true ,
310
- readWriteMappers,
311
- )
312
305
// Filter out libraryClassNames from the analysis because it is non-deterministic.
313
306
// Can stop doing this once the bug in Zinc is fixed. Check the comment on FilteredRelations
314
307
// for more info.
@@ -319,7 +312,18 @@ object ZincRunner extends WorkerMain[ZincRunnerWorkerConfig] {
319
312
infos = FilteredInfos .getFilteredInfos(originalResultAnalysis.infos),
320
313
)
321
314
}
322
- analysisStoreText.set(AnalysisContents .create(resultAnalysis, compileResult.setup))
315
+
316
+ // This will be true if the `--worker_verbose` Bazel flag is set
317
+ if (verbosity >= 10 ) {
318
+ val analysisStoreText = AnalysisUtil .getAnalysisStore(
319
+ new File (pathString.substring(0 , pathString.length() - 3 ) + " .text.gz" ),
320
+ true ,
321
+ readWriteMappers,
322
+ )
323
+
324
+ analysisStoreText.set(AnalysisContents .create(resultAnalysis, compileResult.setup))
325
+ }
326
+
323
327
analysisStore.set(AnalysisContents .create(resultAnalysis, compileResult.setup))
324
328
325
329
// create used deps
@@ -329,7 +333,7 @@ object ZincRunner extends WorkerMain[ZincRunnerWorkerConfig] {
329
333
deps.filter(Dep .used(deps, resultAnalysis.relations, lookup)).filterNot { dep =>
330
334
val filteredDepFileName = FileUtil .getNameWithoutRulesJvmExternalStampPrefix(dep.file)
331
335
332
- scalaInstance.libraryJars
336
+ scalaInstance.libraryJars.view
333
337
.map(FileUtil .getNameWithoutRulesJvmExternalStampPrefix)
334
338
.contains(filteredDepFileName)
335
339
}
0 commit comments