Skip to content

[1.x] fix: Fix SIP-51 message #8067

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
Mar 16, 2025
Merged

Conversation

eed3si9n
Copy link
Member

@eed3si9n eed3si9n commented Mar 16, 2025

Fixes #8056

Problem

The error message uses name, which may not match the actual project id that the user can type into the shell.

Solution

Use displayBuildRelative to calculate the proper subproject id.

Note

sbt:bar-aaa> compile
[error] stack trace is suppressed; run last scalaInstance for the full output
[error] (scalaInstance) Expected `bar / scalaVersion` to be 2.13.16 or later, but found 2.13.9.
[error] To support backwards-only binary compatibility (SIP-51), the Scala 2.13 compiler
[error] should not be older than scala-library on the dependency classpath.
[error]
[error] Upgrade the `scalaVersion` to fix the build. If upgrading the Scala compiler version is
[error] not possible (for example due to a regression in the compiler or a missing dependency),
[error] this error can be demoted by setting `allowUnsafeScalaLibUpgrade := true`.
[error]
[error] See `bar / evicted` to know why scala-library 2.13.16 is getting pulled in.

**Problem**
The error message uses name, which may not match the actual project id
that the user can type into the shell.

**Solution**
Use displayBuildRelative to calculate the proper subproject id.
@eed3si9n eed3si9n merged commit 0d4c11b into sbt:1.10.x Mar 16, 2025
9 checks passed
@eed3si9n eed3si9n deleted the wip/fix-warning branch March 16, 2025 19:37
@eed3si9n eed3si9n added this to the 1.10.11 milestone Mar 16, 2025
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.

SIP-51 warning prints an invalid reference to subproject
1 participant