mirror of https://github.com/sbt/sbt.git
Add more refined typelevel test
Fixes https://github.com/coursier/coursier/issues/536
This commit is contained in:
parent
e76f6170f1
commit
688e5342f1
|
|
@ -5,6 +5,7 @@ import java.net.URL
|
|||
import java.util.concurrent.{ExecutorService, Executors}
|
||||
|
||||
import coursier.core.{Authentication, Publication}
|
||||
import coursier.extra.Typelevel
|
||||
import coursier.ivy.{IvyRepository, PropertiesPattern}
|
||||
import coursier.Keys._
|
||||
import coursier.Structure._
|
||||
|
|
@ -504,6 +505,8 @@ object Tasks {
|
|||
|
||||
val userEnabledProfiles = mavenProfiles.value
|
||||
|
||||
val typelevel = scalaOrganization.value == Typelevel.typelevelOrg
|
||||
|
||||
val startRes = Resolution(
|
||||
currentProject.dependencies.map(_._2).toSet,
|
||||
filter = Some(dep => !dep.optional),
|
||||
|
|
@ -517,7 +520,8 @@ object Tasks {
|
|||
userForceVersions ++
|
||||
forcedScalaModules(so, sv) ++
|
||||
interProjectDependencies.map(_.moduleVersion),
|
||||
projectCache = parentProjectCache
|
||||
projectCache = parentProjectCache,
|
||||
mapDependencies = if (typelevel) Some(Typelevel.swap(_)) else None
|
||||
)
|
||||
|
||||
if (verbosityLevel >= 2) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
scalaVersion := "2.12.2-bin-typelevel-4"
|
||||
scalaOrganization := "org.typelevel"
|
||||
scalacOptions += "-Yinduction-heuristics"
|
||||
|
||||
libraryDependencies ++= Seq(
|
||||
"com.47deg" %% "freestyle" % "0.1.0",
|
||||
// CrossVersion.patch not available in sbt 0.13.8
|
||||
compilerPlugin("org.scalamacros" % "paradise_2.12.2" % "2.1.0")
|
||||
)
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
val pluginVersion = sys.props.getOrElse(
|
||||
"plugin.version",
|
||||
throw new RuntimeException(
|
||||
"""|The system property 'plugin.version' is not defined.
|
||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
||||
)
|
||||
)
|
||||
|
||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
import freestyle._
|
||||
|
||||
@free trait Foo {
|
||||
def bzz: FS[java.lang.String]
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
> compile
|
||||
Loading…
Reference in New Issue