Skip to content

Versioning scheme of dependencies is not taken into account #2541

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

Closed
julienrf opened this issue Mar 4, 2022 · 0 comments · Fixed by #2925
Closed

Versioning scheme of dependencies is not taken into account #2541

julienrf opened this issue Mar 4, 2022 · 0 comments · Fixed by #2925
Labels
enhancement New feature or request

Comments

@julienrf
Copy link
Contributor

julienrf commented Mar 4, 2022

When Scala Steward makes a PR, it decorates it with a set of labels such as “semver-spec-patch”. I believe such labels might be misleading because the actual versioning scheme of the dependency is not taken into account.

For instance, a bump from version 1.2.3 to version 1.3.0 would be labeled as a minor update (semver-spec-minor), but it could really be a major update if the library actually uses “package-versioning-policy” (PVP).

That could be an issue if someone wants to setup a mergify rule that automatically merges patch updates, for instance, since there is no proper way to detect what is a patch update (the label semver-spec-patch would be set by Scala Steward for a minor update, if the dependency uses PVP).

I believe this issue could be mitigated by taking into account the underlying versioning scheme of the library. The versioning scheme is manually set by the library authors, and there is nothing that forces them to apply the versioning scheme they declared (except some third-party plugins such that sbt-version-policy), so this is why this solution is not perfect, but I do believe that it would be more accurate than the status quo.

A possible way forward would be to add a label “version-scheme-pvp”, “version-scheme-semver-spec”, or “unknown-version-scheme” to the PR’s body without changing the labels that are currently created. Another approach would be to change the existing labels to use the actual versioning scheme (e.g., “semver-spec-patch”, or “pvp-minor”).

Retrieving the underlying version scheme of an artifact is possible with Coursier. It requires querying the properties of a coursier.core.Project to look for a key info.versionScheme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants