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

Add CrossVersion val/type compat aliases & .disabled #121

Merged
merged 1 commit into from
Jul 1, 2017
Merged

Add CrossVersion val/type compat aliases & .disabled #121

merged 1 commit into from
Jul 1, 2017

Conversation

dwijnand
Copy link
Member

To ease migrating code from sbt 0.13 to sbt 1 this introduces val and
type aliases to CrossVersion's companion object (via
CrossVersionFunctions).

In addition, for consistency, it introduces CrossVersion.disabled.

To ease migrating code from sbt 0.13 to sbt 1 this introduces val and
type aliases to CrossVersion's companion object (via
CrossVersionFunctions).

In addition, for consistency, it introduces CrossVersion.disabled.
@eed3si9n eed3si9n merged commit 11f9dc6 into sbt:1.0 Jul 1, 2017
@dwijnand dwijnand deleted the cross-version-aliases branch July 2, 2017 16:50
eed3si9n added a commit to eed3si9n/librarymanagement that referenced this pull request Aug 22, 2019
Fixes sbt/sbt#4975

This makes `CrossVersion.Disabled` a stable identifier by reverting `final def` back to `final val`.

This is to fix Scala.JS build

```
[error] ScalaJSCrossVersion.scala:34:23: stable identifier required, but sbt.`package`.CrossVersion.Disabled found.
[error]     case CrossVersion.Disabled =>
[error]                       ^
[error] one error found
[error] (Compile / compileIncremental) Compilation failed
```

### notes

- sbt#121 added `final val Disabled = sbt.librarymanagement.Disabled` but it was just a companion object
- sbt#280 actually made it `final val Disabled = sbt.librarymanagement.Disabled()`, but this broke Cat's build that was calling `CrossVersion.Disabled()`
- sbt#290 changed to `final def Disabled = sbt.librarymanagement.Disabled` and `object Disabled extends sbt.librarymanagement.Disabled`
- This changes back to `final val Disabled = sbt.librarymanagement.Disabled` (but because we changed the companion object in sbt#290 that's ok)
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

Successfully merging this pull request may close these issues.

2 participants