You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the versionPolicyReportDependencyIssues command is the only way to debug the reasons sbt-version-policy has for deciding that compatibility is broken by dependency changes, ie the reasons that require a major/minor version bump of releaseVersion when running in unconstrained compatibility mode without versionPolicyIntention set.
Unfortunately, versionPolicyReportDependencyIssuesrequiresversionPolicyIntention is set, and will give this error if it's not set:
Please set the key versionPolicyIntention to declare the compatibility you want to check
.getOrElse(thrownewMessageOnlyException("Please set the key versionPolicyIntention to declare the compatibility you want to check"))
This is awkward for projects running in unconstrained compatibility mode - ie all projects using gha-scala-library-release-workflow! There is useful output of versionPolicyReportDependencyIssues that we'd like to see even if versionPolicyIntention is not set, like:
[error] Incompatibilities with dependencies of simple-configuration-s3:3.0.0
[error] io.netty:netty-buffer: incompatible version change from 4.1.114.Final to 4.1.115.Final (compatibility: early semantic versioning)
[error] io.netty:netty-codec: incompatible version change from 4.1.114.Final to 4.1.115.Final (compatibility: early semantic versioning)
Workaround
Temporarily set versionPolicyIntention on the sbt console, like this:
set ThisBuild / versionPolicyIntention := Compatibility.BinaryAndSourceCompatible ; versionPolicyReportDependencyIssues
Alternatives
You can use the versionPolicyCollectCompatibilityReports task, which doesn't require versionPolicyIntention, but the output isn't as user-friendly as versionPolicyReportDependencyIssues:
Thank you for the detailed write up! How do you think the problem should be solved? My intuition is that we want versionPolicyAssessCompatibility to return more than just a Compatibility value for each module. It could report the found incompatibilities (see also #121 which implements something similar)
I think the
versionPolicyReportDependencyIssues
command is the only way to debug the reasonssbt-version-policy
has for deciding that compatibility is broken by dependency changes, ie the reasons that require a major/minor version bump ofreleaseVersion
when running in unconstrained compatibility mode withoutversionPolicyIntention
set.Unfortunately,
versionPolicyReportDependencyIssues
requiresversionPolicyIntention
is set, and will give this error if it's not set:sbt-version-policy/sbt-version-policy/src/main/scala/sbtversionpolicy/SbtVersionPolicySettings.scala
Lines 179 to 181 in 106d598
This is awkward for projects running in unconstrained compatibility mode - ie all projects using
gha-scala-library-release-workflow
! There is useful output ofversionPolicyReportDependencyIssues
that we'd like to see even ifversionPolicyIntention
is not set, like:Workaround
Temporarily set
versionPolicyIntention
on the sbt console, like this:Alternatives
You can use the
versionPolicyCollectCompatibilityReports
task, which doesn't requireversionPolicyIntention
, but the output isn't as user-friendly asversionPolicyReportDependencyIssues
:The text was updated successfully, but these errors were encountered: