@@ -209,16 +209,14 @@ object ZincRunner extends WorkerMain[ZincRunnerWorkerConfig] {
209209
210210 val compileOptions =
211211 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)
214214 .withClassesDirectory(classesOutputDir)
215- .withJavacOptions(workRequest.javaCompilerOptions.toArray )
215+ .withJavacOptions(workRequest.javaCompilerOptions)
216216 .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,
222220 )
223221
224222 val compilers = {
@@ -304,11 +302,6 @@ object ZincRunner extends WorkerMain[ZincRunnerWorkerConfig] {
304302
305303 // create analyses
306304 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- )
312305 // Filter out libraryClassNames from the analysis because it is non-deterministic.
313306 // Can stop doing this once the bug in Zinc is fixed. Check the comment on FilteredRelations
314307 // for more info.
@@ -319,7 +312,18 @@ object ZincRunner extends WorkerMain[ZincRunnerWorkerConfig] {
319312 infos = FilteredInfos .getFilteredInfos(originalResultAnalysis.infos),
320313 )
321314 }
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+
323327 analysisStore.set(AnalysisContents .create(resultAnalysis, compileResult.setup))
324328
325329 // create used deps
@@ -329,7 +333,7 @@ object ZincRunner extends WorkerMain[ZincRunnerWorkerConfig] {
329333 deps.filter(Dep .used(deps, resultAnalysis.relations, lookup)).filterNot { dep =>
330334 val filteredDepFileName = FileUtil .getNameWithoutRulesJvmExternalStampPrefix(dep.file)
331335
332- scalaInstance.libraryJars
336+ scalaInstance.libraryJars.view
333337 .map(FileUtil .getNameWithoutRulesJvmExternalStampPrefix)
334338 .contains(filteredDepFileName)
335339 }
0 commit comments