Skip to content

Commit

Permalink
Update Zinc compiler interface JAR name
Browse files Browse the repository at this point in the history
File name started with compiler-interface-compiler-interface-...
Fixed associated ScalaCompileParallelIntegrationTest

Issue: #707, #733, #734
  • Loading branch information
eriwen committed Oct 21, 2016
1 parent 32dd734 commit ddcc3d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package org.gradle.language.scala

import com.typesafe.zinc.Setup
import org.gradle.api.internal.tasks.scala.ZincScalaCompilerFactory
import org.gradle.execution.taskgraph.DefaultTaskExecutionPlan
import org.gradle.integtests.fixtures.AbstractIntegrationSpec
Expand Down Expand Up @@ -269,7 +270,7 @@ class ScalaCompileParallelIntegrationTest extends AbstractIntegrationSpec {
}

Set<File> getZincCacheInterfaceJars() {
return findInterfaceJars(zincCacheHomeDir.file("caches/${GradleVersion.current().version}/zinc"))
return findInterfaceJars(zincCacheHomeDir.file("caches/${GradleVersion.current().version}/zinc-${Setup.zincVersion().published()}"))
}

Set<File> getConfiguredZincDirInterfaceJars() {
Expand All @@ -279,7 +280,7 @@ class ScalaCompileParallelIntegrationTest extends AbstractIntegrationSpec {
Set<File> findInterfaceJars(TestFile zincDir) {
return zincDir.allDescendants()
.collect { file(it) }
.findAll { it.name == "compiler-interface.jar" }
.findAll { it.name.startsWith("compiler-interface-") && it.name.endsWith(".jar") }
}

TestFile projectDir(String projectName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ public Compiler apply() {

// parallel safe version of Compiler.compilerInterface()
private static File getCompilerInterface(final Setup setup, final ScalaInstance instance, PersistentCache zincCache, final xsbti.Logger logger) {
String sbtInterfaceFileName =
String.format("compiler-interface-%s.jar", Compiler.interfaceId(instance.actualVersion()));
final String sbtInterfaceFileName = Compiler.interfaceId(instance.actualVersion()) + ".jar";
final File compilerInterface = new File(setup.cacheDir(), sbtInterfaceFileName);
if (compilerInterface.exists()) {
return compilerInterface;
Expand Down

0 comments on commit ddcc3d3

Please sign in to comment.