bump Zinc, which uses current util

This commit is contained in:
Eugene Yokota 2022-10-18 10:08:23 -04:00
parent fbc98ed72e
commit ceb1ea8aad
6 changed files with 35 additions and 28 deletions

View File

@ -10,7 +10,7 @@ import scala.util.Try
// ThisBuild settings take lower precedence,
// but can be shared across the multi projects.
ThisBuild / version := {
val v = "2.0.0-alpha2-SNAPSHOT"
val v = "2.0.0-alpha5-SNAPSHOT"
nightlyVersion.getOrElse(v)
}
ThisBuild / version2_13 := "2.0.0-alpha1-SNAPSHOT"
@ -922,7 +922,14 @@ lazy val mainProj = (project in file("main"))
}
},
libraryDependencies ++=
(Seq(scalaXml.value, launcherInterface, caffeine, lmCoursierShaded) ++ log4jModules),
(Seq(
scalaXml.value,
sjsonNewScalaJson.value,
sjsonNewCore.value,
launcherInterface,
caffeine,
lmCoursierShaded,
) ++ log4jModules),
libraryDependencies ++= (scalaVersion.value match {
case v if v.startsWith("2.12.") => List()
case _ => List(scalaPar)

View File

@ -14,7 +14,8 @@ import scala.reflect.internal.util.UndefinedPosition
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
*/
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 line = constant[Int](pos.line)
reify { LinePosition(name.splice, line.splice) }
} else
reify { NoPosition }
} else reify { NoPosition }
}
private[this] def ownerSource(path: String, name: String): String = {

View File

@ -3850,8 +3850,8 @@ object Classpaths {
val outCacheStore = cacheStoreFactory make "output_dsp"
val f = Tracked.inputChanged(cacheStoreFactory make "input_dsp") {
(inChanged: Boolean, in: Seq[ModuleID]) =>
implicit val NoPositionFormat: JsonFormat[NoPosition.type] = asSingleton(NoPosition)
implicit val LinePositionFormat: IsoLList.Aux[LinePosition, String :*: Int :*: LNil] =
given NoPositionFormat: JsonFormat[NoPosition.type] = asSingleton(NoPosition)
given LinePositionFormat: IsoLList.Aux[LinePosition, String :*: Int :*: LNil] =
LList.iso(
{ (l: LinePosition) =>
("path", l.path) :*: ("startLine", l.startLine) :*: LNil
@ -3860,7 +3860,7 @@ object Classpaths {
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) =>
("start", l.start) :*: ("end", l.end) :*: LNil
},
@ -3868,19 +3868,19 @@ object Classpaths {
LineRange(in.head, in.tail.head)
}
)
implicit val RangePositionFormat
: IsoLList.Aux[RangePosition, String :*: LineRange :*: LNil] = LList.iso(
{ (r: RangePosition) =>
("path", r.path) :*: ("range", r.range) :*: LNil
},
{ (in: String :*: LineRange :*: LNil) =>
RangePosition(in.head, in.tail.head)
}
)
implicit val SourcePositionFormat: JsonFormat[SourcePosition] =
given RangePositionFormat: IsoLList.Aux[RangePosition, String :*: LineRange :*: LNil] =
LList.iso(
{ (r: RangePosition) =>
("path", r.path) :*: ("range", r.range) :*: LNil
},
{ (in: String :*: LineRange :*: LNil) =>
RangePosition(in.head, in.tail.head)
}
)
given SourcePositionFormat: JsonFormat[SourcePosition] =
unionFormat3[SourcePosition, NoPosition.type, LinePosition, RangePosition]
implicit val midJsonKeyFmt: sjsonnew.JsonKeyFormat[ModuleID] = moduleIdJsonKeyFormat
given midJsonKeyFmt: sjsonnew.JsonKeyFormat[ModuleID] = moduleIdJsonKeyFormat
val outCache =
Tracked.lastOutput[Seq[ModuleID], Map[ModuleID, SourcePosition]](outCacheStore) {
case (_, Some(out)) if !inChanged => out

View File

@ -6,7 +6,7 @@ object Dependencies {
// WARNING: Please Scala update versions in PluginCross.scala too
val scala212 = "2.12.17"
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 baseScalaVersion = scala3
def nightlyVersion: Option[String] =
@ -15,8 +15,8 @@ object Dependencies {
// sbt modules
private val ioVersion = nightlyVersion.getOrElse("1.8.0")
private val lmVersion =
sys.props.get("sbt.build.lm.version").orElse(nightlyVersion).getOrElse("2.0.0-alpha1")
val zincVersion = nightlyVersion.getOrElse("2.0.0-alpha2")
sys.props.get("sbt.build.lm.version").orElse(nightlyVersion).getOrElse("2.0.0-alpha6")
val zincVersion = nightlyVersion.getOrElse("2.0.0-alpha5")
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 = "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(
"com.eed3si9n" %% n % sjsonNewVersion
) // contrabandSjsonNewVersion.value

View File

@ -28,8 +28,8 @@ trait HListFormats {
}
}
implicit def hconsFormat[H, T <: HList](
implicit hf: JsonFormat[H],
implicit def hconsFormat[H, T <: HList](implicit
hf: JsonFormat[H],
tf: HListJF[T]
): JsonFormat[H :+: T] =
new JsonFormat[H :+: T] {
@ -56,8 +56,8 @@ trait HListFormats {
def write[J](obj: A, builder: Builder[J]): Unit
}
implicit def hconsHListJF[H, T <: HList](
implicit hf: JsonFormat[H],
implicit def hconsHListJF[H, T <: HList](implicit
hf: JsonFormat[H],
tf: HListJF[T]
): HListJF[H :+: T] =
new HListJF[H :+: T] {

View File

@ -23,7 +23,7 @@ sealed trait KList[+M[_]] {
/** 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]
/** 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]]
/** Discards the heterogeneous type information and constructs a plain List from this KList's elements. */