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

Post 0.10.0 #1568

Merged
merged 2 commits into from Apr 11, 2022
Merged

Post 0.10.0 #1568

merged 2 commits into from Apr 11, 2022

Conversation

bjaglin
Copy link
Collaborator

@bjaglin bjaglin commented Mar 19, 2022

We'll probably have to tweak https://github.com/scalacenter/sbt-version-policy/blob/0fdfd36d6547af1334ab5bdba3f985f1e6ca1267/README.md#dependency-compatibility-adjustments down the line as I assume a few dependency are SemVer (but tagged as PVP by lack of explicit annotation) and would cause false positives.

@bjaglin
Copy link
Collaborator Author

bjaglin commented Apr 7, 2022

[error] Incompatibilities with dependencies of scalafix-core:0.10.0
[error]   com.lihaoyi:pprint_2.12: missing dependency

It looks like sbt-version-policy does not handle the Runtime configuration properly ad it's detected in the previous (published) artifact, but not in the current one - even though nothing changed in the build since the previous artifact was published.

@bjaglin
Copy link
Collaborator Author

bjaglin commented Apr 10, 2022

It seems to be the same problem as coursier/coursier#2370. However, forcing an ivy DependencyResolution does not seem to help.

    versionPolicyInternal.versionPolicyDependencyResolution := {
      // Try to fallback to ivy to avoid https://github.com/coursier/coursier/issues/2370
      IvyDependencyResolution(ivySbt.value.configuration)
    },

sbt/sbt#5568 might be relevant too.

@bjaglin
Copy link
Collaborator Author

bjaglin commented Apr 10, 2022

Both ivy and coursier seem to get runtime dependencies in the compile report

ThisBuild / useCoursier := true

test := {
  val depRes = dependencyResolution.value
  val update0 = depRes.update(
    depRes.wrapDependencyInModule("ch.epfl.scala" % "scalafix-core_2.12" % "0.10.0"),
    updateConfiguration.value,
    (update / unresolvedWarningConfiguration).value,
    sLog.value
  )
  println(update0.right.get.configuration(Compile).get)
}
	com.lihaoyi:pprint_2.12
		- 0.6.6
			evicted: false
			homepage: https://github.com/lihaoyi/PPrint
			configurations: test, optional, compile, default, runtime
			licenses: (MIT,Some(https://spdx.org/licenses/MIT.html))
			callers: ch.epfl.scala:scalafix-core_2.12:0.10.0

@bjaglin
Copy link
Collaborator Author

bjaglin commented Apr 10, 2022

Worked around it by excluding pprint from the check ...

versionPolicyIgnoredInternalDependencyVersions :=
Some("^\\d+\\.\\d+\\.\\d+\\+\\d+".r),
versionScheme := Some("early-semver"),
versionPolicyIntention := Compatibility.None // TODO: harden after 0.10.0
versionPolicyIntention := Compatibility.BinaryCompatible
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

since we are still in 0.x.y, we'll need to bump a minor anyway for the next release (and not a "semantic" patch), so there is not interest in checking BinaryAndSourceCompatible

@bjaglin bjaglin marked this pull request as ready for review April 10, 2022 22:51
@bjaglin bjaglin requested a review from mlachkar April 10, 2022 22:52
@bjaglin bjaglin merged commit 0780c24 into scalacenter:main Apr 11, 2022
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.

None yet

2 participants