Merge pull request #614 from coursier/topic/fix-compatibility-api

Fix compatibility API
This commit is contained in:
Alexandre Archambault 2017-07-19 15:30:26 +02:00 committed by GitHub
commit 5a271fffc5
3 changed files with 19 additions and 2 deletions

View File

@ -281,7 +281,7 @@ final case class MavenSource(
k -> other.extra.get(k).fold(v)(merge(v, _))
} ++
other.extra
.filterKeys(k => !a.extra.contains(k))
.filterKeys(k => !a.extra.contains(k) && k != Artifact.optionalKey)
a.copy(
checksumUrls = other.checksumUrls ++ a.checksumUrls,

@ -1 +1 @@
Subproject commit ac3871c925e035157203d6d799a9a2c7c2578d67
Subproject commit 93eccec4ffd1719586b6f1e1dddefcbea6722e7d

View File

@ -804,6 +804,23 @@ abstract class CentralTests extends TestSuite {
val mainArtifactOpt = artifacts.find(_.url == mainUrl)
assert(mainArtifactOpt.isEmpty)
}
* - {
if (isActualCentral)
withArtifacts(Module("com.lihaoyi", "scalatags_2.12"), "0.6.2", "jar", transitive = true, optional = false) { artifacts =>
assert(artifacts.forall(!_.isOptional))
val urls = artifacts.map(_.url).toSet
val expectedUrls = Set(
"https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.0/scala-library-2.12.0.jar",
"https://repo1.maven.org/maven2/com/lihaoyi/sourcecode_2.12/0.1.3/sourcecode_2.12-0.1.3.jar",
"https://repo1.maven.org/maven2/com/lihaoyi/scalatags_2.12/0.6.2/scalatags_2.12-0.6.2.jar"
)
assert(urls == expectedUrls)
}
}
}
}