diff --git a/Library/Homebrew/dev-cmd/typecheck.rb b/Library/Homebrew/dev-cmd/typecheck.rb index 7f1c41e541..961b10adfd 100644 --- a/Library/Homebrew/dev-cmd/typecheck.rb +++ b/Library/Homebrew/dev-cmd/typecheck.rb @@ -20,6 +20,9 @@ module Homebrew description: "Silence all non-critical errors." switch "--update", description: "Update RBI files." + switch "--all", + depends_on: "--update", + description: "Regenerate all RBI files rather than just updated gems." switch "--suggest-typed", depends_on: "--update", description: "Try upgrading `typed` sigils." @@ -52,9 +55,11 @@ module Homebrew "did_you_mean", # RBI file is already provided by Sorbet "webrobots", # RBI file is bugged ] + tapioca_args = ["--exclude", *excluded_gems] + tapioca_args << "--all" if args.all? ohai "Updating Tapioca RBI files..." - system "bundle", "exec", "tapioca", "gem", "--exclude", *excluded_gems + system "bundle", "exec", "tapioca", "gem", *tapioca_args system "bundle", "exec", "parlour" system "bundle", "exec", "srb", "rbi", "hidden-definitions" system "bundle", "exec", "srb", "rbi", "todo" diff --git a/completions/bash/brew b/completions/bash/brew index dcf076a250..fc313f57e4 100644 --- a/completions/bash/brew +++ b/completions/bash/brew @@ -1965,6 +1965,7 @@ _brew_tc() { case "${cur}" in -*) __brewcomp " + --all --debug --dir --fail-if-not-changed @@ -2033,6 +2034,7 @@ _brew_typecheck() { case "${cur}" in -*) __brewcomp " + --all --debug --dir --fail-if-not-changed diff --git a/completions/fish/brew.fish b/completions/fish/brew.fish index 4aa29c4e02..7e618a2bb3 100644 --- a/completions/fish/brew.fish +++ b/completions/fish/brew.fish @@ -1333,6 +1333,7 @@ __fish_brew_complete_arg 'tap-new' -a '(__fish_brew_suggest_taps_installed)' __fish_brew_complete_cmd 'tc' 'Check for typechecking errors using Sorbet' +__fish_brew_complete_arg 'tc' -l all -d 'Regenerate all RBI files rather than just updated gems' __fish_brew_complete_arg 'tc' -l debug -d 'Display any debugging information' __fish_brew_complete_arg 'tc' -l dir -d 'Typecheck all files in a specific directory' __fish_brew_complete_arg 'tc' -l fail-if-not-changed -d 'Return a failing status code if all gems are up to date and gem definitions do not need a tapioca update' @@ -1374,6 +1375,7 @@ __fish_brew_complete_arg 'tests' -l verbose -d 'Make some output more verbose' __fish_brew_complete_cmd 'typecheck' 'Check for typechecking errors using Sorbet' +__fish_brew_complete_arg 'typecheck' -l all -d 'Regenerate all RBI files rather than just updated gems' __fish_brew_complete_arg 'typecheck' -l debug -d 'Display any debugging information' __fish_brew_complete_arg 'typecheck' -l dir -d 'Typecheck all files in a specific directory' __fish_brew_complete_arg 'typecheck' -l fail-if-not-changed -d 'Return a failing status code if all gems are up to date and gem definitions do not need a tapioca update' diff --git a/completions/zsh/_brew b/completions/zsh/_brew index 6ef8bf878c..cb0c5c80ca 100644 --- a/completions/zsh/_brew +++ b/completions/zsh/_brew @@ -1631,6 +1631,7 @@ _brew_tap_new() { # brew tc _brew_tc() { _arguments \ + '--all[Regenerate all RBI files rather than just updated gems]' \ '--debug[Display any debugging information]' \ '(--file)--dir[Typecheck all files in a specific directory]' \ '--fail-if-not-changed[Return a failing status code if all gems are up to date and gem definitions do not need a tapioca update]' \ @@ -1679,6 +1680,7 @@ _brew_tests() { # brew typecheck _brew_typecheck() { _arguments \ + '--all[Regenerate all RBI files rather than just updated gems]' \ '--debug[Display any debugging information]' \ '(--file)--dir[Typecheck all files in a specific directory]' \ '--fail-if-not-changed[Return a failing status code if all gems are up to date and gem definitions do not need a tapioca update]' \ diff --git a/docs/Manpage.md b/docs/Manpage.md index fefb74d3c1..692ade7c6e 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -1478,6 +1478,8 @@ Check for typechecking errors using Sorbet. Silence all non-critical errors. * `--update`: Update RBI files. +* `--all`: + Regenerate all RBI files rather than just updated gems. * `--suggest-typed`: Try upgrading `typed` sigils. * `--fail-if-not-changed`: diff --git a/manpages/brew.1 b/manpages/brew.1 index daf8a98ff4..b3e2dda1d0 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BREW" "1" "March 2022" "Homebrew" "brew" +.TH "BREW" "1" "May 2022" "Homebrew" "brew" . .SH "NAME" \fBbrew\fR \- The Missing Package Manager for macOS (or Linux) @@ -2106,6 +2106,10 @@ Silence all non\-critical errors\. Update RBI files\. . .TP +\fB\-\-all\fR +Regenerate all RBI files rather than just updated gems\. +. +.TP \fB\-\-suggest\-typed\fR Try upgrading \fBtyped\fR sigils\. .