Mike McQuaid
97ad3567d1
Optimise more command handling/speed
...
- in `brew.sh` split the `case` into those cases that take a single or
no arguments and those that take multiple arguments or handle
multiple commands. This considerably speeds up the
`brew shellenv bash` case that wasn't being handled here before.
- add `setup-ruby` to the list of commands that can be called quickly
by `brew.sh` without additional setup. This speeds up the
`brew setup-ruby` no-op case by ~10x.
- add a parameter to `setup-ruby` to avoid running Bundler if the
command doesn't need it. This makes many more cases for
`brew setup-ruby` to be no-op cases.
- Remove the (now) unused `HOMEBREW_RUBY3` check in `setup-ruby`.
- Improve argument handling in `command_path.sh` to allow it to be
used as a function in `setup-ruby.sh`.
- Add a new RuboCop to check usage of `install_bundler_gems!` is only
inside `dev-cmd` (or a few other acceptable places).
- Use new `processed_source.file_path` API in `formula_cop.rb`
2024-04-30 12:48:29 +01:00
Mike McQuaid
60657d382b
Merge pull request #17185 from Homebrew/install_bundler_gems_consistently
...
Call `Homebrew.install_bundler_gems!` more consistently.
2024-04-30 12:17:24 +01:00
Mike McQuaid
4ffcd8a110
Various improvements for brew command
...
- Add a (large) speedup by moving some logic to Bash for the typical
case of a normal or dev-cmd, Bash or Ruby command.
- Make `brew command` a non-developer command, I don't think it makes
sense to consider it something needed for developing Homebrew.
- Update the manpage/tests/RBI accordingly.
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
2024-04-30 11:38:19 +01:00
Mike McQuaid
c9c8806be8
Merge pull request #17184 from reitermarkus/unneeded-extend
...
Remove disabled `extend`.
2024-04-30 10:48:58 +01:00
Mike McQuaid
aa6ea4be83
Call Homebrew.install_bundler_gems!
more consistently.
...
- Call `Homebrew.install_bundler_gems!` as early as possible
- Always call `Homebrew.install_bundler_gems!` in `dev-cmd` rather than
in `Library/Homebrew` helpers method (to ensure we don't accidentally
call this for non-dev-cmd commands)
2024-04-30 10:39:35 +01:00
Markus Reiter
f7361c8d29
Remove disabled extend
.
2024-04-30 11:01:12 +02:00
Mike McQuaid
65f3df92d2
install-bundler-gems: change_privilege
when necessary.
...
This ensures that gems are able to be installed when using e.g.
`ruby -I` in their installation scripts.
2024-04-30 09:21:12 +01:00
Carlo Cabrera
25d8c07a31
Merge pull request #17179 from Homebrew/auto_update_tap
2024-04-30 09:02:53 +01:00
Carlo Cabrera
7690eb3e61
Merge pull request #17182 from boblail/lail/warn+continue-when-unable-to-find-related-issues
2024-04-30 07:15:26 +01:00
Bob
461f49dcb6
fix: Display a warning but continue execution when dumping an exception and unable to find related issues
...
Occasionally, when failing to `brew install` or `brew upgrade` a formula, users will get an error message and the last line of it will be:
```
Error: Validation Failed: [{"message"=>"The listed users and repositories cannot be searched either because the resources do not exist or you do not have permission to view them.", "resource"=>"Search", "field"=>"q", "code"=>"invalid"}]
```
Here's an old public example: https://gitlab.com/tabos/rogerrouter/-/issues/21
At Square, this error can be caused by a transient issue with a user's GitHub credentials.
My proposal is that any error which prevents `brew` from showing related issues should:
1. Not cause `brew` to exit early (vs. printing diagnostic checks and doing any other cleanup)
2. Be clearly differentiated from the original failure (so it doesn't become a red herring for users troubleshooting their broken formula)
2024-04-29 11:47:01 -07:00
Mike McQuaid
ef1e365e43
Merge pull request #17180 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-sorbet-0.8.3
...
build(deps-dev): bump rubocop-sorbet from 0.8.2 to 0.8.3 in /Library/Homebrew
2024-04-29 19:21:43 +01:00
BrewTestBot
6616363fe4
Update RBI files for rubocop-ast.
...
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml ) workflow.
2024-04-29 18:11:05 +00:00
BrewTestBot
dbce7a8064
brew vendor-gems: commit updates.
2024-04-29 18:10:46 +00:00
BrewTestBot
16a7e56074
brew vendor-gems: commit updates.
2024-04-29 18:10:21 +00:00
dependabot[bot]
3fe63ed300
build(deps-dev): bump rubocop-ast in /Library/Homebrew
...
Bumps [rubocop-ast](https://github.com/rubocop/rubocop-ast ) from 1.31.2 to 1.31.3.
- [Release notes](https://github.com/rubocop/rubocop-ast/releases )
- [Changelog](https://github.com/rubocop/rubocop-ast/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rubocop/rubocop-ast/compare/v1.31.2...v1.31.3 )
---
updated-dependencies:
- dependency-name: rubocop-ast
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 18:09:45 +00:00
dependabot[bot]
55e5253ea3
build(deps-dev): bump rubocop-sorbet in /Library/Homebrew
...
Bumps [rubocop-sorbet](https://github.com/shopify/rubocop-sorbet ) from 0.8.2 to 0.8.3.
- [Release notes](https://github.com/shopify/rubocop-sorbet/releases )
- [Commits](https://github.com/shopify/rubocop-sorbet/compare/v0.8.2...v0.8.3 )
---
updated-dependencies:
- dependency-name: rubocop-sorbet
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 18:09:18 +00:00
Mike McQuaid
ef49b5a537
brew.sh: auto-update 3rd-party taps more often.
...
When doing an `install`, `outdated` or `upgrade` and referring to a
formula or cask in a specific tap: you probably want to get the latest
version of that formula/cask more often than the default 1 or 24 hours.
Let's check for arguments for these commands that look appropriate and
auto-update every 5 minutes in that case.
2024-04-29 17:42:51 +01:00
Mike McQuaid
279f42a39c
startup/bootsnap: improve syntax.
...
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
2024-04-29 17:42:34 +01:00
Mike McQuaid
c55a5e30dd
startup/bootsnap: raise repeated LoadError
.
...
If `HOMEBREW_BOOTSNAP_RETRY` was set then we should raise the
`LoadError` the second time so that the failures are user visible for
debugging.
2024-04-29 17:30:27 +01:00
Carlo Cabrera
c076a46c19
Merge pull request #17169 from Homebrew/no-oso_prefix-configure
2024-04-29 10:57:37 +01:00
Mike McQuaid
db22da9b50
Merge pull request #17168 from reitermarkus/tab-for-keg
...
Document `Tab.for_keg` and use `Keg#tab` where possible.
2024-04-29 08:35:17 +01:00
Patrick Linnane
4745329ebd
Merge pull request #17174 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-1.63.4
2024-04-28 20:03:15 -07:00
BrewTestBot
47ca0554fb
Update RBI files for rubocop.
...
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml ) workflow.
2024-04-29 02:52:36 +00:00
BrewTestBot
1648e04e1b
brew vendor-gems: commit updates.
2024-04-29 02:48:26 +00:00
BrewTestBot
b209beee2f
brew vendor-gems: commit updates.
2024-04-29 02:47:52 +00:00
dependabot[bot]
e0129ab263
build(deps-dev): bump rubocop from 1.63.3 to 1.63.4 in /Library/Homebrew
...
Bumps [rubocop](https://github.com/rubocop/rubocop ) from 1.63.3 to 1.63.4.
- [Release notes](https://github.com/rubocop/rubocop/releases )
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rubocop/rubocop/compare/v1.63.3...v1.63.4 )
---
updated-dependencies:
- dependency-name: rubocop
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 02:47:32 +00:00
dependabot[bot]
bebce9fa0b
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.11358 to 0.5.11361
- [Release notes](https://github.com/sorbet/sorbet/releases )
- [Commits](https://github.com/sorbet/sorbet/commits )
Updates `sorbet-static-and-runtime` from 0.5.11358 to 0.5.11361
- [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-29 02:47:00 +00:00
Markus Reiter
0b56d0be4a
Document Tab.for_keg
and use Keg#tab
where possible.
2024-04-28 20:50:13 +02:00
Markus Reiter
c26d10e4cb
Merge pull request #17170 from alebcay/backtrace-strict-typing
2024-04-28 20:33:54 +02:00
Caleb Xu
985cc83008
utils/gzip: enable strict typing
2024-04-28 02:37:18 -04:00
Caleb Xu
783e72dc59
utils/backtrace: enable strict typing
2024-04-28 02:36:19 -04:00
Carlo Cabrera
c3c61767c7
shims/super/cc: avoid passing -oso_prefix
during configure
...
Fixes `configure` failures in Homebrew/homebrew-core#169893 .
2024-04-28 12:42:04 +08:00
apainintheneck
541305ae98
Update internal json v3 formula tests
2024-04-27 18:07:54 -07:00
apainintheneck
ff0c24786b
Unpack new internal json v3 dep format
2024-04-27 18:07:54 -07:00
apainintheneck
039eb1adff
Update formula internal json v3 to improve dependencies readability
...
This improves the readability of dependencies in the json we
produce for this internally.
2024-04-27 18:07:54 -07:00
Carlo Cabrera
5e027bffd6
Merge pull request #17149 from alebcay/elf-expand-origin
...
elf: expand $ORIGIN in RUNPATH/RPATH entries
2024-04-28 01:14:54 +08:00
BrewTestBot
8857272d51
sorbet: Update RBI files.
...
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml ) workflow.
2024-04-27 00:19:14 +00:00
Mike McQuaid
0ecac81e33
Merge pull request #17162 from Homebrew/dependabot/bundler/Library/Homebrew/multi-9e1968957b
...
build(deps): bump sorbet-static-and-runtime and sorbet-runtime in /Library/Homebrew
2024-04-26 19:35:02 +01:00
Mike McQuaid
aecf3c5a1f
Merge pull request #17161 from Homebrew/dependabot/bundler/Library/Homebrew/parallel_tests-4.7.1
...
build(deps-dev): bump parallel_tests from 4.7.0 to 4.7.1 in /Library/Homebrew
2024-04-26 19:32:10 +01:00
Mike McQuaid
08301776cc
Merge pull request #17160 from Homebrew/dependabot/bundler/Library/Homebrew/simpleidn-0.2.2
...
build(deps-dev): bump simpleidn from 0.2.1 to 0.2.2 in /Library/Homebrew
2024-04-26 19:28:03 +01:00
BrewTestBot
e5ccaf1976
brew vendor-gems: commit updates.
2024-04-26 18:18:37 +00:00
BrewTestBot
ce52e822ec
Update RBI files for parallel_tests.
...
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml ) workflow.
2024-04-26 18:17:42 +00:00
BrewTestBot
bb942f55ac
brew vendor-gems: commit updates.
2024-04-26 18:17:29 +00:00
dependabot[bot]
62295e57e4
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.11357 to 0.5.11358
- [Release notes](https://github.com/sorbet/sorbet/releases )
- [Commits](https://github.com/sorbet/sorbet/commits )
Updates `sorbet-runtime` from 0.5.11357 to 0.5.11358
- [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-26 18:17:27 +00:00
BrewTestBot
ea2e70bcf3
brew vendor-gems: commit updates.
2024-04-26 18:17:09 +00:00
dependabot[bot]
b0cea93d31
build(deps-dev): bump parallel_tests in /Library/Homebrew
...
Bumps [parallel_tests](https://github.com/grosser/parallel_tests ) from 4.7.0 to 4.7.1.
- [Changelog](https://github.com/grosser/parallel_tests/blob/master/CHANGELOG.md )
- [Commits](https://github.com/grosser/parallel_tests/compare/v4.7.0...v4.7.1 )
---
updated-dependencies:
- dependency-name: parallel_tests
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-04-26 18:16:34 +00:00
dependabot[bot]
efd5f81f38
build(deps-dev): bump simpleidn from 0.2.1 to 0.2.2 in /Library/Homebrew
...
Bumps [simpleidn](https://github.com/mmriis/simpleidn ) from 0.2.1 to 0.2.2.
- [Commits](https://github.com/mmriis/simpleidn/commits )
---
updated-dependencies:
- dependency-name: simpleidn
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-04-26 18:16:04 +00:00
Markus Reiter
0f0055ede4
Make documentation @api private
by default.
2024-04-26 19:04:20 +02:00
Mike McQuaid
ecd96a2c51
utils/analytics: revert a test-bot analytics change.
...
https://github.com/Homebrew/brew/pull/17154#discussion_r1581102553 was
ignored by auto-merge, whoops.
2024-04-26 15:24:12 +01:00
Mike McQuaid
af0f115a23
Merge pull request #17154 from Homebrew/cleanup_test_bot_analytics
...
utils/analytics: cleanup test-bot analytics.
2024-04-26 15:16:14 +01:00