Skip to content

Commit

Permalink
Coursier: Remove lock to fix occasional CI failures
Browse files Browse the repository at this point in the history
  • Loading branch information
tindzk committed Jul 6, 2019
1 parent 8509df5 commit 7fa092f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/main/scala/seed/artefact/Coursier.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package seed.artefact

import java.io.File
import java.nio.file.{Path, Paths}
import java.util.concurrent.locks.ReentrantLock

import coursier._
import coursier.ivy.IvyRepository
Expand Down Expand Up @@ -47,8 +46,6 @@ object Coursier {
def coursierDependencies(deps: Set[JavaDep]): Seq[coursier.core.Dependency] =
deps.map(r => Dependency(Module(Organization(r.organisation), ModuleName(r.artefact)), r.version)).toList

private val lock = new ReentrantLock()

def resolve(all: Set[JavaDep], resolvers: Resolvers, ivyPath: Path, cachePath: Path, silent: Boolean): Resolution =
if (all.isEmpty) Resolution.empty
else {
Expand Down Expand Up @@ -141,16 +138,13 @@ object Coursier {
cachePath: Path,
optionalArtefacts: Boolean,
silent: Boolean): ResolutionResult = {
lock.lock()
val resolution = resolve(deps, resolvers, ivyPath, cachePath, silent)
val artefacts = resolution.dependencyArtifacts(
Some(overrideClassifiers(
sources = optionalArtefacts,
javaDoc = optionalArtefacts))).map(_._3).toList

val result = ResolutionResult(resolution, localArtefacts(artefacts, cachePath, silent))
lock.unlock()
result
ResolutionResult(resolution, localArtefacts(artefacts, cachePath, silent))
}

def resolveSubset(resolution: Resolution,
Expand Down

0 comments on commit 7fa092f

Please sign in to comment.