Skip to content

Conversation

carlocab
Copy link
Member

@carlocab carlocab commented Aug 1, 2025

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

ensure_formula_installed! requires the Formula class to be loaded
before being called to work properly.

Let's guarantee that instead by implementing it as an instance method of
the Formula class.

See discussion at #20358.

`ensure_formula_installed!` requires the `Formula` class to be loaded
before being called to work properly.

Let's guarantee that instead by implementing it as an instance method of
the `Formula` class.

See discussion at #20358.
@carlocab carlocab requested a review from Bo98 August 1, 2025 19:45
@carlocab
Copy link
Member Author

carlocab commented Aug 1, 2025

Error: File exists @ syserr_fail2_in - /github/home/.cache/Homebrew/automake--1.18.1

https://github.com/Homebrew/brew/actions/runs/16683809174/job/47228527307?pr=20359#step:9:48

Seems like another race condition.

This is close enough to #20331 to do now.
@carlocab carlocab enabled auto-merge August 1, 2025 20:01
@carlocab carlocab force-pushed the replace-ensure_formula_installed! branch from e3d48d2 to fd80dd9 Compare August 1, 2025 20:46
@carlocab carlocab added this pull request to the merge queue Aug 1, 2025
Merged via the queue into main with commit a29a643 Aug 1, 2025
54 of 56 checks passed
@carlocab carlocab deleted the replace-ensure_formula_installed! branch August 1, 2025 21:29
@@ -449,6 +449,8 @@ def redirect_stdout(file)
}
def ensure_formula_installed!(formula_name, reason: "", latest: false,
output_to_stderr: true, quiet: false)
odeprecated "ensure_formula_installed!", "Formula[\"#{formula_name}\"].ensure_installed!"
Copy link
Member

Choose a reason for hiding this comment

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

@carlocab @Bo98 This is not a public nor internal API so doesn't need a deprecation cycle. We should just remove it.

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.

3 participants