brew icon indicating copy to clipboard operation
brew copied to clipboard

Add Algolia querying to fix Homebrew/cask searching

Open Bo98 opened this issue 1 year ago • 7 comments

Works alongside GitHub searching since we don't have every tap on formulae.brew.sh at the moment.

This is basically Homebrew/cask only. It does search Homebrew/core too because they are together in the search index but I don't think there's ever a situation where the tap will be untapped (excluding API mode) and as such we will never need to display those anyway? If I'm wrong: it's only one line to add.

HOMEBREW_NO_GITHUB_API will disable searching on Algolia, like how it disables GitHub searching. Based on the that variable's description, I think that's a reasonable thing to do even though it sounds weird with the name.

Fixes #12557.

Bo98 avatar Jul 06 '22 05:07 Bo98

Review period will end on 2022-07-07 at 05:01:29 UTC.

BrewTestBot avatar Jul 06 '22 05:07 BrewTestBot

Works alongside GitHub searching since we don't have every tap on formulae.brew.sh at the moment.

I think I'd like to see this replace GitHub searching rather than doing both.

This is basically Homebrew/cask only. It does search Homebrew/core too because they are together in the search index but I don't think there's ever a situation where the tap will be untapped (excluding API mode) and as such we will never need to display those anyway? If I'm wrong: it's only one line to add.

Would be good to handle the API case here 👍🏻

MikeMcQuaid avatar Jul 06 '22 11:07 MikeMcQuaid

I think I'd like to see this replace GitHub searching rather than doing both.

Ok I'll look into integrating cask-versions etc.

Would be good to handle the API case here 👍🏻

Local formula searching with API enabled will work if/when Formula.core_names reads from the JSON file, in which case Algolia querying won't be needed for that setup. I could enable Algolia searching in the meantime however.

Bo98 avatar Jul 06 '22 14:07 Bo98

Review period ended.

BrewTestBot avatar Jul 07 '22 06:07 BrewTestBot

Local formula searching with API enabled will work if/when Formula.core_names reads from the JSON file, in which case Algolia querying won't be needed for that setup. I could enable Algolia searching in the meantime however.

This would be trivial to set up, just return Homebrew::API::Formula.all_formulae.keys right? I'd say just go ahead and do that in this PR if you want

Rylan12 avatar Jul 07 '22 15:07 Rylan12

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Jul 29 '22 00:07 github-actions[bot]

Adding other taps to formulae.brew.sh is going to take some time. I'll get around to it sometime this month hopefully.

Bo98 avatar Aug 02 '22 14:08 Bo98

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Oct 19 '22 00:10 github-actions[bot]

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Nov 17 '22 00:11 github-actions[bot]