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

upgrade: list upgradeable dependencies on dry run #11947

Merged
merged 1 commit into from Sep 1, 2021

Conversation

EricFromCanada
Copy link
Member

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Currently, a dry run of brew upgrade only lists which dependents of the given packages will be auto-upgraded. This adds a list of dependencies to be auto-upgraded to the output.

Before:

$ brew upgrade -n nghttp2 harfbuzz
==> Would upgrade 2 outdated packages:
nghttp2 1.43.0 -> 1.44.0
harfbuzz 2.8.1 -> 2.9.0
==> Would upgrade 4 dependents:
unbound 1.13.1 -> 1.13.2, gnupg 2.3.1_1 -> 2.3.2, pango 1.48.5 -> 1.48.9, gtk+3 3.24.29 -> 3.24.30
==> No currently broken dependents found!
Warning: If they are broken by the upgrade they will also be upgraded or reinstalled.

After:

$ brew upgrade -n nghttp2 harfbuzz
==> Would upgrade 2 outdated packages:
nghttp2 1.43.0 -> 1.44.0
harfbuzz 2.8.1 -> 2.9.0
==> Would upgrade 3 dependencies for nghttp2:
openssl@1.1 1.1.1k -> 1.1.1l, cmake 3.21.1 -> 3.21.2, c-ares 1.17.1 -> 1.17.2
==> Would upgrade 4 dependencies for harfbuzz:
openssl@1.1 1.1.1k -> 1.1.1l, meson 0.59.0 -> 0.59.1, freetype 2.10.4 -> 2.11.0, glib 2.68.3 -> 2.68.4
==> Would upgrade 4 dependents:
unbound 1.13.1 -> 1.13.2, gnupg 2.3.1_1 -> 2.3.2, pango 1.48.5 -> 1.48.9, gtk+3 3.24.29 -> 3.24.30
==> No currently broken dependents found!
Warning: If they are broken by the upgrade they will also be upgraded or reinstalled.

@BrewTestBot
Copy link
Member

Review period will end on 2021-08-31 at 23:23:12 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Aug 30, 2021
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Makes sense to me! Some suggested improvements but can be in a follow-up PR.

Library/Homebrew/upgrade.rb Outdated Show resolved Hide resolved
Library/Homebrew/upgrade.rb Outdated Show resolved Hide resolved
@EricFromCanada
Copy link
Member Author

Added dry run modes to migration and cleanup steps:

$ brew upgrade -n nghttp2 harfbuzz
==> Would upgrade 2 outdated packages:
nghttp2a 1.44.0
harfbuzz 2.8.1 -> 2.9.0
==> Would migrate nghttp2 to nghttp2a
==> Would upgrade 3 dependencies for nghttp2a:
openssl@1.1 1.1.1k -> 1.1.1l, cmake 3.21.1 -> 3.21.2, c-ares 1.17.1 -> 1.17.2
==> Would run `brew cleanup` which has not been run in the last 30 days
==> Would upgrade 4 dependencies for harfbuzz:
openssl@1.1 1.1.1k -> 1.1.1l, meson 0.59.0 -> 0.59.1, freetype 2.10.4 -> 2.11.0, glib 2.68.3 -> 2.68.4
==> Would run `brew cleanup` which has not been run in the last 30 days
==> Would upgrade 4 dependents:
unbound 1.13.1 -> 1.13.2, gnupg 2.3.1_1 -> 2.3.2, pango 1.48.5 -> 1.48.9, gtk+3 3.24.29 -> 3.24.30
==> No currently broken dependents found!
Warning: If they are broken by the upgrade they will also be upgraded or reinstalled.

Also added a dry run mode to migrate:

$ brew migrate -n nghttp2
==> Would migrate nghttp2 to nghttp2a

@BrewTestBot
Copy link
Member

Review period ended.

@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Sep 1, 2021
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Great work as usual @EricFromCanada!

@MikeMcQuaid MikeMcQuaid merged commit ffb4e5f into Homebrew:master Sep 1, 2021
@EricFromCanada EricFromCanada deleted the upgrade-dry-run branch September 1, 2021 13:24
@github-actions github-actions bot added the outdated PR was locked due to age label Oct 2, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants