0.17 Phase 5 PR B — feat(brew): query-aware search + cask split#142
Open
StanMarek wants to merge 3 commits into
Open
0.17 Phase 5 PR B — feat(brew): query-aware search + cask split#142StanMarek wants to merge 3 commits into
StanMarek wants to merge 3 commits into
Conversation
brew_formulae_searchable now consults ctx.current_token. Typed queries call `brew search <q>` instead of empty search filtered by the cap; the cap only applies to empty-query exploration. Adds brew_casks_searchable and brew_packages_searchable providers for the cask split: `brew search --cask <q>` and the union of formulae+casks respectively. Includes parsers for both modern (`==> Casks`) and legacy (`Casks:`) header styles emitted by Homebrew 2.x/4.x.
native-map: brew search now routes by flag — --cask|--casks to brew_casks_searchable, --formula|--formulae to brew_formulae_searchable, bare to brew_packages_searchable. specs/brew.json: install/edit/home/abv args switch from brew_formulae_searchable to brew_packages_searchable since these subcommands accept both formulae and casks. Adds args to the search subcommand with brew_packages_searchable. applyBrewNativeProviderFixups maps `brew formulae` scripts to brew_packages_searchable for consistency with the hand-edited spec so re-running the converter is a no-op.
a412d3b to
97c46c9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
brew_formulae_searchablenow consultsctx.current_token: typed queries callbrew search <q>instead of empty search + cap, which only applies to empty-query exploration.brew_casks_searchable(brew search --cask <q>) andbrew_packages_searchable(formulae+casks union) providers, plus parsers for both modern (==> Casks) and legacy (Casks:) Homebrew header styles.tools/fig-converter/src/native-map.jsroutesbrew search --cask|--casks→brew_casks_searchable,--formula|--formulae→brew_formulae_searchable, bare →brew_packages_searchable;specs/brew.jsonswitches install/edit/home/abv/search args tobrew_packages_searchable(Fig spec model cannot do flag-conditional routing, so the union is the honest choice).References: docs/plans/0.17-polish-and-trust/5-macos-smart-completions/plan.md Tasks 3–5
Test plan
cargo test -p gc-suggest brew(21/21 in providers_brew, 3/3 new brew goldens)cargo test -p gc-suggest --test golden_specs brewnpm --prefix tools/fig-converter test(322/322 incl. newbrew searchrouting tests)cargo clippy --all-targets -- -D warningscargo fmt --check