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

add sbt-version-policy and advance mimaPreviousVersion #501

Merged
merged 3 commits into from
Mar 16, 2021

Conversation

SethTisue
Copy link
Member

fixes #497

@SethTisue
Copy link
Member Author

Travis-CI is failing, but only on 2.12+JDK15 and 2.13+JDK15, with

[error] scala-xml: Failed binary compatibility check against org.scala-lang.modules:scala-xml_2.13:2.0.0-M5! Found 1 potential problems
[error]  * method declaration(java.lang.String,java.lang.String,java.lang.String)Unit in class scala.xml.include.sax.XIncluder does not have a correspondent in other version
[error]    filter with: ProblemFilters.exclude[DirectMissingMethodProblem]("scala.xml.include.sax.XIncluder.declaration")

?!

in addition to looking into this, I should also update the CircleCI config to perform the same check that Travis-CI is

@SethTisue SethTisue self-assigned this Mar 13, 2021
@SethTisue
Copy link
Member Author

note that it's the forward-compatibility check that is failing, not the backward one:

sbt:scala-xml> xml/mimaReportBinaryIssues
[success] Total time: 0 s, completed Mar 13, 2021, 11:25:00 AM
sbt:scala-xml> xml/versionPolicyCheck
[error] scala-xml: Failed binary compatibility check against org.scala-lang.modules:scala-xml_2.13:2.0.0-M5! Found 1 potential problems
...

so I assume the root cause here is that on the newer JDK version, there is a new method in one of XIncluder's parents

I'll just add it to the filters.

@SethTisue
Copy link
Member Author

This is ready for review.

@@ -11,3 +11,4 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
addSbtPlugin("org.scala-native" % "sbt-scala-native" % scalaNativeVersion)
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")
addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "1.0.0-RC5")
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

That was consider and discussed at scala/sbt-scala-module#111 . I was on the fence about it, but in the end I just shrugged and made a decision not to do it.

In general, my experiences while doing community build work have given me a somewhat dim view of putting build stuff in plugins. It makes individual builds harder to read and harder to maintain. As soon as settings and tasks are coming from a plugin, you can't just read the build and see what's going on anymore. You have to consider the possibility that a bunch of random stuff is coming in from some plugin and then you have to go read the sources of the plugin, too.

And then maintenance is harder for individual module maintainers, because they can't easily make changes to sbt-scala-module themselves. (And it's already hard enough to find and retain module maintainers.)

Copy link
Member Author

Choose a reason for hiding this comment

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

I suppose sbt-scala-module could add sbt-version-policy but not actually set the settings. That's a middle ground I'm not sure I considered.

But anyway, 🤷

Copy link
Member Author

Choose a reason for hiding this comment

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

Note that now that we have the Scala Steward, we get version bumps that way, so there's less benefit in getting them via sbt-scala-module.

@SethTisue SethTisue merged commit 916e48f into scala:master Mar 16, 2021
@SethTisue SethTisue deleted the version-policy branch March 16, 2021 18:12
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.

Build should declare a versionScheme
2 participants