Merge pull request #342 from eed3si9n/wip/bumputil

Upgrade to Util 1.4.0
This commit is contained in:
eugene yokota 2020-10-04 12:52:23 -04:00 committed by GitHub
commit 13b4bf4fdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 33 deletions

View File

@ -16,7 +16,7 @@ ThisBuild / version := {
else old
}
}
ThisBuild / versionScheme := Some("early-semver")
ThisBuild / organization := "org.scala-sbt"
ThisBuild / bintrayPackage := "librarymanagement"
ThisBuild / homepage := Some(url("https://github.com/sbt/librarymanagement"))
@ -338,6 +338,7 @@ lazy val lmIvy = (project in file("ivy"))
exclude[DirectMissingMethodProblem](
"sbt.internal.librarymanagement.CustomPomParser.versionRangeFlag"
),
exclude[MissingClassProblem]("sbt.internal.librarymanagement.FixedParser*"),
),
)

View File

@ -20,10 +20,6 @@ import sbt.librarymanagement._
import sbt.librarymanagement.ivy.{ InlineIvyConfiguration, IvyPaths }
import sbt.util.Logger
import sjsonnew.shaded.scalajson.ast.unsafe._
import scala.collection.mutable
import jawn.{ SupportParser, MutableFacade }
class NotInCache(val id: ModuleID, cause: Throwable)
extends RuntimeException(NotInCache(id, cause), cause) {
def this(id: ModuleID) = this(id, null)
@ -134,26 +130,3 @@ private class FileDownloader extends ResourceDownloader {
sys.error("Could not move temporary file " + part + " to final location " + dest)
}
}
object FixedParser extends SupportParser[JValue] {
implicit val facade: MutableFacade[JValue] =
new MutableFacade[JValue] {
def jnull() = JNull
def jfalse() = JFalse
def jtrue() = JTrue
def jnum(s: String) = JNumber(s)
def jint(s: String) = JNumber(s)
def jstring(s: String) = JString(s)
def jarray(vs: mutable.ArrayBuffer[JValue]) = JArray(vs.toArray)
def jobject(vs: mutable.Map[String, JValue]) = {
val array = new Array[JField](vs.size)
var i = 0
vs.foreach {
case (key, value) =>
array(i) = JField(key, value)
i += 1
}
JObject(array)
}
}
}

View File

@ -98,5 +98,5 @@ object DMSerializationSpec extends BasicTestSuite {
}
implicit val isoString: IsoString[JValue] =
IsoString.iso(CompactPrinter.apply, FixedParser.parseUnsafe)
IsoString.iso(CompactPrinter.apply, Parser.parseUnsafe)
}

View File

@ -7,8 +7,8 @@ object Dependencies {
def nightlyVersion: Option[String] = sys.props.get("sbt.build.version")
private val ioVersion = nightlyVersion.getOrElse("1.4.0-M2")
private val utilVersion = nightlyVersion.getOrElse("1.3.3")
private val ioVersion = nightlyVersion.getOrElse("1.4.0")
private val utilVersion = nightlyVersion.getOrElse("1.4.0")
private val sbtIO = "org.scala-sbt" %% "io" % ioVersion

View File

@ -1 +1 @@
sbt.version=1.3.9
sbt.version=1.4.0-RC2

View File

@ -3,7 +3,7 @@ addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.6")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.6.1")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.0.2")
addSbtPlugin("org.scala-sbt" % "sbt-contraband" % "0.4.6")
addSbtPlugin("org.scala-sbt" % "sbt-contraband" % "0.5.0")
addSbtPlugin("com.lightbend" % "sbt-whitesource" % "0.1.14")
scalacOptions += "-language:postfixOps"