Skip to content

Commit

Permalink
Merge pull request #280 from dwijnand/fix-the-CrossVersion-compat
Browse files Browse the repository at this point in the history
Fix CrossVersion.Disabled compat
  • Loading branch information
eed3si9n authored Nov 25, 2018
2 parents 4a0a6c7 + ead0f82 commit a01c43e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ lazy val lmCore = (project in file("core"))
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.extension"),
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"),

// contraband issue
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.ConfigurationReportLite.copy*"),
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.UpdateReportLite.copy*"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ final case class ScalaVersion(full: String, binary: String)
private[librarymanagement] abstract class CrossVersionFunctions {

/** Compatibility with 0.13 */
final val Disabled = sbt.librarymanagement.Disabled
final val Disabled = sbt.librarymanagement.Disabled()
final val Binary = sbt.librarymanagement.Binary
final val Constant = sbt.librarymanagement.Constant
final val Full = sbt.librarymanagement.Full
Expand Down Expand Up @@ -37,7 +37,7 @@ private[librarymanagement] abstract class CrossVersionFunctions {
def binary: CrossVersion = Binary()

/** Disables cross versioning for a module. */
def disabled: CrossVersion = Disabled()
def disabled: CrossVersion = Disabled

/** Cross-versions a module with a constant string (typically the binary Scala version). */
def constant(value: String): CrossVersion = Constant(value)
Expand Down

0 comments on commit a01c43e

Please sign in to comment.