mirror of https://github.com/sbt/sbt.git
bump Zinc, which uses current util
This commit is contained in:
parent
fbc98ed72e
commit
ceb1ea8aad
11
build.sbt
11
build.sbt
|
|
@ -10,7 +10,7 @@ import scala.util.Try
|
||||||
// ThisBuild settings take lower precedence,
|
// ThisBuild settings take lower precedence,
|
||||||
// but can be shared across the multi projects.
|
// but can be shared across the multi projects.
|
||||||
ThisBuild / version := {
|
ThisBuild / version := {
|
||||||
val v = "2.0.0-alpha2-SNAPSHOT"
|
val v = "2.0.0-alpha5-SNAPSHOT"
|
||||||
nightlyVersion.getOrElse(v)
|
nightlyVersion.getOrElse(v)
|
||||||
}
|
}
|
||||||
ThisBuild / version2_13 := "2.0.0-alpha1-SNAPSHOT"
|
ThisBuild / version2_13 := "2.0.0-alpha1-SNAPSHOT"
|
||||||
|
|
@ -922,7 +922,14 @@ lazy val mainProj = (project in file("main"))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
libraryDependencies ++=
|
libraryDependencies ++=
|
||||||
(Seq(scalaXml.value, launcherInterface, caffeine, lmCoursierShaded) ++ log4jModules),
|
(Seq(
|
||||||
|
scalaXml.value,
|
||||||
|
sjsonNewScalaJson.value,
|
||||||
|
sjsonNewCore.value,
|
||||||
|
launcherInterface,
|
||||||
|
caffeine,
|
||||||
|
lmCoursierShaded,
|
||||||
|
) ++ log4jModules),
|
||||||
libraryDependencies ++= (scalaVersion.value match {
|
libraryDependencies ++= (scalaVersion.value match {
|
||||||
case v if v.startsWith("2.12.") => List()
|
case v if v.startsWith("2.12.") => List()
|
||||||
case _ => List(scalaPar)
|
case _ => List(scalaPar)
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,8 @@ import scala.reflect.internal.util.UndefinedPosition
|
||||||
|
|
||||||
abstract class SourcePositionImpl {
|
abstract class SourcePositionImpl {
|
||||||
|
|
||||||
/** Creates a SourcePosition by using the enclosing position of the invocation of this method.
|
/**
|
||||||
|
* Creates a SourcePosition by using the enclosing position of the invocation of this method.
|
||||||
* @return SourcePosition
|
* @return SourcePosition
|
||||||
*/
|
*/
|
||||||
def fromEnclosing(): SourcePosition = macro SourcePositionMacro.fromEnclosingImpl
|
def fromEnclosing(): SourcePosition = macro SourcePositionMacro.fromEnclosingImpl
|
||||||
|
|
@ -30,8 +31,7 @@ final class SourcePositionMacro(val c: blackbox.Context) {
|
||||||
val name = constant[String](ownerSource(f.path, f.name))
|
val name = constant[String](ownerSource(f.path, f.name))
|
||||||
val line = constant[Int](pos.line)
|
val line = constant[Int](pos.line)
|
||||||
reify { LinePosition(name.splice, line.splice) }
|
reify { LinePosition(name.splice, line.splice) }
|
||||||
} else
|
} else reify { NoPosition }
|
||||||
reify { NoPosition }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private[this] def ownerSource(path: String, name: String): String = {
|
private[this] def ownerSource(path: String, name: String): String = {
|
||||||
|
|
|
||||||
|
|
@ -3850,8 +3850,8 @@ object Classpaths {
|
||||||
val outCacheStore = cacheStoreFactory make "output_dsp"
|
val outCacheStore = cacheStoreFactory make "output_dsp"
|
||||||
val f = Tracked.inputChanged(cacheStoreFactory make "input_dsp") {
|
val f = Tracked.inputChanged(cacheStoreFactory make "input_dsp") {
|
||||||
(inChanged: Boolean, in: Seq[ModuleID]) =>
|
(inChanged: Boolean, in: Seq[ModuleID]) =>
|
||||||
implicit val NoPositionFormat: JsonFormat[NoPosition.type] = asSingleton(NoPosition)
|
given NoPositionFormat: JsonFormat[NoPosition.type] = asSingleton(NoPosition)
|
||||||
implicit val LinePositionFormat: IsoLList.Aux[LinePosition, String :*: Int :*: LNil] =
|
given LinePositionFormat: IsoLList.Aux[LinePosition, String :*: Int :*: LNil] =
|
||||||
LList.iso(
|
LList.iso(
|
||||||
{ (l: LinePosition) =>
|
{ (l: LinePosition) =>
|
||||||
("path", l.path) :*: ("startLine", l.startLine) :*: LNil
|
("path", l.path) :*: ("startLine", l.startLine) :*: LNil
|
||||||
|
|
@ -3860,7 +3860,7 @@ object Classpaths {
|
||||||
LinePosition(in.head, in.tail.head)
|
LinePosition(in.head, in.tail.head)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
implicit val LineRangeFormat: IsoLList.Aux[LineRange, Int :*: Int :*: LNil] = LList.iso(
|
given LineRangeFormat: IsoLList.Aux[LineRange, Int :*: Int :*: LNil] = LList.iso(
|
||||||
{ (l: LineRange) =>
|
{ (l: LineRange) =>
|
||||||
("start", l.start) :*: ("end", l.end) :*: LNil
|
("start", l.start) :*: ("end", l.end) :*: LNil
|
||||||
},
|
},
|
||||||
|
|
@ -3868,19 +3868,19 @@ object Classpaths {
|
||||||
LineRange(in.head, in.tail.head)
|
LineRange(in.head, in.tail.head)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
implicit val RangePositionFormat
|
given RangePositionFormat: IsoLList.Aux[RangePosition, String :*: LineRange :*: LNil] =
|
||||||
: IsoLList.Aux[RangePosition, String :*: LineRange :*: LNil] = LList.iso(
|
LList.iso(
|
||||||
{ (r: RangePosition) =>
|
{ (r: RangePosition) =>
|
||||||
("path", r.path) :*: ("range", r.range) :*: LNil
|
("path", r.path) :*: ("range", r.range) :*: LNil
|
||||||
},
|
},
|
||||||
{ (in: String :*: LineRange :*: LNil) =>
|
{ (in: String :*: LineRange :*: LNil) =>
|
||||||
RangePosition(in.head, in.tail.head)
|
RangePosition(in.head, in.tail.head)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
implicit val SourcePositionFormat: JsonFormat[SourcePosition] =
|
given SourcePositionFormat: JsonFormat[SourcePosition] =
|
||||||
unionFormat3[SourcePosition, NoPosition.type, LinePosition, RangePosition]
|
unionFormat3[SourcePosition, NoPosition.type, LinePosition, RangePosition]
|
||||||
|
|
||||||
implicit val midJsonKeyFmt: sjsonnew.JsonKeyFormat[ModuleID] = moduleIdJsonKeyFormat
|
given midJsonKeyFmt: sjsonnew.JsonKeyFormat[ModuleID] = moduleIdJsonKeyFormat
|
||||||
val outCache =
|
val outCache =
|
||||||
Tracked.lastOutput[Seq[ModuleID], Map[ModuleID, SourcePosition]](outCacheStore) {
|
Tracked.lastOutput[Seq[ModuleID], Map[ModuleID, SourcePosition]](outCacheStore) {
|
||||||
case (_, Some(out)) if !inChanged => out
|
case (_, Some(out)) if !inChanged => out
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ object Dependencies {
|
||||||
// WARNING: Please Scala update versions in PluginCross.scala too
|
// WARNING: Please Scala update versions in PluginCross.scala too
|
||||||
val scala212 = "2.12.17"
|
val scala212 = "2.12.17"
|
||||||
val scala213 = "2.13.8"
|
val scala213 = "2.13.8"
|
||||||
val scala3 = "3.1.3"
|
val scala3 = "3.2.0"
|
||||||
val checkPluginCross = settingKey[Unit]("Make sure scalaVersion match up")
|
val checkPluginCross = settingKey[Unit]("Make sure scalaVersion match up")
|
||||||
val baseScalaVersion = scala3
|
val baseScalaVersion = scala3
|
||||||
def nightlyVersion: Option[String] =
|
def nightlyVersion: Option[String] =
|
||||||
|
|
@ -15,8 +15,8 @@ object Dependencies {
|
||||||
// sbt modules
|
// sbt modules
|
||||||
private val ioVersion = nightlyVersion.getOrElse("1.8.0")
|
private val ioVersion = nightlyVersion.getOrElse("1.8.0")
|
||||||
private val lmVersion =
|
private val lmVersion =
|
||||||
sys.props.get("sbt.build.lm.version").orElse(nightlyVersion).getOrElse("2.0.0-alpha1")
|
sys.props.get("sbt.build.lm.version").orElse(nightlyVersion).getOrElse("2.0.0-alpha6")
|
||||||
val zincVersion = nightlyVersion.getOrElse("2.0.0-alpha2")
|
val zincVersion = nightlyVersion.getOrElse("2.0.0-alpha5")
|
||||||
|
|
||||||
private val sbtIO = "org.scala-sbt" %% "io" % ioVersion
|
private val sbtIO = "org.scala-sbt" %% "io" % ioVersion
|
||||||
|
|
||||||
|
|
@ -82,7 +82,7 @@ object Dependencies {
|
||||||
// val lmCoursierShaded = "io.get-coursier" %% "lm-coursier-shaded" % "2.0.10"
|
// val lmCoursierShaded = "io.get-coursier" %% "lm-coursier-shaded" % "2.0.10"
|
||||||
val lmCoursierShaded = "org.scala-sbt" %% "librarymanagement-coursier" % "2.0.0-alpha2"
|
val lmCoursierShaded = "org.scala-sbt" %% "librarymanagement-coursier" % "2.0.0-alpha2"
|
||||||
|
|
||||||
lazy val sjsonNewVersion = "0.11.0"
|
lazy val sjsonNewVersion = "0.12.0"
|
||||||
def sjsonNew(n: String) = Def.setting(
|
def sjsonNew(n: String) = Def.setting(
|
||||||
"com.eed3si9n" %% n % sjsonNewVersion
|
"com.eed3si9n" %% n % sjsonNewVersion
|
||||||
) // contrabandSjsonNewVersion.value
|
) // contrabandSjsonNewVersion.value
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@ trait HListFormats {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
implicit def hconsFormat[H, T <: HList](
|
implicit def hconsFormat[H, T <: HList](implicit
|
||||||
implicit hf: JsonFormat[H],
|
hf: JsonFormat[H],
|
||||||
tf: HListJF[T]
|
tf: HListJF[T]
|
||||||
): JsonFormat[H :+: T] =
|
): JsonFormat[H :+: T] =
|
||||||
new JsonFormat[H :+: T] {
|
new JsonFormat[H :+: T] {
|
||||||
|
|
@ -56,8 +56,8 @@ trait HListFormats {
|
||||||
def write[J](obj: A, builder: Builder[J]): Unit
|
def write[J](obj: A, builder: Builder[J]): Unit
|
||||||
}
|
}
|
||||||
|
|
||||||
implicit def hconsHListJF[H, T <: HList](
|
implicit def hconsHListJF[H, T <: HList](implicit
|
||||||
implicit hf: JsonFormat[H],
|
hf: JsonFormat[H],
|
||||||
tf: HListJF[T]
|
tf: HListJF[T]
|
||||||
): HListJF[H :+: T] =
|
): HListJF[H :+: T] =
|
||||||
new HListJF[H :+: T] {
|
new HListJF[H :+: T] {
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ sealed trait KList[+M[_]] {
|
||||||
/** Applies `f` to the elements of this list in the applicative functor defined by `ap`. */
|
/** Applies `f` to the elements of this list in the applicative functor defined by `ap`. */
|
||||||
def apply[N[x] >: M[x], Z](f: Transform[Id] => Z)(implicit ap: Applicative[N]): N[Z]
|
def apply[N[x] >: M[x], Z](f: Transform[Id] => Z)(implicit ap: Applicative[N]): N[Z]
|
||||||
|
|
||||||
/** Equivalent to `transform(f) . apply(x => x)`, this is the essence of the iterator at the level of natural transformations.*/
|
/** Equivalent to `transform(f) . apply(x => x)`, this is the essence of the iterator at the level of natural transformations. */
|
||||||
def traverse[N[_], P[_]](f: M ~> (N ∙ P)#l)(implicit np: Applicative[N]): N[Transform[P]]
|
def traverse[N[_], P[_]](f: M ~> (N ∙ P)#l)(implicit np: Applicative[N]): N[Transform[P]]
|
||||||
|
|
||||||
/** Discards the heterogeneous type information and constructs a plain List from this KList's elements. */
|
/** Discards the heterogeneous type information and constructs a plain List from this KList's elements. */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue