43 Commits

Author SHA1 Message Date
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
Douglas Eichelberger
c452aaf7f5 Exclude unnecessary gems from tapioca 2024-02-16 15:07:01 -08:00
Douglas Eichelberger
d05e9c5473 Add tapioca config 2024-02-16 15:07:01 -08:00
Douglas Eichelberger
439c8c1819 Tighten up the types 2024-02-11 20:47:22 -08:00
Douglas Eichelberger
aab04229d1 Code review fixes 2024-02-11 20:27:39 -08:00
Douglas Eichelberger
791ca27896 Add rubocop exclusion 2024-02-11 20:27:38 -08:00
Douglas Eichelberger
adfec16871 Make gather_constants dynamic 2024-02-11 20:27:38 -08:00
Douglas Eichelberger
b2dc842238 wip 2024-02-11 20:27:38 -08:00
Douglas Eichelberger
15db90effd Add additional requires support to tapioca 2024-02-01 09:48:30 -08:00
Douglas Eichelberger
bec27d44c6 Remove stray ActiveSupport references 2024-01-26 15:38:13 -08:00
Bo Anderson
89531e9ff3
Update all dependencies 2023-12-15 16:24:46 +00:00
Bo Anderson
ccde121c55
sorbet: fix ActiveSupport RBI 2023-07-22 22:00:29 +01:00
Bo Anderson
883ee7f4a3
sorbet/tapioca/require: make aware of platform-specific gem resolution 2022-11-04 05:42:42 +00:00
Bo Anderson
fd1ea6d5c9
sorbet/tapioca/require: don't start SimpleCov 2022-05-28 04:07:23 +01:00
Bo Anderson
42212b3ce8
sorbet/tapioca/require: ignore sorbet-static-and-runtime 2022-05-28 04:07:02 +01:00
Bo Anderson
14c2afe1d8
Fix empty gem RBIs for non-vendored dependencies 2021-09-10 22:15:15 +01:00
Markus Reiter
61b79318ed Move include Kernel into .rbi files again and split up existing .rbi files. 2020-10-10 19:10:58 +02:00
Markus Reiter
c2a0ba8e87 Enable rubocop-sorbet. 2020-10-09 16:45:13 +02:00
vidusheeamoli
e22f628a2b tapioca: init and sync. 145 errors => 28 errors 2020-06-14 11:40:07 +05:30