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

Handle - as version separator in addition to + #103

Closed
swsnr opened this issue Sep 6, 2021 · 2 comments · Fixed by #115
Closed

Handle - as version separator in addition to + #103

swsnr opened this issue Sep 6, 2021 · 2 comments · Fixed by #115

Comments

@swsnr
Copy link

swsnr commented Sep 6, 2021

sbt-dynver recommends to use - in case + doesn't work (e.g. docker). See https://github.com/dwijnand/sbt-dynver#portable-version-strings>.

However this plugin doesn't seem to detect the previous version correctly: If I set ThisBuild / dynverSeparator := "-" then versionPolicyPreviousVersions is empty unless a previous version exists in the local Ivy repository. This makes version checks spuriously succeed on my CI (where the local repo is empty), even if I make a binary incompatible change, because mimaPreviousArtifacts remains empty.

Probably related, versionPolicyPreviousVersions finds published snapshot versions, e.g. 2.0.0-2-d7f5b21a, for its version check.

@julienrf
Copy link
Collaborator

Thank you for reporting.
I think this logic is handled by coursier. Maybe @alexarchambault can shed some light?

@swsnr
Copy link
Author

swsnr commented Sep 10, 2021

To work around this issue I now leave dynverSeparator alone and instead change version for native packager only with Docker / version := version.value.replace('+', '-'). As far as I can see it works, and it's good enough for me.

I'd appreciate a short line about this in README, but otherwise we can also close this issue again 🙂

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 a pull request may close this issue.

2 participants