daffodil icon indicating copy to clipboard operation
daffodil copied to clipboard

Update sbt-native-packager to 1.9.11

Open scala-steward opened this issue 2 years ago • 4 comments

Updates com.github.sbt:sbt-native-packager from 1.9.9 to 1.9.11. GitHub Release Notes - Changelog - Version Diff

I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.

If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.

Configure Scala Steward for your repository with a .scala-steward.conf file.

Have a fantastic day writing Scala!

Adjust future updates

Add this to your .scala-steward.conf file to ignore future updates of this dependency:

updates.ignore = [ { groupId = "com.github.sbt", artifactId = "sbt-native-packager" } ]

Or, add this to slow down future updates of this dependency:

dependencyOverrides = [{
  pullRequests = { frequency = "@monthly" },
  dependency = { groupId = "com.github.sbt", artifactId = "sbt-native-packager" }
}]

labels: sbt-plugin-update, early-semver-patch, semver-spec-patch, commit-count:1

scala-steward avatar Aug 16 '22 12:08 scala-steward

I dug a little bit into this looking for a solution. The issue is that sbt-native-packager was updated to depend on scala-xml 2.1.0, but sbt-scoverage depends on scala-xml 1.3.0. Because of the major version change, SBT views these is incompatible and requires a change somewhere.

One solution is to manually override this by putting this in the plugins.sbt file:

dependencyOverrides ++= Seq(
  "org.scala-lang.modules" %% "scala-xml" % "2.1.0",
)

I've tested this and it seems to work: https://github.com/stevedlawrence/daffodil/runs/8119251364?check_suite_focus=true

One downside is I don't think scala-steward updates these dependencyOverrides, so this version will never be updated unless we manually update it. It's also possible there actually is a binary incompatibility that just isn't showing up.

Another option is to just wait for sbt-scoverage to update to scala-xml 2.x. Though, they don't currently have a ticket for this, and it's unclear when/if it will happen.

stevedlawrence avatar Aug 31 '22 17:08 stevedlawrence

Another option, switch to a different coverage tool, e.g. sbt-jacoco. Considering our issues with scoverage and windows, this might be a good alternative.

stevedlawrence avatar Aug 31 '22 17:08 stevedlawrence

A slight correction: sbt-scoverage's most recent releases have already updated to scala-xml 2.1.0 (we don't have to wait for that to happen). However, we are blocked from using sbt-scoverage's most recent release, 2.0.2, due to a Windows issue which the sbt-scoverage project has not fixed yet. See PR #823.

I looked at sbt-jacoco's documentation and issues. Their documentation looks good (they appear to have all the functionality needed to replace sbt-scoverage in Daffodil) but their newest issue, Coverage for java code files, hasn't been fixed since it was posted in Nov 2021 (java files are instrumented, but their coverage are missing from the aggregate report).

tuxji avatar Aug 31 '22 18:08 tuxji

Yeah, I looked a jacoco and it said we have 33% coverage, maybe it can't handle scala very well....

I didn't realize scoverage had updated to 2.1.0, so yeah, I guess we're blocked on scoverage fixing the windows issue.

stevedlawrence avatar Aug 31 '22 18:08 stevedlawrence

Closing, dependency updated as part of #843

stevedlawrence avatar Oct 20 '22 15:10 stevedlawrence