Skip to content

feat: add framework for listing updated components#1147

Draft
GideonBear wants to merge 21 commits intotopgrade-rs:mainfrom
GideonBear:updated-summary
Draft

feat: add framework for listing updated components#1147
GideonBear wants to merge 21 commits intotopgrade-rs:mainfrom
GideonBear:updated-summary

Conversation

@GideonBear
Copy link
Copy Markdown
Member

@GideonBear GideonBear commented May 5, 2025

What does this PR do

Closes #943 (I am planning to open a tracking issue for implementing this for all steps where it is possible if this is merged.)

  • Adds the framework for listing updated components in the summary.
    • The step can specify just the thing that was updated, or also the version it was updated from/to or both.
  • Implements that for uv (self-updating only for now)
  • Adds references to this to the "new step" issue and PR templates.

What do you think @SteveLauC? This is non-disruptive for steps that don't yet or can't support it, but opens up the possibility to implement this for steps where it is very useful. Note that for some steps, machine-readable output is available (e.g. apt-get) and can be used instead of regexes. We can also PR to the tools themselves to support outputting in a machine-readable format. (maybe a good idea for uv, which already supports --output-format=json on some commands)

Example: (cinnamon_spices included to show what it looks like for a step that does not support it (yet))

$ cargo run -- --only uv --only cinnamon_spices
── 11:18:45 - Cinnamon spices ──────────────────────────────────────────────────
There are no Spice updates

── 11:18:46 - uv ───────────────────────────────────────────────────────────────
info: Checking for updates...
success: Upgraded uv from v0.7.1 to v0.7.2! https://github.com/astral-sh/uv/releases/tag/0.7.2
Nothing to upgrade

── 11:18:50 - Summary ──────────────────────────────────────────────────────────
Cinnamon spices: OK
uv: OK: Updated:
- (self-update) uv from v0.7.1 to v0.7.2
$ cargo run -- --only uv --only cinnamon_spices
── 11:18:52 - Cinnamon spices ──────────────────────────────────────────────────
There are no Spice updates

── 11:18:53 - uv ───────────────────────────────────────────────────────────────
info: Checking for updates...
success: You're on the latest version of uv (v0.7.2)
Nothing to upgrade

── 11:18:53 - Summary ──────────────────────────────────────────────────────────
Cinnamon spices: OK
uv: OK: No updates found

Standards checklist

  • The PR title is descriptive
  • I have read CONTRIBUTING.md
  • Optional: I have tested the code myself
  • If this PR introduces new user-facing messages they are translated

Comment thread src/steps/generic.rs Fixed
Comment thread src/steps/generic.rs
}

// 2. Update the installed tools
// TODO: include this in `updated`

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
Comment thread src/steps/generic.rs
Comment thread src/steps/generic.rs
@GideonBear GideonBear changed the title Adds framework for listing updated components in the summary feat: add framework for listing updated components Oct 13, 2025
@GideonBear GideonBear added this to the v17.0.0 milestone Nov 28, 2025
@GideonBear GideonBear marked this pull request as draft December 7, 2025 08:51
@GideonBear
Copy link
Copy Markdown
Member Author

See discussion in #943

barkleesanders added a commit to barkleesanders/topgrade that referenced this pull request Mar 8, 2026
From PR topgrade-rs#1147.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
barkleesanders added a commit to barkleesanders/topgrade that referenced this pull request Mar 8, 2026
Add print_updated_components_summary() to terminal.rs that collects
version changes from all steps and displays them in a dedicated section
after the main summary. Builds on the UpdatedComponents framework from
PR topgrade-rs#1147.

Fixes topgrade-rs#943.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

List updated programs / components post upgrade in a bullet point list

4 participants