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

Version number becomes 0.0.0 when commit count exceeds 256 #133

Closed
olafurpg opened this issue Dec 4, 2019 · 6 comments
Closed

Version number becomes 0.0.0 when commit count exceeds 256 #133

olafurpg opened this issue Dec 4, 2019 · 6 comments

Comments

@olafurpg
Copy link
Member

olafurpg commented Dec 4, 2019

See https://scalameta.org/metals/docs/editors/vscode.html#using-latest-metals-snapshot

Screenshot 2019-12-04 at 10 33 38

I expected the version number to start with v0.7.6. I'm unable to reproduce locally on my computer, our CI does the releases. You can try to checkout the scalameta/metals repo at commit scalameta/metals@539450f

It looks like this branch is being hit
https://github.com/dwijnand/sbt-dynver/blob/569cd975e77bbfd2163ce792b131dcdd2832321e/src/main/scala/sbtdynver/DynVerPlugin.scala#L113

Any idea what might be going on?

@raboof
Copy link
Collaborator

raboof commented Dec 4, 2019

perhaps CI did a 'shallow' git checkout and didn't fetch enough history to find the previous tag?

@dwijnand
Copy link
Member

dwijnand commented Dec 4, 2019

^

There, in theory, would be a sanity check you opt into for that (https://github.com/dwijnand/sbt-dynver#sanity-checking-the-version) but it needs attention (#132).

@dwijnand
Copy link
Member

dwijnand commented Dec 4, 2019

Oh, and git fetch --unshallow is a CI agnostic way to avoid this issue.

@olafurpg
Copy link
Member Author

olafurpg commented Dec 4, 2019

Thank you for the help! Let's see how that works out scalameta/metals#1143

@olafurpg
Copy link
Member Author

olafurpg commented Dec 4, 2019

git fetch --unshallow seems to have fixed the issue!

] 	published mtags_2.13.1 to https://oss.sonatype.org/content/repositories/snapshots/org/scalameta/mtags_2.13.1/0.7.6+404-2cb4e3b0-SNAPSHOT/mtags_2.13.1-0.7.6+404-2cb4e3b0-SNAPSHOT.jar

The readme still recommends git fetch --tags in CI environments so it might be worth a mention. --unshallow is mentioned in the sanity check section.

Thank you!

@olafurpg olafurpg closed this as completed Dec 4, 2019
@dwijnand
Copy link
Member

dwijnand commented Dec 4, 2019

👍 9d128a8

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

No branches or pull requests

3 participants