cmd/version-install: add new command.#21418
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new brew version-install command that simplifies the process of installing specific versions of formulae by combining brew tap-new, brew extract, and brew install operations into a single command.
Changes:
- Introduces a new
version-installcommand that automates the creation of personal taps and extraction/installation of specific formula versions - Updates documentation across multiple files to recommend the new command instead of
brew extract - Adds comprehensive test coverage for various usage scenarios
- Updates shell completions for bash, zsh, and fish
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Library/Homebrew/cmd/version-install.rb | Main command implementation handling formula version extraction and installation |
| Library/Homebrew/test/cmd/version-install_spec.rb | Comprehensive test suite covering multiple scenarios |
| docs/Versions.md | Updated to recommend version-install over extract |
| docs/Tips-and-Tricks.md | Updated command recommendation |
| docs/Manpage.md | Added command documentation |
| docs/FAQ.md | Updated references and formatting changes |
| manpages/brew.1 | Added manpage entry for the command |
| completions/zsh/_brew | Added zsh completion support |
| completions/fish/brew.fish | Added fish completion support |
| completions/bash/brew | Added bash completion support |
| completions/internal_commands_list.txt | Registered new command |
| Library/Homebrew/formulary.rb | Updated error message to reference new command |
| Library/Homebrew/cask/cask_loader.rb | Updated error message to reference new command |
| Library/Homebrew/brew.sh | Simplified developer command warning logic |
| Library/Homebrew/sorbet/rbi/dsl/homebrew/cmd/version_install.rbi | Generated type definitions |
| AGENTS.md | Added development guidelines and improved test recommendations |
Files not reviewed (1)
- Library/Homebrew/sorbet/rbi/dsl/homebrew/cmd/version_install.rbi: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
p-linnane
left a comment
There was a problem hiding this comment.
Utter madness. Let's just ensure we're printing that this is unsupported like building from source.
e740bdb to
f1bbe06
Compare
|
@p-linnane the messaging is: |
This lets people install arbitrary versions by creating their own local non-Git tap if it doesn't already exist and puts formulae in there.
f1bbe06 to
84dd40d
Compare
|
@p-linnane I think if we see people submitting stupid bug reports due to this I can also add a |
Add new command to do
brew tap-new,brew extractandbrew installin one go.People have been complaining about this forever so let's make it marginally easier for them by just wrapping commands we already have.