Skip to content

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

Merged
merged 15 commits into from
Jul 31, 2023
Merged

Changelog generation & testing #25

merged 15 commits into from
Jul 31, 2023

Conversation

szymon-rd
Copy link
Contributor

@szymon-rd szymon-rd commented Jun 21, 2023

Program to traverse the dependency trees and check semver compliance, and generate changelogs.

@szymon-rd szymon-rd requested a review from bishabosha June 30, 2023 15:16
/**
* 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

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.

Copy link
Contributor Author

@szymon-rd szymon-rd Jun 30, 2023

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.

@szymon-rd szymon-rd requested a review from adpi2 July 4, 2023 15:16
@szymon-rd szymon-rd requested a review from bishabosha July 27, 2023 13:15
case _ => None


sealed abstract class VersionDiff(val order: Int) extends Ordered[VersionDiff]:
Copy link
Member

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 :(

Copy link
Member

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

Copy link
Member

@adpi2 adpi2 left a comment

Choose a reason for hiding this comment

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

LGTM

@szymon-rd szymon-rd merged commit 758c63e into main Jul 31, 2023
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.

4 participants