68 Commits

Author SHA1 Message Date
Douglas Eichelberger
b3b6c147fb
perf: rubocop/tapioca parser optimizations 2025-04-01 21:26:09 -07:00
Douglas Eichelberger
f181e4251b
Include RBS rbi 2025-03-12 13:43:55 -07:00
Douglas Eichelberger
1494a471dd
remove lint_roller from tapioca exclusions 2025-03-04 11:36:01 -08:00
Douglas Eichelberger
fcf18912fe
Inline use of attr_predicate 2025-03-02 21:36:03 -08:00
Douglas Eichelberger
3ef22f3181
Inline use of attr_rw 2025-02-23 13:18:49 -08:00
Douglas Eichelberger
bafce2a81f Exclude lint_roller from git and rbi_generation 2025-02-17 18:56:31 -08:00
Douglas Eichelberger
d8c790dddc Use delegation to create Cask DSL methods 2025-02-11 08:33:04 -08:00
Mike McQuaid
6f99704a64
Import brew formula-analytics and generate-analytics-api commands
Import these from the homebrew/formula-analytics tap and deprecate
that tap.

This required a little messing around with filenames and paths to get
it finding Python and writing to the user's home directory.
2025-02-07 20:05:05 +00:00
Issy Long
9a97456767
Bump more Cask RuboCops to Sorbet typed: strict
- This includes a new Tapioca compiler for
  `RuboCop::Cask::AST::Stanza` dynamic methods like
  `caveats?`.
