diff --git a/internal/zinc-benchmarks/src/test/scala/xsbt/ZincBenchmark.scala b/internal/zinc-benchmarks/src/test/scala/xsbt/ZincBenchmark.scala index 2c411579f6..72e6dfeb30 100644 --- a/internal/zinc-benchmarks/src/test/scala/xsbt/ZincBenchmark.scala +++ b/internal/zinc-benchmarks/src/test/scala/xsbt/ZincBenchmark.scala @@ -185,7 +185,7 @@ private[xsbt] object ZincBenchmark { | // Resolve project dynamically to avoid name clashes/overloading | val project = LocalProject("$sbtProject") | Def.task { - | val file = new File("${outputFile.getAbsolutePath.replaceAllLiterally("\\", "/")}") + | val file = new File("${outputFile.getAbsolutePath.replace("\\", "/")}") | val rawSources = (sources in Compile in project).value | val sourcesLine = rawSources.map(_.getCanonicalPath).mkString(" ") | val rawClasspath = (dependencyClasspath in Compile in project).value diff --git a/internal/zinc-compile-core/src/main/scala/sbt/internal/inc/AnalyzingCompiler.scala b/internal/zinc-compile-core/src/main/scala/sbt/internal/inc/AnalyzingCompiler.scala index 1f2d57fd6a..b9f0cc9b05 100644 --- a/internal/zinc-compile-core/src/main/scala/sbt/internal/inc/AnalyzingCompiler.scala +++ b/internal/zinc-compile-core/src/main/scala/sbt/internal/inc/AnalyzingCompiler.scala @@ -80,8 +80,8 @@ final class AnalyzingCompiler( log: xLogger ): Unit = { val progress = if (progressOpt.isPresent) progressOpt.get else IgnoreProgress - val cp = classpath.map(converter.toPath) - val arguments = compArgs.makeArguments(Nil, cp, options).toArray + val cp = classpath.map(converter.toPath).toIndexedSeq + val arguments = compArgs.makeArguments(Nil, cp, options.toIndexedSeq).toArray // hold reference to compiler bridge class loader to prevent its being evicted // from the compiler cache (sbt/zinc#914) val loader = getCompilerLoader(log) @@ -454,7 +454,7 @@ object AnalyzingCompiler { val scalaLibraryJars = compiler.scalaInstance.libraryJars val restClasspath = xsbtiJars.toSeq ++ sourceJars val classpath = scalaLibraryJars.map(_.toPath) ++ restClasspath - compiler(sourceFiles, classpath, outputDirectory.toPath, "-nowarn" :: Nil) + compiler(sourceFiles, classpath.toIndexedSeq, outputDirectory.toPath, "-nowarn" :: Nil) val end = (System.currentTimeMillis - start) / 1000.0 log.info(s" Compilation completed in ${end}s.") diff --git a/internal/zinc-compile-core/src/main/scala/sbt/internal/inc/FilteredReporter.scala b/internal/zinc-compile-core/src/main/scala/sbt/internal/inc/FilteredReporter.scala index 4c4856150d..2312de34a5 100644 --- a/internal/zinc-compile-core/src/main/scala/sbt/internal/inc/FilteredReporter.scala +++ b/internal/zinc-compile-core/src/main/scala/sbt/internal/inc/FilteredReporter.scala @@ -67,8 +67,11 @@ class FilteredReporter( filters.exists(f => f(value).booleanValue()) severity != Severity.Error && ( - (pos.sourceFile.isPresent && isFiltered(fileFilters, pos.sourceFile.get.toPath)) || - (isFiltered(msgFilters, msg)) + (pos.sourceFile.isPresent && isFiltered( + fileFilters.toIndexedSeq, + pos.sourceFile.get.toPath + )) || + (isFiltered(msgFilters.toIndexedSeq, msg)) ) } diff --git a/internal/zinc-compile-core/src/main/scala/sbt/internal/inc/javac/ForkedJava.scala b/internal/zinc-compile-core/src/main/scala/sbt/internal/inc/javac/ForkedJava.scala index 412819dba1..6a6fb039d2 100644 --- a/internal/zinc-compile-core/src/main/scala/sbt/internal/inc/javac/ForkedJava.scala +++ b/internal/zinc-compile-core/src/main/scala/sbt/internal/inc/javac/ForkedJava.scala @@ -100,7 +100,15 @@ final class ForkedJavaCompiler(javaHome: Option[Path]) extends XJavaCompiler { reporter: Reporter, log: XLogger ): Boolean = - ForkedJava.launch(javaHome, "javac", sources, options, output, log, reporter) + ForkedJava.launch( + javaHome, + "javac", + sources.toIndexedSeq, + options.toIndexedSeq, + output, + log, + reporter, + ) } final class ForkedJavadoc(javaHome: Option[Path]) extends XJavadoc { def run( @@ -111,5 +119,13 @@ final class ForkedJavadoc(javaHome: Option[Path]) extends XJavadoc { reporter: Reporter, log: XLogger ): Boolean = - ForkedJava.launch(javaHome, "javadoc", sources, options, output, log, reporter) + ForkedJava.launch( + javaHome, + "javadoc", + sources.toIndexedSeq, + options.toIndexedSeq, + output, + log, + reporter, + ) } diff --git a/internal/zinc-compile-core/src/main/scala/sbt/internal/inc/javac/LocalJava.scala b/internal/zinc-compile-core/src/main/scala/sbt/internal/inc/javac/LocalJava.scala index a4fee662a2..b305a053dd 100644 --- a/internal/zinc-compile-core/src/main/scala/sbt/internal/inc/javac/LocalJava.scala +++ b/internal/zinc-compile-core/src/main/scala/sbt/internal/inc/javac/LocalJava.scala @@ -104,7 +104,6 @@ object LocalJava { ): Int = { (javadocTool, standardDocletClass) match { case (Some(m), Some(clz)) => - import scala.collection.JavaConverters._ val task = m.getTask( out, null, @@ -290,7 +289,6 @@ final class LocalJavaCompiler(compiler: javax.tools.JavaCompiler) extends XJavaC log0: XLogger ): Boolean = { val log: Logger = log0 - import collection.JavaConverters._ val logger = new LoggerWriter(log) val logWriter = new PrintWriter(logger) log.debug("Attempting to call " + compiler + " directly...") diff --git a/internal/zinc-core/src/main/scala/sbt/internal/inc/Changes.scala b/internal/zinc-core/src/main/scala/sbt/internal/inc/Changes.scala index e6df712f16..3a895f887e 100644 --- a/internal/zinc-core/src/main/scala/sbt/internal/inc/Changes.scala +++ b/internal/zinc-core/src/main/scala/sbt/internal/inc/Changes.scala @@ -91,7 +91,6 @@ final case class TraitPrivateMembersModified(modified: String) extends APIChange final case class ModifiedNames(names: Set[UsedName]) { def in(scope: UseScope): Set[UsedName] = names.filter(_.scopes.contains(scope)) - import collection.JavaConverters._ private lazy val lookupMap: Set[(String, UseScope)] = names.flatMap(n => n.scopes.asScala.map(n.name -> _)) diff --git a/internal/zinc-core/src/main/scala/sbt/internal/inc/FileValueCache.scala b/internal/zinc-core/src/main/scala/sbt/internal/inc/FileValueCache.scala index 8a18086573..aa7b805c86 100644 --- a/internal/zinc-core/src/main/scala/sbt/internal/inc/FileValueCache.scala +++ b/internal/zinc-core/src/main/scala/sbt/internal/inc/FileValueCache.scala @@ -29,7 +29,7 @@ sealed trait FileValueCache[T] { object FileValueCache { def apply[T](f: Path => T): FileValueCache[T] = make(Stamper.forLastModifiedP)(f) def make[T](stamp: Path => XStamp)(f: Path => T): FileValueCache[T] = - new FileValueCache0[T](stamp, f) + new FileValueCache0[T](stamp, f)(Equiv.universal) } private[this] final class FileValueCache0[T](getStamp: Path => XStamp, make: Path => T)( diff --git a/internal/zinc-core/src/main/scala/sbt/internal/inc/Incremental.scala b/internal/zinc-core/src/main/scala/sbt/internal/inc/Incremental.scala index 72ec426a91..7a3fa13c18 100644 --- a/internal/zinc-core/src/main/scala/sbt/internal/inc/Incremental.scala +++ b/internal/zinc-core/src/main/scala/sbt/internal/inc/Incremental.scala @@ -201,7 +201,7 @@ object Incremental { earlyOutput, progress, log - ) + )(Equiv.universal) } catch { case _: xsbti.CompileCancelled => log.info("Compilation has been cancelled") @@ -371,7 +371,7 @@ object Incremental { ) } } - val pickleJava = isPickleJava(scalacOptions) + val pickleJava = isPickleJava(scalacOptions.toIndexedSeq) val hasModified = initialInvClasses.nonEmpty || initialInvSources0.nonEmpty if (javaSources.nonEmpty && earlyOutput.isDefined && !pickleJava) { log.warn( diff --git a/internal/zinc-core/src/main/scala/sbt/internal/inc/Locate.scala b/internal/zinc-core/src/main/scala/sbt/internal/inc/Locate.scala index be849cdf58..b3b09c3bf8 100644 --- a/internal/zinc-core/src/main/scala/sbt/internal/inc/Locate.scala +++ b/internal/zinc-core/src/main/scala/sbt/internal/inc/Locate.scala @@ -49,7 +49,7 @@ object Locate { } } def find[S](name: String, gets: Stream[String => Either[Boolean, S]]): Either[Boolean, S] = - find[S](name, gets.toIterator) + find[S](name, gets.iterator) /** * Returns a function that searches the provided class path for @@ -148,6 +148,6 @@ object Locate { def components(className: String): (Seq[String], String) = { assume(!className.isEmpty) val parts = className.split("\\.") - if (parts.length == 1) (Nil, parts(0)) else (parts.init, parts.last) + if (parts.length == 1) (Nil, parts(0)) else (parts.init.toIndexedSeq, parts.last) } } diff --git a/internal/zinc-core/src/main/scala/sbt/internal/inc/SourceInfo.scala b/internal/zinc-core/src/main/scala/sbt/internal/inc/SourceInfo.scala index bf084b09bc..b274f4b089 100644 --- a/internal/zinc-core/src/main/scala/sbt/internal/inc/SourceInfo.scala +++ b/internal/zinc-core/src/main/scala/sbt/internal/inc/SourceInfo.scala @@ -38,14 +38,17 @@ object SourceInfos { ): SourceInfo = new UnderlyingSourceInfo(reported, unreported, mainClasses) - def merge(infos: Traversable[SourceInfos]): SourceInfos = + def merge(infos: Iterable[SourceInfos]): SourceInfos = infos.foldLeft(SourceInfos.empty)(_ ++ _) def merge1(info1: SourceInfo, info2: SourceInfo) = { makeInfo( - mergeProblems(info1.getReportedProblems, info2.getReportedProblems), - mergeProblems(info1.getUnreportedProblems, info2.getUnreportedProblems), - (info1.getMainClasses ++ info2.getMainClasses).distinct, + mergeProblems(info1.getReportedProblems.toIndexedSeq, info2.getReportedProblems.toIndexedSeq), + mergeProblems( + info1.getUnreportedProblems.toIndexedSeq, + info2.getUnreportedProblems.toIndexedSeq, + ), + (info1.getMainClasses ++ info2.getMainClasses).distinct.toIndexedSeq, ) } @@ -98,8 +101,8 @@ private final class MSourceInfos(val allInfos: Map[VirtualFileRef, SourceInfo]) allInfos.getOrElse(file, SourceInfos.emptyInfo) override def getAllSourceInfos: java.util.Map[VirtualFileRef, SourceInfo] = { - import scala.collection.JavaConverters.mapAsJavaMapConverter - mapAsJavaMapConverter(allInfos).asJava + import scala.collection.JavaConverters._ + allInfos.asJava } } diff --git a/internal/zinc-core/src/main/scala/sbt/internal/inc/Stamp.scala b/internal/zinc-core/src/main/scala/sbt/internal/inc/Stamp.scala index 58d14906b9..4b3b2205da 100644 --- a/internal/zinc-core/src/main/scala/sbt/internal/inc/Stamp.scala +++ b/internal/zinc-core/src/main/scala/sbt/internal/inc/Stamp.scala @@ -23,6 +23,7 @@ import xsbti.{ FileConverter, VirtualFile, VirtualFileRef } import xsbti.compile.analysis.{ ReadStamps, Stamp => XStamp } import scala.collection.immutable.TreeMap +import scala.collection.JavaConverters._ import scala.util.matching.Regex /** @@ -240,8 +241,7 @@ object Stamper { cache: collection.concurrent.Map[VirtualFileRef, (Long, XStamp)], converter: FileConverter, getStamp: VirtualFileRef => XStamp - ): VirtualFileRef => XStamp = { key: VirtualFileRef => - import scala.collection.JavaConverters._ + ): VirtualFileRef => XStamp = { (key: VirtualFileRef) => val p = converter.toPath(key) val ts = try IO.getModifiedTimeOrZero(p.toFile) @@ -311,7 +311,7 @@ object Stamps { ): Stamps = new MStamps(products, sources, libraries) - def merge(stamps: Traversable[Stamps]): Stamps = stamps.foldLeft(Stamps.empty)(_ ++ _) + def merge(stamps: Iterable[Stamps]): Stamps = stamps.foldLeft(Stamps.empty)(_ ++ _) } private class MStamps( @@ -320,13 +320,12 @@ private class MStamps( val libraries: Map[VirtualFileRef, XStamp] ) extends Stamps { - import scala.collection.JavaConverters.mapAsJavaMapConverter override def getAllLibraryStamps: util.Map[VirtualFileRef, XStamp] = - mapAsJavaMapConverter(libraries).asJava + libraries.asJava override def getAllProductStamps: util.Map[VirtualFileRef, XStamp] = - mapAsJavaMapConverter(products).asJava + products.asJava override def getAllSourceStamps: util.Map[VirtualFileRef, XStamp] = - mapAsJavaMapConverter(sources).asJava + sources.asJava def allSources: collection.Set[VirtualFileRef] = sources.keySet def allLibraries: collection.Set[VirtualFileRef] = libraries.keySet @@ -407,7 +406,6 @@ private class InitialStamps( ) extends ReadStamps { import collection.concurrent.Map import java.util.concurrent.ConcurrentHashMap - import scala.collection.JavaConverters._ // cached stamps for files that do not change during compilation private val libraries: Map[VirtualFileRef, XStamp] = new ConcurrentHashMap().asScala @@ -431,7 +429,6 @@ private class TimeWrapBinaryStamps( ) extends ReadStamps { import collection.concurrent.Map import java.util.concurrent.ConcurrentHashMap - import scala.collection.JavaConverters._ // cached stamps for files that do not change during compilation private val libraries: Map[VirtualFileRef, (Long, XStamp)] = new ConcurrentHashMap().asScala @@ -460,8 +457,7 @@ private class UncachedStamps( libStamp: VirtualFileRef => XStamp ) extends ReadStamps { import VirtualFileUtil._ - import scala.collection.JavaConverters.mapAsJavaMapConverter - val eSt = mapAsJavaMapConverter(TreeMap.empty[VirtualFileRef, XStamp]).asJava + val eSt = TreeMap.empty[VirtualFileRef, XStamp].asJava override def getAllLibraryStamps: util.Map[VirtualFileRef, XStamp] = eSt override def getAllSourceStamps: util.Map[VirtualFileRef, XStamp] = eSt diff --git a/internal/zinc-core/src/main/scala/sbt/internal/inc/UsedName.scala b/internal/zinc-core/src/main/scala/sbt/internal/inc/UsedName.scala index 684e1b7140..01e9cf0b85 100644 --- a/internal/zinc-core/src/main/scala/sbt/internal/inc/UsedName.scala +++ b/internal/zinc-core/src/main/scala/sbt/internal/inc/UsedName.scala @@ -35,7 +35,7 @@ object UsedName { private def escapeControlChars(name: String) = { if (name.indexOf('\n') > 0) // optimize for common case to regex overhead - name.replaceAllLiterally("\n", "\u26680A") + name.replace("\n", "\u26680A") else name } diff --git a/internal/zinc-persist/src/main/scala/sbt/internal/inc/consistent/ConsistentAnalysisFormat.scala b/internal/zinc-persist/src/main/scala/sbt/internal/inc/consistent/ConsistentAnalysisFormat.scala index 683b5ae9cb..2a2cc46fcc 100644 --- a/internal/zinc-persist/src/main/scala/sbt/internal/inc/consistent/ConsistentAnalysisFormat.scala +++ b/internal/zinc-persist/src/main/scala/sbt/internal/inc/consistent/ConsistentAnalysisFormat.scala @@ -273,8 +273,8 @@ class ConsistentAnalysisFormat(val mappers: ReadWriteMappers, sort: Boolean) { ) { val file = readMapper.mapSourceFile(VirtualFileRef.of(in.string())) val mainClasses = in.readStringSeq() - val reportedProblems = in.readArray()(readProblem()) - val unreportedProblems = in.readArray()(readProblem()) + val reportedProblems = in.readArray()(readProblem()).toIndexedSeq + val unreportedProblems = in.readArray()(readProblem()).toIndexedSeq val info = SourceInfos.makeInfo(reportedProblems, unreportedProblems, mainClasses) (file, info) }) diff --git a/internal/zinc-persist/src/main/scala/sbt/internal/inc/text/TextAnalysisFormat.scala b/internal/zinc-persist/src/main/scala/sbt/internal/inc/text/TextAnalysisFormat.scala index 4f055b5f24..22a1a9e1d2 100644 --- a/internal/zinc-persist/src/main/scala/sbt/internal/inc/text/TextAnalysisFormat.scala +++ b/internal/zinc-persist/src/main/scala/sbt/internal/inc/text/TextAnalysisFormat.scala @@ -484,9 +484,21 @@ class TextAnalysisFormat(val mappers: ReadWriteMappers) .map(fh => fh.withFile(writeMapper.mapClasspathEntry(fh.file))) writeSeq(out)(Headers.outputMode, mode :: Nil, identity[String]) writeMap(out)(Headers.outputDir, outputAsMap, sourceDirMapper.write, outputDirMapper.write) - writeSeq(out)(Headers.classpathHash, mappedClasspathHash, fileHashToString) - writeSeq(out)(Headers.compileOptions, setup.options.scalacOptions, soptionsMapper.write) - writeSeq(out)(Headers.javacOptions, setup.options.javacOptions, joptionsMapper.write) + writeSeq(out)( + Headers.classpathHash, + mappedClasspathHash.toIndexedSeq, + fileHashToString + ) + writeSeq(out)( + Headers.compileOptions, + setup.options.scalacOptions.toIndexedSeq, + soptionsMapper.write + ) + writeSeq(out)( + Headers.javacOptions, + setup.options.javacOptions.toIndexedSeq, + joptionsMapper.write + ) writeSeq(out)(Headers.compilerVersion, setup.compilerVersion :: Nil, identity[String]) writeSeq(out)(Headers.compileOrder, setup.order.name :: Nil, identity[String]) writeSeq(out)(Headers.skipApiStoring, setup.storeApis() :: Nil, (b: Boolean) => b.toString) diff --git a/internal/zinc-persist/src/test/scala/sbt/inc/AnalysisGenerators.scala b/internal/zinc-persist/src/test/scala/sbt/inc/AnalysisGenerators.scala index f73696eb67..9ce08dfedc 100644 --- a/internal/zinc-persist/src/test/scala/sbt/inc/AnalysisGenerators.scala +++ b/internal/zinc-persist/src/test/scala/sbt/inc/AnalysisGenerators.scala @@ -104,7 +104,7 @@ object AnalysisGenerators { private[this] def lzy[T <: AnyRef](x: T) = SafeLazyProxy.strict(x) def genNameHash(name: String): Gen[NameHash] = - for (scope <- oneOf(UseScope.values())) + for (scope <- oneOf(UseScope.values().toIndexedSeq)) yield NameHash.of(name, scope, (name, scope).hashCode()) def genClass(name: String): Gen[AnalyzedClass] = diff --git a/internal/zinc-scripted/src/test/scala/sbt/internal/inc/IncHandler.scala b/internal/zinc-scripted/src/test/scala/sbt/internal/inc/IncHandler.scala index 4d9cba150f..d282f43387 100644 --- a/internal/zinc-scripted/src/test/scala/sbt/internal/inc/IncHandler.scala +++ b/internal/zinc-scripted/src/test/scala/sbt/internal/inc/IncHandler.scala @@ -515,7 +515,7 @@ case class ProjectStructure( case Seq(mainClassName) => val jars = i.si.allJars.map(_.toPath) val cp = (jars ++ (unmanagedJars :+ output) ++ internalClasspath).map(_.toAbsolutePath) - val loader = ClasspathUtil.makeLoader(cp, i.si, baseDirectory) + val loader = ClasspathUtil.makeLoader(cp.toIndexedSeq, i.si, baseDirectory) val buffer = new ByteArrayOutputStream(8192) val oldOut = System.out try { diff --git a/zinc/src/main/scala/sbt/internal/inc/IncrementalCompilerImpl.scala b/zinc/src/main/scala/sbt/internal/inc/IncrementalCompilerImpl.scala index b954db27c6..bef4b8983c 100644 --- a/zinc/src/main/scala/sbt/internal/inc/IncrementalCompilerImpl.scala +++ b/zinc/src/main/scala/sbt/internal/inc/IncrementalCompilerImpl.scala @@ -58,15 +58,15 @@ class IncrementalCompilerImpl extends IncrementalCompiler { compileIncrementally( scalac, javacChosen, - sources, - classpath, + sources.toIndexedSeq, + classpath.toIndexedSeq, CompileOutput(classesDirectory), earlyOutput.toOption, earlyAnalysisStore.toOption, cache, progress().toOption, - scalacOptions, - javacOptions, + scalacOptions.toIndexedSeq, + javacOptions.toIndexedSeq, in.previousResult.analysis.toOption, in.previousResult.setup.toOption, perClasspathEntryLookup, @@ -113,15 +113,15 @@ class IncrementalCompilerImpl extends IncrementalCompiler { compileIncrementally( scalac, javacChosen, - sources, - classpath, + sources.toIndexedSeq, + classpath.toIndexedSeq, CompileOutput(classesDirectory), earlyOutput.toOption, earlyAnalysisStore.toOption, cache, progress().toOption, - scalacOptions, - javacOptions, + scalacOptions.toIndexedSeq, + javacOptions.toIndexedSeq, in.previousResult.analysis.toOption, in.previousResult.setup.toOption, perClasspathEntryLookup, @@ -295,7 +295,7 @@ class IncrementalCompilerImpl extends IncrementalCompiler { compileIncrementally( scalaCompiler, javaCompiler, - vs, + vs.toIndexedSeq, cp, output, earlyOutput.toOption, diff --git a/zinc/src/main/scala/sbt/internal/inc/MixedAnalyzingCompiler.scala b/zinc/src/main/scala/sbt/internal/inc/MixedAnalyzingCompiler.scala index 457cbb389f..b08b699d1d 100644 --- a/zinc/src/main/scala/sbt/internal/inc/MixedAnalyzingCompiler.scala +++ b/zinc/src/main/scala/sbt/internal/inc/MixedAnalyzingCompiler.scala @@ -78,7 +78,7 @@ final class MixedAnalyzingCompiler( javaSrcs, Seq(toVirtualFile(outputJar)), config.converter, - joptions, + joptions.toIndexedSeq, CompileOutput(outputDir), outputJarOpt, callback, @@ -94,7 +94,7 @@ final class MixedAnalyzingCompiler( javaSrcs, extraClasspath map toVirtualFile, config.converter, - joptions, + joptions.toIndexedSeq, output, outputJarOpt, callback, @@ -143,7 +143,8 @@ final class MixedAnalyzingCompiler( val incSrc = config.sources.filter(include) val (javaSrcs, scalaSrcs) = incSrc.partition(MixedAnalyzingCompiler.javaOnly) logInputs(log, javaSrcs.size, scalaSrcs.size, outputDirs) - val pickleJava = Incremental.isPickleJava(config.currentSetup.options.scalacOptions) + val pickleJava = + Incremental.isPickleJava(config.currentSetup.options.scalacOptions.toIndexedSeq) // Compile Scala sources. def compileScala(): Unit = @@ -240,7 +241,8 @@ final class MixedAnalyzingCompiler( private[this] def outputDirectories(output: Output): Seq[Path] = { output match { case single: SingleOutput => List(single.getOutputDirectoryAsPath) - case mult: MultipleOutput => mult.getOutputGroups map (_.getOutputDirectoryAsPath) + case mult: MultipleOutput => + mult.getOutputGroups.toIndexedSeq map (_.getOutputDirectoryAsPath) } } @@ -415,7 +417,7 @@ object MixedAnalyzingCompiler { val cArgs = new CompilerArguments(compiler.scalaInstance, compiler.classpathOptions) val searchClasspath: Seq[VirtualFile] = explicitBootClasspath( - scalacOptions, + scalacOptions.toIndexedSeq, converter ) ++ withBootclasspath( diff --git a/zinc/src/main/scala/sbt/internal/inc/javac/AnalyzingJavaCompiler.scala b/zinc/src/main/scala/sbt/internal/inc/javac/AnalyzingJavaCompiler.scala index 6d0f3630f8..2ae4c34cd5 100644 --- a/zinc/src/main/scala/sbt/internal/inc/javac/AnalyzingJavaCompiler.scala +++ b/zinc/src/main/scala/sbt/internal/inc/javac/AnalyzingJavaCompiler.scala @@ -142,7 +142,7 @@ final class AnalyzingJavaCompiler private[sbt] ( } // Memoize the known class files in the Javac output location - val memo = for { (Some(outputPath), srcs) <- chunks } yield { + val memo = for { case (Some(outputPath), srcs) <- chunks } yield { val classFinder = if (outputPath.toString.endsWith(".jar")) new JarClassFinder(outputPath) else new DirectoryClassFinder(outputPath) diff --git a/zinc/src/test/scala/sbt/inc/cached/CachedHashingSpec.scala b/zinc/src/test/scala/sbt/inc/cached/CachedHashingSpec.scala index d6704c547c..58107ab9ec 100644 --- a/zinc/src/test/scala/sbt/inc/cached/CachedHashingSpec.scala +++ b/zinc/src/test/scala/sbt/inc/cached/CachedHashingSpec.scala @@ -62,13 +62,13 @@ class CachedHashingSpec extends BaseCompilerSpec { def genConfig = MixedAnalyzingCompiler.makeConfig( scalac, javac, - options.sources, + options.sources.toIndexedSeq, options.converter.toOption.get, giganticClasspath, setup.cache, setup.progress.toOption, - options.scalacOptions, - options.javacOptions, + options.scalacOptions.toIndexedSeq, + options.javacOptions.toIndexedSeq, Analysis.empty, previousResult.setup.toOption, setup.perClasspathEntryLookup,