Skip to content

Conversation

@chrisliebaer
Copy link
Contributor

This enables self-update to display release notes after switching to a different version.

  1. If user consent is required, user is provided with release notes of target version before consenting.
  2. If operation can run without user intervention, release notes are displayed after binary has been replaced.
  3. New flag --release-notes-only for printing release notes without replacing binary

I am not sure if the #### New contributors and ##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 v in invocations like pixi self-update --version v1.2.3, making both pixi self-update --version 1.2.3 and pixi self-update --version v1.2.3 valid. I think this is more user-friendly and does not introduce any ambiguity.

Any opinions on the verbosity of the release notes?

Closes #2705

@chrisliebaer chrisliebaer force-pushed the self-update-release-notes branch from 3862600 to 9b8d50f Compare March 22, 2025 01:07
@chrisliebaer chrisliebaer force-pushed the self-update-release-notes branch from 9b8d50f to 761f940 Compare March 22, 2025 01:09
@chrisliebaer chrisliebaer marked this pull request as ready for review March 23, 2025 02:19
@Hofer-Julian
Copy link
Contributor

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.

  1. If user consent is required, user is provided with release notes of target version before consenting.
  2. If operation can run without user intervention, release notes are displayed after binary has been replaced.

I think it would be fine to always print the changelogs before there might be user interaction. Or did that look ugly?

I am not sure if the #### New contributors and ##Download pixi... sections should be included, but removing them would require the release note format to be stable enough for parsing.

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 "#".

I also decided to strip the leading v in invocations like pixi self-update --version v1.2.3, making both pixi self-update --version 1.2.3 and pixi self-update --version v1.2.3 valid. I think this is more user-friendly and does not introduce any ambiguity.

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?

Comment on lines 191 to 193
console::style(console::Emoji("⚠️ ", "")).yellow(),
err,
release_url)
Copy link
Contributor

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?

@chrisliebaer
Copy link
Contributor Author

chrisliebaer commented Mar 25, 2025

I think it would be fine to always print the changelogs before there might be user interaction. Or did that look ugly?

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.

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 "#".
@wolfv had the nice idea to color headings. Is this something you'd be interested to tackle in this PR?

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:
grafik
A bit afraid to strip the "## Release notes" section, as I expect this to be the first place where someone starts summarizing bigger updates.

@Hofer-Julian Hofer-Julian requested a review from ruben-arts May 26, 2025 13:49
Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really cool! Thanks

@ruben-arts ruben-arts merged commit 091fffb into prefix-dev:main May 26, 2025
38 checks passed
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

Successfully merging this pull request may close these issues.

Print changelog after pixi self-update

4 participants