-
Notifications
You must be signed in to change notification settings - Fork 401
feat: improve ergonomics of self-update
#3397
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
feat: improve ergonomics of self-update
#3397
Conversation
3862600 to
9b8d50f
Compare
9b8d50f to
761f940
Compare
|
Thanks @chrisliebaer, I've done a bit of limited testing and everything worked out well. Also the code looks good to me. I plan to have a closer look tomorrow.
I think it would be fine to always print the changelogs before there might be user interaction. Or did that look ugly?
Good idea to remove them. You are absolutely right, that it's not perfectly stable, but I think it wouldn't hurt to attempt removing it. Something like "#### New contributors" until next "#".
This is a good idea. I could have sworn we already implemented that. We for sure talked about it :D @wolfv had the nice idea to color headings. Is this something you'd be interested to tackle in this PR? |
src/cli/self_update.rs
Outdated
| console::style(console::Emoji("⚠️ ", "")).yellow(), | ||
| err, | ||
| release_url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this contains a mixture of tabs and spaces. why doesn't cargo fmt catch this?
There are only a few status lines afterwards. I think it looks a bit weird to have the release notes go first, but that's just preference. The implementation would be nicer if the release notes always go first.
I was also considering coloring the output but didn't know if you wanted to have a dependency on the formatting. If you are fine with it breaking/looking ugly in case of changes, I can do that. This is what it now looks like: |
ruben-arts
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really cool! Thanks

This enables
self-updateto display release notes after switching to a different version.--release-notes-onlyfor printing release notes without replacing binaryI am not sure if the
#### New contributorsand##Download pixi...sections should be included, but removing them would require the release note format to be stable enough for parsing.I also decided to strip the leading
vin invocations likepixi self-update --version v1.2.3, making bothpixi self-update --version 1.2.3andpixi self-update --version v1.2.3valid. I think this is more user-friendly and does not introduce any ambiguity.Any opinions on the verbosity of the release notes?
Closes #2705