CLI incorrectly reports a new version being available on the most recent release
reese opened this issue · 1 comments
- Ruby version: 2.7.4
- Rubyfmt git sha:
0.8.0-pre
(ed99cc4)
This occurs on any input:
% echo "class Foo; end" | rubyfmt
class Foo
end
A new version of rubyfmt is available at https://github.com/penelopezone/rubyfmt/releases/tag/v0.8.0
% rubyfmt --version
rubyfmt-main 0.8.0-pre
This breaks because
I would expect this not to tell me a new version is available if I'm on the latest version. This might be related to the -pre
tag, but I haven't looked enough at how this update check works to know if that matters.
Ah I actually know why this is -- when we released v0.8.0, in the Cargo.toml we actually marked it as a prelease (v0.8.0-pre
). We also did this in the GitHub release originally, but brew doesn't let you release something marked as a prerelease on GitHub, so we made it no longer a prerelease, so the GitHub version marker is technically different (and this update check is done by querying the latest GH release).
TL;DR -- I don't really think there's anything we should do here other than we should no longer be marking these as prereleases internally, because (a) having it on brew means it necessarily can't be a prerelease and (b) this is already supporting millions of lines of code in production daily, so I think it's fair that it's no longer a prerelease anyways.