mirror of https://github.com/sbt/sbt.git
make object Disabled extend Disabled
Ref https://github.com/sbt/librarymanagement/pull/280 This is to workaround bincompat error detected by sbt community build. ``` [cats] [error] java.lang.NoSuchMethodError: sbt.librarymanagement.CrossVersion$.Disabled()Lsbt/librarymanagement/Disabled$; ```
This commit is contained in:
parent
96a3293c7d
commit
75c319e6bb
|
|
@ -157,13 +157,6 @@ lazy val lmCore = (project in file("core"))
|
||||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.extension"),
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.extension"),
|
||||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactTypeFilterExtra.types"),
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactTypeFilterExtra.types"),
|
||||||
|
|
||||||
// by mistake we aliased the companion object instead of an instance of Disabled
|
|
||||||
// but it was aliased as a constant expression, so even if the binary API has changed
|
|
||||||
// there are no call sites in bytecode because the value got inlined
|
|
||||||
// also it's wouldn't work so I doubt anyone has made use of it
|
|
||||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.CrossVersionFunctions.Disabled"),
|
|
||||||
exclude[IncompatibleResultTypeProblem]("sbt.librarymanagement.CrossVersionFunctions.Disabled"),
|
|
||||||
|
|
||||||
// contraband issue
|
// contraband issue
|
||||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.ConfigurationReportLite.copy*"),
|
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.ConfigurationReportLite.copy*"),
|
||||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.UpdateReportLite.copy*"),
|
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.UpdateReportLite.copy*"),
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
// DO NOT EDIT MANUALLY
|
// DO NOT EDIT MANUALLY
|
||||||
package sbt.librarymanagement
|
package sbt.librarymanagement
|
||||||
/** Disables cross versioning for a module. */
|
/** Disables cross versioning for a module. */
|
||||||
final class Disabled private () extends sbt.librarymanagement.CrossVersion() with Serializable {
|
sealed class Disabled private () extends sbt.librarymanagement.CrossVersion() with Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -24,7 +24,7 @@ private[this] def copy(): Disabled = {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
object Disabled {
|
object Disabled extends sbt.librarymanagement.Disabled {
|
||||||
|
|
||||||
def apply(): Disabled = new Disabled()
|
def apply(): Disabled = new Disabled()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -261,7 +261,9 @@
|
||||||
"namespace": "sbt.librarymanagement",
|
"namespace": "sbt.librarymanagement",
|
||||||
"target": "Scala",
|
"target": "Scala",
|
||||||
"doc": "Disables cross versioning for a module.",
|
"doc": "Disables cross versioning for a module.",
|
||||||
"type": "record"
|
"type": "record",
|
||||||
|
"modifier": "sealed",
|
||||||
|
"parentsCompanion": "sbt.librarymanagement.Disabled"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Binary",
|
"name": "Binary",
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ final case class ScalaVersion(full: String, binary: String)
|
||||||
private[librarymanagement] abstract class CrossVersionFunctions {
|
private[librarymanagement] abstract class CrossVersionFunctions {
|
||||||
|
|
||||||
/** Compatibility with 0.13 */
|
/** Compatibility with 0.13 */
|
||||||
final val Disabled = sbt.librarymanagement.Disabled()
|
final def Disabled = sbt.librarymanagement.Disabled
|
||||||
final val Binary = sbt.librarymanagement.Binary
|
final val Binary = sbt.librarymanagement.Binary
|
||||||
final val Constant = sbt.librarymanagement.Constant
|
final val Constant = sbt.librarymanagement.Constant
|
||||||
final val Full = sbt.librarymanagement.Full
|
final val Full = sbt.librarymanagement.Full
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
addSbtPlugin("org.scala-sbt" % "sbt-houserules" % "0.3.8")
|
addSbtPlugin("org.scala-sbt" % "sbt-houserules" % "0.3.8")
|
||||||
addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.15")
|
addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.15")
|
||||||
addSbtPlugin("org.scala-sbt" % "sbt-contraband" % "0.4.1")
|
addSbtPlugin("org.scala-sbt" % "sbt-contraband" % "0.4.2")
|
||||||
addSbtPlugin("com.lightbend" % "sbt-whitesource" % "0.1.9")
|
addSbtPlugin("com.lightbend" % "sbt-whitesource" % "0.1.9")
|
||||||
|
|
||||||
scalacOptions += "-language:postfixOps"
|
scalacOptions += "-language:postfixOps"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue