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

dev-cmd/livecheck: Skip autobumped formulae #18984

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

issyl0
Copy link
Member

@issyl0 issyl0 commented Dec 22, 2024

  • 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?

- Skip formulae that are autobumped by BrewTestBot,
  to avoid useless effort spent by contributors who
  are checking for formulae to bump and then we close
  their PRs.
@p-linnane p-linnane requested a review from samford December 22, 2024 02:36
Copy link
Member

@samford samford left a comment

Choose a reason for hiding this comment

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

As this is currently implemented, users don't have a way to disable this filtering behavior other than manually modifying this code. livecheck blocks for autobumped formulae/casks regularly break, so we need a way to be able to run these checks locally for debugging/fixing. A CLI option to also check autobumped packages (e.g., --autobump) would be a simple addition.

Beyond that, there may be something to be said for also offering an environment variable that would act like --autobump is always used (e.g., HOMEBREW_LIVECHECK_AUTOBUMP). My situation may be a bit rare (since I do a lot of livecheck block maintenance) but I almost never want to skip autobumped packages, so I would greatly prefer to not have to add a CLI option a lot of the time (and having to completely re-do long runs if I forget).

Library/Homebrew/dev-cmd/livecheck.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/livecheck.rb Outdated Show resolved Hide resolved
Comment on lines 95 to 96
autobump_core = File.read(autobump_core_path).lines.map(&:strip)
autobump_cask = File.read(autobump_cask_path).lines.map(&:strip)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
autobump_core = File.read(autobump_core_path).lines.map(&:strip)
autobump_cask = File.read(autobump_cask_path).lines.map(&:strip)
autobump_core = autobump_core_path.read.lines.map(&:strip)
autobump_cask = autobump_cask_path.read.lines.map(&:strip)

or .readlines may make sense


sig { returns(Pathname) }
def autobump_core_path
@autobump_core_path ||= T.let(Tap.fetch("homebrew/core").path/".github/autobump.txt", T.nilable(Pathname))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@autobump_core_path ||= T.let(Tap.fetch("homebrew/core").path/".github/autobump.txt", T.nilable(Pathname))
@autobump_core_path ||= T.let(Tap.fetch("homebrew/core").path/".github/autobump.txt", Pathname)

maybe?

@issyl0
Copy link
Member Author

issyl0 commented Dec 23, 2024

OK, thanks @samford! I’ll add HOMEBREW_LIVECHECK_AUTOBUMP and an —-autobump flag or something similarly named.

issyl0 added 2 commits January 2, 2025 17:20
- This is useful for maintainers to check the full range of livecheck functionality.
- Livecheck blocks can exist in taps other than Core and Cask.
- And packages can have the same name in multiple taps.
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.

option to remove BrewTestBot checked formulae from brew livecheck output
6 participants