2025-01-25 18:45:24 +00:00
Douglas Eichelberger
e4e88fa026 Exclude unnecessary gems 2025-01-12 10:59:26 -08:00
Douglas Eichelberger
78cb073b38 Exclude stdlib gems from tapioca RBI generation 2025-01-12 10:44:45 -08:00
Douglas Eichelberger
ac7009cc23 Exclude benchmark from rbi generation and git 2025-01-10 18:17:05 -08:00
Douglas Eichelberger
3a4243742f Remove OpenStruct from CLI::Args 2024-12-08 10:27:49 -08:00
Douglas Eichelberger
54c58ef572 Add additional parser/current require 2024-11-01 17:59:12 -07:00
Douglas Eichelberger
70641dcb58 Remove casts 2024-10-14 21:45:50 -07:00
Douglas Eichelberger
ced4a3a91f Migrate Parlour extensions to Tapioca compilers 2024-10-14 19:50:09 -07:00
Douglas Eichelberger
6eaf122144 Add a Delegator DSL compiler 2024-10-05 19:36:54 -07:00
Douglas Eichelberger
46e209f1b0
Un-exclude rubocop-rspec from rbi generation 2024-10-02 10:03:16 -07:00
Douglas Eichelberger
eeb31d3050 Fix violations 2024-09-20 11:07:00 -07:00
Douglas Eichelberger
df2fcfdfb0 Add missing sigs 2024-08-15 09:21:43 -07:00
Douglas Eichelberger
70b072a7d0 Suppress sorbet type errors when using `undef' 2024-08-15 08:03:45 -07:00
Bo Anderson
05d6c06c84
tapioca/compilers/args: remove non-AbstractCommand handling 2024-07-31 17:30:31 +01:00
Bo Anderson
2b454328ca
Remove non-Portable Ruby bootsnap support 2024-06-19 16:08:05 +01:00
Patrick Linnane
cd782582c2
tapioca: remove unnecessary gems
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-06-11 08:43:47 -07:00
Patrick Linnane
6012533487
tapioca/config: remove unf & unf_ext
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-05-22 10:19:54 -07:00
Douglas Eichelberger
7bfa552702 Individually namespace args for each command 2024-04-21 16:51:31 -07:00
Issy Long
073e739005
Use the debug gem from portable Ruby
- This is cleaner than vendoring a whole bunch of new gems and pinning `psych`.
- Thanks for the pointer, Bo!
- It doesn't work, though?

```
❯ brew tests --only=migrator --debug
Error: cannot load such file -- debug/debug.so
Warning: Removed Sorbet lines from backtrace!
Rerun with `--verbose` to see the original backtrace
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug/frame_info.rb:16:in `require'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug/frame_info.rb:16:in `rescue in <module:DEBUGGER__>'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug/frame_info.rb:13:in `<module:DEBUGGER__>'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug/frame_info.rb:3:in `<top (required)>'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug/session.rb:31:in `require_relative'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug/session.rb:31:in `<top (required)>'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug.rb:3:in `require_relative'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug.rb:3:in `<top (required)>'
/opt/homebrew/Library/Homebrew/dev-cmd/tests.rb:48:in `require'
/opt/homebrew/Library/Homebrew/dev-cmd/tests.rb:48:in `run'
/opt/homebrew/Library/Homebrew/brew.rb:89:in `<main>'
```
2024-04-17 23:26:40 +01:00
Issy Long
f2a64f3808
Fix RuboCop and exclude psych from RBI generation 2024-04-17 22:25:12 +01:00
Issy Long
58fbaecedb
Add the debug gem for test debugging 2024-04-17 22:25:10 +01:00
Issy Long
11c1960729
Remove byebug since it doesn't work in tests anymore
- Byebug was introduced in [2020](https://github.com/Homebrew/brew/pull/7577) for hooking into tests for debugging.
- It does not work anymore in so far as it does not stop at breakpoints when following the instructions to trigger them in tests.
2024-04-17 22:24:21 +01:00
Douglas Eichelberger
c404dd9a05 Update tapioca config 2024-04-08 11:58:34 -07:00
Issy Long
75db3b8e21
Apply suggestions from code review
Co-authored-by: Douglas Eichelberger <697964+dduugg@users.noreply.github.com>
2024-03-30 19:54:51 +00:00
Issy Long
9dfe11870e
Convert the EnvConfig RBI generator to a Tapioca compiler 2024-03-30 18:30:20 +00:00
Issy Long
db39e939b0
Apply suggestions from code review 2024-03-30 18:00:39 +00:00
Issy Long
e4a1f3319c
Tty methods are class methods 2024-03-29 00:41:56 +00:00
Issy Long
bbf5825d54
Appease RuboCop 2024-03-29 00:41:56 +00:00
Douglas Eichelberger
769547e7e3
Use create_module instead 2024-03-29 00:41:56 +00:00
Issy Long
05b716613b
Convert the utils/tty RBI generator to a Tapioca compiler
- The preferred way of doing RBI generation is via Tapioca. So I am
  trying to stop being intimidated by it, by learning how it works.
- This is very WIP still, currently failing with the following message
  because the `module` name is missing in the generated RBI file.

```
There are parse errors in the generated RBI files.

Errors:
  sorbet/rbi/dsl/tty.rbi:8: unexpected token tNL (2001)
  sorbet/rbi/dsl/tty.rbi:64: unexpected token "end" (2001)
```
2024-03-29 00:41:56 +00:00
Douglas Eichelberger
a2492c25a2 Remove NON_PARSER_ARGS_METHODS 2024-03-22 09:33:28 -07:00
Douglas Eichelberger
cae62e0175 Update Command API 2024-03-20 10:16:17 -07:00
Douglas Eichelberger
2cc3ce9bb4
Merge pull request #16815 from dduugg/abstract-command
Provide interface and individual namespaces for brew CLI commands
2024-03-18 08:11:52 -07:00
Douglas Eichelberger
820d320835 Remove and refactor rspec-its use 2024-03-17 22:47:37 -07:00
Douglas Eichelberger
133b9382f0 Improve readability 2024-03-17 09:29:40 -07:00
Douglas Eichelberger
4b358fc713 Extract global args 2024-03-16 11:15:03 -07:00
Douglas Eichelberger
625206b0bd Avoid duplicating global options 2024-03-15 16:30:09 -07:00
Douglas Eichelberger
dfa01a5a84 Update args compiler 2024-03-15 14:24:26 -07:00
Douglas Eichelberger
68cce23e15 Add tests 2024-03-13 22:02:03 -07:00
Douglas Eichelberger
5888cd8607 Fix root namespace 2024-03-12 16:34:04 -07:00
Douglas Eichelberger
76932fdf7e Add tapioca compiler for Homebrew::CLI::Args 2024-03-12 16:34:04 -07:00
Bo Anderson
754d580a91
Replace ronn with Kramdown's converter 2024-03-10 22:31:38 +00:00