rust-analyzer: Version strings are still wrong
We use git describe to get a version string, but the release is tagged only after uploading the artifacts to GitHub. This means that we make a version string using the previous release name.
One way to fix this would be to force a certain version string in the workflow for non-nightly releases, but it feels a bit hacky.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 25 (25 by maintainers)
🎉 mac works now, thank you. Windows seems to be working too and Linux wasn’t even broken, so closing this.
Hm… I think “date”, “commit hash” and “release” channel are just dissimilar bits of meta, and that it might not be best to try to cajole git to give us them all.
How about we do this?
git rev-parse --short HEADfor commit hash (unambiguous)date --isofor build date (this is mildly confusing due to timezones and nightlyness, but we’d have to live with that. I guess, we can shift releases to be at one rather that at UTC midnight to protect from the clock drift somewhat)xtask distflag to adddev/nightly/ `` for various builds#8666 should fix it
well, at least I got linux right 😄
Thank you for the explanations, now I feel even more flattened 😬
Feels like I was wrong from the start and bring no extra sense with these comments, so clean them if you want to, while I’m trying to adjust to a different workflow.
I do get a date on newest nightly, but still with the stable tag
Edit: This is on windows
So, I imagine a string like this will be suitable for the users:
I am also wondering, should be have
rust-analyzer --version --json?I feel that some folks might be parsing this output, so having a stable breaking JSON version seems good?
EDIT:
Clearly, I am one more person in the thread who needs a wake-up pu’er
No worries, it’s Monday. It was good feedback, but I think using the standard
git describeoutput is reasonable since (some) people will recognize it. We should at least add a-nightlysuffix, though.