Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CrossVersion.Disabled is not a subtype of CrossVersion #196

Closed
dwijnand opened this issue Jan 8, 2018 · 2 comments
Closed

CrossVersion.Disabled is not a subtype of CrossVersion #196

dwijnand opened this issue Jan 8, 2018 · 2 comments

Comments

@dwijnand
Copy link
Member

dwijnand commented Jan 8, 2018

In sbt 0.13 CrossVersion.Disabled was a case object that extends CrossVersion. In sbt 1 it's a contraband type - this means it's not a case object but just a class, so CrossVersion.Disabled is an alias to its companion object..

@dwijnand
Copy link
Member Author

dwijnand commented Jan 8, 2018

Workaround: Replace CrossVersion.Disabled with CrossVersion.Disabled()..

@dwijnand
Copy link
Member Author

dwijnand commented Jan 8, 2018

Upstream issue is sbt/contraband#114

Here's the test I wrote for this:

package sbt.librarymanagement

import org.scalatest._

class CrossVersionSpec extends FlatSpec with Matchers {
  "CrossVersion.Disabled" should "be a subtype of CrossVersion" in {
    CrossVersion.Disabled shouldBe a[CrossVersion]
  }
  "CrossVersion.Disabled()" should "be a subtype of CrossVersion" in {
    CrossVersion.Disabled() shouldBe a[CrossVersion]
  }
}

@dwijnand dwijnand closed this as completed Sep 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant