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

Clear cache for Tap#formula_reverse_renames. #16783

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion Library/Homebrew/tap.rb
Expand Up @@ -161,6 +161,7 @@ def clear_cache
@formula_names = nil
@formula_files = nil
@formula_files_by_name = nil
@formula_reverse_renames = nil
@cask_files = nil
@cask_files_by_name = nil
@alias_dir = nil
Expand Down Expand Up @@ -801,7 +802,9 @@ def formula_renames
end
end

# Hash with tap formula old names. Reverse of {#formula_renames}.
# Mapping from new to old formula names. Reverse of {#formula_renames}.
#
# @private
Copy link
Member

Choose a reason for hiding this comment

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

I don't know if YARD supports this but: I'd rather we flipped this at some point so we assume literally everything that's not declared to be a public API is a private one.

sig { returns(T::Hash[String, T::Array[String]]) }
def formula_reverse_renames
@formula_reverse_renames ||= formula_renames.each_with_object({}) do |(old_name, new_name), hash|
Expand Down