-
-
Notifications
You must be signed in to change notification settings - Fork 24
Setup versioning and MiMa #461
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
Conversation
| ThisBuild / tlVersionIntroduced := // test bincompat starting from the beginning of this series | ||
| List("2.12", "2.13").map(_ -> s"${tlBaseVersion.value}.0").toMap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a mild abuse of the tlVersionIntroduced setting, which is used to indicate in which version artifacts first existed.
Since we only want to check bincompat with in a year.month.x series (and not year.x.y series) all we have to do is pretend the artifacts were only introduced in version year.month.0 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wait, this won't work long-term, because sbt-typelevel won't look further back than the major version bump. Totally my bad, sorry. Wait, nope, that's fine, because we don't need it to.
| // Finagle releases monthly using a {year}.{month}.{patch} version scheme. | ||
| // The combination of year and month is effectively a major version, because | ||
| // each monthly release often contains binary-incompatible changes. | ||
| // This means we should release at least monthly as well, when Finagle does, | ||
| // but in between those monthly releases, maintain binary compatibility. | ||
| // This is effectively PVP style versioning. | ||
| // We set this at the project-level instead of ThisBuild to circumvent sbt-typelevel checks. | ||
| versionScheme := Some("pvp"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This takes advantage of a loophole in sbt-typelevel that the versioning strategy is apparently only enforced at the ThisBuild level (although I might fix that 😅). So we can sneak it in as a project setting for now.
Btw, your custom strategy was not accepted by sbt when I moved the setting here.
java.lang.RuntimeException: unknown version scheme: year-month-patch
at scala.sys.package$.error(package.scala:30)
at sbt.internal.librarymanagement.VersionSchemes$.validateScheme(VersionSchemes.scala:36)
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I wondered if there was a list of schemes somewhere. This works for me.
| @@ -1,15 +1,9 @@ | |||
| val catsVersion = "2.7.0" | |||
| val finagleVersion = "21.8.0" | |||
| val finagleVersion = "22.4.0" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I merged in #454 because MiMa needed a version bump anyway. (It was having a hard time finding 21.8.0 artifacts to compare against.)
|
Ok, despite briefly confusing myself, I think this should do the trick! |
This executes the versioning strategy described in #460 (comment).
Edit: this part below is a bit trickier :)