Skip to content

Conversation

@GideonBear
Copy link
Member

@GideonBear GideonBear commented May 3, 2025

What does this PR do

  • Passes the ctx parameter to func in Runner::execute to remove the unnecessary closure when calling it (see main.rs line 505
  • Passes the confirm_run parameter to func in Runner::execute to:
    • Remove duplication of the key/message string (see generic.rs line 1622)
    • Hide Topgrade implementation details in the run_* functions (why would they need to know to print the separator?)
    • Create warnings when the separator is not printed (because confirm_run is unused)
    • Open up the possibility for adding more functionality besides printing the separator

I haven't applied it to all calls to execute yet, to ask for approval first. Is this acceptable @SteveLauC?
Then I will (hopefully mostly automated with regex replaces) change the definitions and usages of the run_* functions.

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

@GideonBear GideonBear changed the title Improve execute to deduplicate key string and remove closure ref: improve execute to deduplicate key string, remove closure Oct 13, 2025
@GideonBear GideonBear added this to the v17.0.0 milestone Nov 15, 2025
@GideonBear GideonBear changed the title ref: improve execute to deduplicate key string, remove closure refactor: improve execute to deduplicate key string, remove closure Nov 25, 2025
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.

1 participant