-
Notifications
You must be signed in to change notification settings - Fork 14
Changelog generation & testing #25
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
/** | ||
* Compares two versions and returns the type of update that is required to go from oldVersion to newVersion. | ||
* Takes into account that versions may be rolled back. For example: | ||
* - 1.0.1 -> 1.0.0 is a patch update |
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.
Assuming that the library authors are very strictly following early semver. In my experience, not all libraries/maintainers follow this scheme: they will add small features in patches and only bump minors for more significant changes. Furthermore, as far as I know the tooling (i.e. MiMa) is not currently able to programmatically enforce strict early-semver, so this is relying on maintainers best efforts.
Maybe that's okay for toolkit, just pointing it out.
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 want to solve it with the list of exceptions. If it's impossible to follow that, then ok, but let's have a list showing where it breaks.
As for the changes, it's a tool to hold it all together, enforcing it on specific libraries is of course a separate problem that has to be addressed.
checks/Dependencies.scala
Outdated
case _ => None | ||
|
||
|
||
sealed abstract class VersionDiff(val order: Int) extends Ordered[VersionDiff]: |
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.
if this was a Java style enum then that would avoid all the boilerplate :(
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.
enum VersionDiff extends Enum[VersionDiff]:
case PatchUpdate, MinorUpdate, MajorUpdate
val order = ordinal
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.
LGTM
Program to traverse the dependency trees and check semver compliance, and generate changelogs.