39728 Commits

Author SHA1 Message Date
Douglas Eichelberger
cfa3f9278d
Merge pull request #17030 from Homebrew/strict-parser
Enable strict typing in `CLI::Parser`
2024-04-21 14:49:38 -07:00
Douglas Eichelberger
c1bacaea4a Revert prism bump 2024-04-21 14:40:41 -07:00
Douglas Eichelberger
11720132bb cleanup 2024-04-21 14:34:55 -07:00
Mike McQuaid
ed6f3064e5 cli/parser: improve mutable constant comment. 2024-04-21 14:16:26 -07:00
Douglas Eichelberger
98d36c30c5 Apply suggestions from code review
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2024-04-21 14:16:25 -07:00
Douglas Eichelberger
cb71938fff Enable strict typing in CLI::Parser 2024-04-21 14:16:25 -07:00
Mike McQuaid
eead9dd625
Merge pull request #17121 from daeho-ro/livecheck-ssh-git
download_strategy: add ssh://git scheme for git download strategy
2024-04-21 20:03:34 +01:00
Mike McQuaid
c9d5b4ae90
Merge pull request #17116 from branchvincent/ignore-home
formula: configure git/npm to ignore .brew_home
2024-04-21 19:58:52 +01:00
Mike McQuaid
2ab0af6f59
Merge pull request #17110 from Homebrew/tap-new-improvements
dev-cmd/tap-new: various improvements
2024-04-21 19:56:11 +01:00
Daeho Ro
5680ffe2e6 add ssh://git scheme for git download strategy 2024-04-21 18:57:04 +09:00
Patrick Linnane
8810b7f041
Merge pull request #17119 from Homebrew/dependabot/bundler/Library/Homebrew/multi-817dfa0ff9 2024-04-20 18:43:34 -07:00
BrewTestBot
15b249575b
brew vendor-gems: commit updates. 2024-04-21 01:33:14 +00:00
dependabot[bot]
35c724c0a2
build(deps): bump sorbet-runtime and sorbet-static-and-runtime
Bumps [sorbet-runtime](https://github.com/sorbet/sorbet) and [sorbet-static-and-runtime](https://github.com/sorbet/sorbet). These dependencies needed to be updated together.

Updates `sorbet-runtime` from 0.5.11351 to 0.5.11352
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `sorbet-static-and-runtime` from 0.5.11351 to 0.5.11352
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

---
updated-dependencies:
- dependency-name: sorbet-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: sorbet-static-and-runtime
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-21 01:32:23 +00:00
Ruoyu Zhong
401500e70a
Merge pull request #17115 from Homebrew/dependabot/bundler/Library/Homebrew/multi-4c7f517a6b
build(deps): bump sorbet-static-and-runtime and sorbet-runtime in /Library/Homebrew
2024-04-20 05:29:31 +08:00
Branch Vincent
46a3bbe3c5
formula: configure git/npm to ignore .brew_home 2024-04-19 11:45:25 -07:00
BrewTestBot
3c8c8b9259
brew vendor-gems: commit updates. 2024-04-19 18:12:02 +00:00
BrewTestBot
069a3cd7a3
Update RBI files for rbi.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2024-04-19 18:11:40 +00:00
dependabot[bot]
590982d05a
build(deps): bump sorbet-static-and-runtime and sorbet-runtime
Bumps [sorbet-static-and-runtime](https://github.com/sorbet/sorbet) and [sorbet-runtime](https://github.com/sorbet/sorbet). These dependencies needed to be updated together.

Updates `sorbet-static-and-runtime` from 0.5.11350 to 0.5.11351
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `sorbet-runtime` from 0.5.11350 to 0.5.11351
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

---
updated-dependencies:
- dependency-name: sorbet-static-and-runtime
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: sorbet-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-19 18:11:11 +00:00
BrewTestBot
716ad73106
brew vendor-gems: commit updates. 2024-04-19 18:11:09 +00:00
dependabot[bot]
358f1ba91a
build(deps-dev): bump rbi from 0.1.10 to 0.1.11 in /Library/Homebrew
Bumps [rbi](https://github.com/Shopify/rbi) from 0.1.10 to 0.1.11.
- [Release notes](https://github.com/Shopify/rbi/releases)
- [Commits](https://github.com/Shopify/rbi/compare/v0.1.10...v0.1.11)

---
updated-dependencies:
- dependency-name: rbi
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-19 18:10:17 +00:00
Ruoyu Zhong
ea37708591
dev-cmd/tap-new: simplify 2024-04-19 23:14:35 +08:00
Mike McQuaid
47c2c6deed
Merge pull request #17106 from woodruffw-forks/ww/upgrade-fix-attestation
ensure_executable!: add opt_bin path to search
2024-04-19 08:36:18 +01:00
Ruoyu Zhong
82ad03fe28
dev-cmd/tap-new: various improvements
1. Update `actions/cache` to `v4`.
2. Unset GitHub Packages tokens if unused.
3. Quote shell variables.
2024-04-19 11:10:29 +08:00
Ruoyu Zhong
7e43853216
dev-cmd/tap-new: fix GitHub Packages user
It should be `github.repository_owner` rather than `github.actor`.
2024-04-19 11:09:58 +08:00
Ruoyu Zhong
adbe6edc84
dev-cmd/tap-new: use actions/upload-artifact@v4 2024-04-19 11:09:56 +08:00
Ruoyu Zhong
54a5690391
dev-cmd/tap-new: throw an error when tap is installed 2024-04-19 11:02:25 +08:00
William Woodruff
0f0dee42b4
ensure_executable!: add opt_bin path to search
Signed-off-by: William Woodruff <william@yossarian.net>
2024-04-18 11:11:26 -07:00
Ruoyu Zhong
03bf6cc431
Merge pull request #17105 from Homebrew/dependabot/bundler/Library/Homebrew/multi-9dafcbff1e
build(deps): bump sorbet-static-and-runtime and sorbet-runtime in /Library/Homebrew
2024-04-19 01:31:33 +08:00
BrewTestBot
ace7cf02e9
brew vendor-gems: commit updates. 2024-04-18 17:19:17 +00:00
dependabot[bot]
00c97f3b54
build(deps): bump sorbet-static-and-runtime and sorbet-runtime
Bumps [sorbet-static-and-runtime](https://github.com/sorbet/sorbet) and [sorbet-runtime](https://github.com/sorbet/sorbet). These dependencies needed to be updated together.

Updates `sorbet-static-and-runtime` from 0.5.11349 to 0.5.11350
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `sorbet-runtime` from 0.5.11349 to 0.5.11350
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

---
updated-dependencies:
- dependency-name: sorbet-static-and-runtime
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: sorbet-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-18 17:18:19 +00:00
Carlo Cabrera
4f31a3e8df
extend/ENV/super: avoid adding llvm to HOMEBREW_LIBRARY_PATHS
This leads to undesired linkage with LLVM's `libunwind` (because it
shadows the system's `libunwind`).

See, for example, Homebrew/homebrew-core#169354.
2024-04-18 23:15:47 +08:00
Mike McQuaid
3c72da93b9
Merge pull request #17102 from Homebrew/only-brew-desc-search-needs-eval-all
Only `brew desc --search` needs `--eval-all`
2024-04-18 10:30:41 +01:00
Issy Long
151e2faffa
Merge pull request #17010 from Homebrew/bye-byebug
Bye `byebug`, hi `debug`!
2024-04-18 10:30:19 +01:00
Issy Long
69c31d275f
Only brew desc --search needs --eval-all
- It was suggested in https://github.com/Homebrew/brew/issues/ 16733 that
  `brew desc <formula_or_cask>` should work like `brew info <formula_or_cask>`
  and print the description of the package without needing `--eval-all`.
- Looking at the code, it seems like it's only searching that needs
  `--eval-all`, so limit the check to that.

Before:

```shell
$ brew desc hello
Error: `brew desc` needs `--eval-all` passed or `HOMEBREW_EVAL_ALL` set!
```

After:

```shell
$ brew desc hello
hello: Program providing model for GNU coding standards and practices

$ brew desc --search hello
Error: Invalid usage: `brew desc --search` needs `--eval-all` passed or `HOMEBREW_EVAL_ALL` set!

$ brew desc --search --eval-all hello
==> Formulae
dsh: Dancer's shell, or distributed shell
hello: Program providing model for GNU coding standards and practices
```
2024-04-17 23:54:45 +01:00
Issy Long
4c64193b9b
Set HOMEBREW_DEBUG when running brew tests --debug
- This will cause the "debug" gem to be required in `spec_helper.rb`, so we can do interactive debugging.
2024-04-17 23:26:40 +01:00
Issy Long
9cf5334469
Load debug.so extensions along with the debug gem itself
- This doesn't work still, but now for new reasons.

```
     NoMethodError:
       undefined method `b' for #<Binding:0x0000000107a7e088>

             binding.b
                    ^^
     # ./test/migrator_spec.rb:72:in `block (3 levels) in <top (required)>'
```

and if I add `require "debug"` to the spec_helper again it gives:

```
LoadError:
  cannot load such file -- debug
```

but, doing a `require "debug"; binding.b` in `migrator_spec` _does_ work.

Where is the require coming from where it works some of the time but not through all of the layers we have?
2024-04-17 23:26:40 +01: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
621e51a6c9
Don't require "debug" in brew tests - it's in our RSpec config 2024-04-17 22:25:12 +01:00
Issy Long
f2a64f3808
Fix RuboCop and exclude psych from RBI generation 2024-04-17 22:25:12 +01:00
Issy Long
1daeb5bee0
Set up the debug gem for test debugging
- This processed that we'd requested a debugger, but didn't drop us into
  a debugging console until I
  [stopped the stdin disablement](https://github.com/Homebrew/brew/issues/16708#issuecomment-1953483970).

Usage:

```
❯ git diff
diff --git a/Library/Homebrew/test/migrator_spec.rb b/Library/Homebrew/test/migrator_spec.rb
index 87fadd5e95..db4700810a 100644
--- a/Library/Homebrew/test/migrator_spec.rb
+++ b/Library/Homebrew/test/migrator_spec.rb
@@ -69,6 +69,8 @@ RSpec.describe Migrator do
       tab.source["tap"] = "homebrew/core"
       tab.write

+      binding.break
+
       expect do
         described_class.new(new_formula, "oldname")
       end.to raise_error(Migrator::MigratorDifferentTapsError)

issyl0 at pictor in /opt/homebrew on bye-byebug
❯ brew tests --only=migrator --debug
Randomized with seed 59158
1 process for 1 spec, ~ 1 spec per process
.==> Relinking newname
.==> Unlinking oldname
...==> Moving oldname versions to /private/tmp/homebrew-tests-20240403-85464-3uogqr/cellar/newname
....==> Migrating formula oldname to newname
==> Unlinking oldname
==> Moving oldname versions to /private/tmp/homebrew-tests-20240403-85464-3uogqr/cellar/newname
==> Relinking newname
....[67, 76] in ~/migrator_spec.rb
    67|       tab = Tab.empty
    68|       tab.tabfile = HOMEBREW_CELLAR/"oldname/0.1/INSTALL_RECEIPT.json"
    69|       tab.source["tap"] = "homebrew/core"
    70|       tab.write
    71|
=>  72|       binding.break
    73|
    74|       expect do
    75|         described_class.new(new_formula, "oldname")
    76|       end.to raise_error(Migrator::MigratorDifferentTapsError)
=>#0    block in <top (required)> (3 levels) at ~/migrator_spec.rb:72
  #1    [C] BasicObject#instance_exec at /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.13.0/lib/rspec/core/example.rb:263
  # and 68 frames (use `bt' command for all frames)
(rdbg@/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/bin/rspec#85464) p tab
(rdbg@/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/bin/rspec#85464) p    # command(rdbg@/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/bin/rspec#85464) p     # command t    # command ta    # command tab    # command(rdbg@/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/bin/rspec#85464) p tab    # command
=> #<Tab:0x0000000107156be0 @aliases=[], @arch=nil, @built_as_bottle=false, @built_on={"os"=>"Macintosh", "os_version"=>"macOS 14", "cpu_family"=>"arm_firestorm_icestorm"}, @compiler=:clang, @homebrew_version="4.2.16-55-gc8f60ec-dirty", @installed_as_dependency=false, @installed_on_request=false, @loaded_from_api=false, @poured_from_bottle=false, @runtime_dependencies=nil, @source={"path"=>nil, "tap"=>"homebrew/core", "tap_git_head"=>nil, "spec"=>"stable", "versions"=>{"stable"=>nil, "head"=>nil, "version_scheme"=>0}}, @source_modified_time=0, @stdlib=nil, @tabfile=#<Pathname:/private/tmp/homebrew-tests-20240403-85464-3uogqr/cellar/oldname/0.1/INSTALL_RECEIPT.json>, @time=nil, @unused_options=[], @used_options=[]>
(rdbg@/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/bin/rspec#85464)
```
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
Patrick Linnane
929995c810
Merge pull request #17100 from krehel/array-alphabetization-blank-line-fix 2024-04-17 11:33:00 -07:00
Patrick Linnane
6b2c5f4447
Merge pull request #17101 from Homebrew/dependabot/bundler/Library/Homebrew/multi-37fc522a2f 2024-04-17 11:23:17 -07:00
Justin Krehel
36cc201616
rubocops/cask/array_alphabetization: skip blank lines when sorting 2024-04-17 14:22:48 -04:00
BrewTestBot
c293f96a80
brew vendor-gems: commit updates. 2024-04-17 18:11:40 +00:00
dependabot[bot]
d33e0e0b09
build(deps): bump sorbet-static-and-runtime and sorbet-runtime
Bumps [sorbet-static-and-runtime](https://github.com/sorbet/sorbet) and [sorbet-runtime](https://github.com/sorbet/sorbet). These dependencies needed to be updated together.

Updates `sorbet-static-and-runtime` from 0.5.11347 to 0.5.11349
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `sorbet-runtime` from 0.5.11347 to 0.5.11349
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

---
updated-dependencies:
- dependency-name: sorbet-static-and-runtime
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: sorbet-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-17 18:10:51 +00:00
Carlo Cabrera
2548b75132
Merge pull request #17099 from Homebrew/sponsors-maintainers-man-completions 2024-04-18 00:59:55 +08:00
Ruoyu Zhong
84d731888e
Merge pull request #17097 from ZhongRuoyu/artifact-actions-v4
pr-pull: support globbing artifacts
2024-04-18 00:58:44 +08:00
Ruoyu Zhong
c98629560d
Update manpage and completions 2024-04-18 00:47:05 +08:00