Skip to content

Let ++ fall back to a bincompat Scala version #7328

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

Merged
merged 1 commit into from
Jul 10, 2023

Conversation

eed3si9n
Copy link
Member

@eed3si9n eed3si9n commented Jul 9, 2023

Fixes #7327

Problem
In builds with mixed Scala patch versions (like scalameta), it's possible for a core subproject to be set to the lastest 2.12.x, but the compiler plugin component is cross published to 2.12.0 etc. ++ 2.12.0 in this case does not work since sbt 1.7.x onwards requires the queried Scala version to be listed in crossScalaVersions.

Solution
This implements sbt 1.6.x-like fallback mechanism, but instead of using the queried version (e.g. 2.12.0) it will set the Scala version to one of listed versions that is binary compatible.

Fixes sbt#7327

**Problem**
In builds with mixed Scala patch versions (like scalameta),
it's possible for a core subproject to be set to the lastest 2.12.x,
but the compiler plugin component is cross published to 2.12.0 etc.
`++ 2.12.0` in this case does not work since sbt 1.7.x onwards requires
the queried Scala version to be listed in `crossScalaVersions`.

**Solution**
This implements sbt 1.6.x-like fallback mechanism,
but instead of using the queried version (e.g. 2.12.0) it will set
the Scala version to one of listed versions that is binary compatible.
Copy link

@kitbellew kitbellew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not an expert on this codebase, of course... looks convincing. cc @tgodzik

@eed3si9n eed3si9n merged commit bcc286d into sbt:1.9.x Jul 10, 2023
@eed3si9n eed3si9n deleted the wip/cross_fix branch July 10, 2023 01:02
cwienberg referenced this pull request in cwienberg/spark-sorting-helpers Jul 10, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [sbt/sbt](https://togithub.com/sbt/sbt) | patch | `1.9.1` -> `1.9.2` |

---

### Release Notes

<details>
<summary>sbt/sbt (sbt/sbt)</summary>

### [`v1.9.2`](https://togithub.com/sbt/sbt/releases/tag/v1.9.2): 1.9.2

[Compare Source](https://togithub.com/sbt/sbt/compare/v1.9.1...v1.9.2)

#### Fix

- Let `++` fall back to a bincompat Scala version by
[@&#8203;eed3si9n](https://togithub.com/eed3si9n) in
[https://github.com/sbt/sbt/pull/7328](https://togithub.com/sbt/sbt/pull/7328)

**Full Changelog**: sbt/sbt@v1.9.1...v1.9.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/cwienberg/spark-sorting-helpers).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi41LjMiLCJ1cGRhdGVkSW5WZXIiOiIzNi41LjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@tgodzik
Copy link

tgodzik commented Jul 10, 2023

Thanks @eed3si9n ! I haven't figured out what was the problem with scalameta, but this looks very plausible. Will test it out!

@tgodzik
Copy link

tgodzik commented Jul 10, 2023

It's already all fixed and tested 😅 Thank you again!

srowen pushed a commit to apache/spark that referenced this pull request Jul 10, 2023
### What changes were proposed in this pull request?
The pr aims to upgrade sbt from 1.9.1 to 1.9.2.

### Why are the changes needed?
1.The new version brings bug fixed:
- Let ++ fall back to a bincompat Scala version by eed3si9n in sbt/sbt#7328

2.v1.9.1 VS v1.9.2
sbt/sbt@v1.9.1...v1.9.2

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Pass GA.

Closes #41916 from panbingkun/upgrade_sbt_192.

Authored-by: panbingkun <pbk1982@gmail.com>
Signed-off-by: Sean Owen <srowen@gmail.com>
ragnarok56 pushed a commit to ragnarok56/spark that referenced this pull request Mar 2, 2024
### What changes were proposed in this pull request?
The pr aims to upgrade sbt from 1.9.1 to 1.9.2.

### Why are the changes needed?
1.The new version brings bug fixed:
- Let ++ fall back to a bincompat Scala version by eed3si9n in sbt/sbt#7328

2.v1.9.1 VS v1.9.2
sbt/sbt@v1.9.1...v1.9.2

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Pass GA.

Closes apache#41916 from panbingkun/upgrade_sbt_192.

Authored-by: panbingkun <pbk1982@gmail.com>
Signed-off-by: Sean Owen <srowen@gmail.com>
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.

cross-build no longer works when CrossVersion.full projects depend on CrossVersion.binary ones
3 participants