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

CLI incorrectly reports a new version being available on the most recent release #386

Closed
reese opened this issue Dec 14, 2022 · 1 comment

Comments

@reese
Copy link
Collaborator

reese commented Dec 14, 2022

  • 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.

@reese
Copy link
Collaborator Author

reese commented Dec 15, 2022

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.

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

1 participant