32774 Commits

Author SHA1 Message Date
Mike McQuaid
decc109089
Merge pull request #18188 from Homebrew/better-shellenv 2024-08-30 11:56:07 +01:00
Mike McQuaid
85c9c17ddf
Merge pull request #18197 from xycabcd/patch-2 2024-08-30 07:58:56 +01:00
Carlo Cabrera
e3d295ae12
Merge pull request #18203 from Homebrew/sponsorships-error 2024-08-30 11:13:29 +08:00
Carlo Cabrera
ed589c0a19
Merge pull request #18202 from Homebrew/fix-sponsorships-query 2024-08-30 11:02:28 +08:00
Carlo Cabrera
c740bef176
utils/github: improve sponsorships error handling
Let's make sure we get the opportunity to print the errors if the query
response doesn't have the form we expected it to take.
2024-08-30 11:00:53 +08:00
Carlo Cabrera
5897ed80d9
utils/github: fix sponsorships GraphQL query
This fixes the failure in our sponsorships workflow.
2024-08-30 10:50:59 +08:00
Carlo Cabrera
cabbb0b8e3
Remove GraphQL debug output
Let's get this ready to go since we don't want to accidentally leak
private information.
2024-08-30 10:45:19 +08:00
Carlo Cabrera
7645484ac3
utils/github/api: add debug output for open_graphql
Our updating sponsors/maintainers/etc workflow is broken.

Let's add some debug output to help me fix it.
2024-08-30 10:15:56 +08:00
BrewTestBot
6031ce22ff
Update RBI files for thor.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2024-08-29 23:03:10 +00:00
BrewTestBot
f6af1e9d9b
brew vendor-gems: commit updates. 2024-08-29 23:02:56 +00:00
dependabot[bot]
abf98a4743
build(deps-dev): bump thor from 1.3.1 to 1.3.2 in /Library/Homebrew
Bumps [thor](https://github.com/rails/thor) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/rails/thor/releases)
- [Commits](https://github.com/rails/thor/compare/v1.3.1...v1.3.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-29 23:00:53 +00:00
BrewTestBot
16b9b75c6a
brew vendor-gems: commit updates. 2024-08-29 22:42:33 +00:00
xycabcd
147cfa46e4
Deleted the duplicated "PWD check" 2024-08-29 14:45:27 -04:00
dependabot[bot]
61c291fa5e
build(deps-dev): bump sorbet in /Library/Homebrew
Bumps [sorbet](https://github.com/sorbet/sorbet) from 0.5.11549 to 0.5.11551.
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-29 18:30:38 +00:00
Carlo Cabrera
6cd74705cb
shellenv: silence errors from writing to etc/paths file
Users don't need to see this error. We can just fall back silently
instead.
2024-08-29 19:12:23 +08:00
Carlo Cabrera
04088b3e3c
shellenv: extract paths file to a variable
Let's follow the Rule of Three here.
2024-08-29 17:36:50 +08:00
Carlo Cabrera
6dc90cbf83
cmd/shellenv: improve for newer macOS using /usr/libexec/path_helper
On macOS 14 and newer, `/usr/libexec/path_helper` supports setting a
`PATH_HELPER_ROOT` environment variable.

With this set, `path_helper` checks `$PATH_HELPER_ROOT/etc/paths` and
`$PATH_HELPER_ROOT/etc/paths.d` in the same way it checks `/etc/paths`
and `/etc/paths.d`.

We can use this to simplify management of the user's `PATH` variable
when they do `brew shellenv`. In particular, if their system supports
it, we delegate setting the `PATH` environment variable to `path_helper`
instead of our own code. We also write a default `etc/paths` file if one
is not already present.

This is nicer because it simplifies management of the user's `PATH`
variable. For example, if a user wants a keg-only formula to be in their
`PATH`, they can simply add the necessary path to `/etc/paths` or
`/etc/paths.d` without having to do something like `brew link --force`
or adding to `PATH` themselves.

When `/usr/libexec/path_helper` is not available, we just fall back to
the existing code.
2024-08-29 17:00:43 +08:00
Mike McQuaid
638a3dc3a3
Merge pull request #18167 from Homebrew/fix-cask-formula-file-validation-v2 2024-08-29 08:50:44 +01:00
apainintheneck
60b8878f21 tap: share components of formula and cask file path regexes
The goal here is to make things easier to read by better
describing how different regexes are similar to each other.
2024-08-28 19:12:02 -07:00
Michael Cho
06fc2247c7
Merge pull request #18178 from cho-m/github-tag
utils/shared_audits: GitHub urls can have '.' in repo and '/' in tag
2024-08-28 21:55:29 -04:00
BrewTestBot
5d1db45b27
brew vendor-gems: commit updates. 2024-08-28 15:24:28 +00:00
dependabot[bot]
8fee9dc845
build(deps-dev): bump sorbet in /Library/Homebrew
Bumps [sorbet](https://github.com/sorbet/sorbet) from 0.5.11547 to 0.5.11549.
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-28 15:21:32 +00:00
Bo Anderson
f5d39c82c3
Merge pull request #18183 from Homebrew/sandbox-fork-fix
Fix misuse of `fork` in sandbox causing crashes
2024-08-28 15:14:59 +01:00
Bo Anderson
6a0db5035f
Fix misuse of fork in sandbox causing crashes 2024-08-28 13:53:01 +01:00
Carlo Cabrera
01287a742a
Merge pull request #18153 from Homebrew/version-cache-handling 2024-08-28 19:37:15 +08:00
Carlo Cabrera
b63ecff52c
brew.sh: use git diff instead of git diff-index 2024-08-28 19:21:50 +08:00
Carlo Cabrera
a597a1eecb
Reverse order of if conditional
Checking for readability is a cheaper operation that `git diff-index`.
2024-08-28 18:58:27 +08:00
Michael Cho
41009cbc92
Merge pull request #18173 from cho-m/github_packages-license
github_packages: use official license annotation
2024-08-28 00:01:08 -04:00
Carlo Cabrera
62d187dd82
Merge pull request #18166 from Homebrew/runner-spec-formulae 2024-08-28 11:44:24 +08:00
Carlo Cabrera
c61492ac91
Fix logic error in active_runner?
We should only activate a runner when there are deleted formulae if it
isn't a dependent matrix.
2024-08-28 10:50:18 +08:00
BrewTestBot
7c4589f516
brew vendor-gems: commit updates. 2024-08-27 18:32:47 +00:00
dependabot[bot]
d3f9db7e84
build(deps-dev): bump sorbet in /Library/Homebrew
Bumps [sorbet](https://github.com/sorbet/sorbet) from 0.5.11545 to 0.5.11547.
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-27 18:21:53 +00:00
Michael Cho
d1dc3b2206
utils/shared_audits: GitHub urls can have '.' in repo and '/' in tag 2024-08-27 11:39:50 -04:00
Michael Cho
bf320eb4bf
github_packages: use official license annotation
For now we ignore the 256 character limit stated by GitHub packages

https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#labelling-container-images
2024-08-27 10:12:11 -04:00
Mike McQuaid
81d26f8059
Merge pull request #18169 from cho-m/spdx-case-sensitive 2024-08-27 09:28:55 +01:00
Mike McQuaid
83645e2917
Merge pull request #18174 from Homebrew/gitlab-urls 2024-08-27 09:09:46 +01:00
apainintheneck
62a4734c90 tap: add tests for formula_file? and cask_file? 2024-08-27 00:36:23 -07:00
apainintheneck
2d6d080f32 Simplify globbing for casks and formula in taps
This is yet another approach to f3a5a3c449cf004aee662966e6c8dd2ebe122c0f
which got merged in over the weekend. It is much simpler than what we've
got now with almost exactly the same performance characteristics. A great
combination of maintability and performance.

```console
$ hyperfine --parameter-list branch master,speed-up-loading-cask-and-formula-file-names_v4 --warmup 5 --setup 'git switch {branch}' 'brew cat gimp'
Benchmark 1: brew cat gimp (branch = master)
  Time (mean ± σ):      1.459 s ±  0.012 s    [User: 0.892 s, System: 0.536 s]
  Range (min … max):    1.448 s …  1.483 s    10 runs

Benchmark 2: brew cat gimp (branch = speed-up-loading-cask-and-formula-file-names_v4)
  Time (mean ± σ):      1.456 s ±  0.009 s    [User: 0.889 s, System: 0.536 s]
  Range (min … max):    1.445 s …  1.468 s    10 runs

Summary
  brew cat gimp (branch = speed-up-loading-cask-and-formula-file-names_v4) ran
    1.00 ± 0.01 times faster than brew cat gimp (branch = master)
```
2024-08-26 23:22:15 -07:00
Michael Cho
d3d3f502a7
formula_auditor: tag needs to be a String 2024-08-26 23:07:41 -04:00
Michael Cho
cccab0d9a9
utils/shared_audits: allow subgroups in gitlab url 2024-08-26 23:07:31 -04:00
BrewTestBot
03c4b2273a
Update RBI files for ruby-lsp.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2024-08-26 22:56:58 +00:00
BrewTestBot
56653c5361
brew vendor-gems: commit updates. 2024-08-26 22:56:39 +00:00
dependabot[bot]
c31402501c
build(deps-dev): bump ruby-lsp in /Library/Homebrew
Bumps [ruby-lsp](https://github.com/Shopify/ruby-lsp) from 0.17.15 to 0.17.16.
- [Release notes](https://github.com/Shopify/ruby-lsp/releases)
- [Commits](https://github.com/Shopify/ruby-lsp/compare/v0.17.15...v0.17.16)

---
updated-dependencies:
- dependency-name: ruby-lsp
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 18:47:02 +00:00
Michael Cho
82fbbcc88b
utils/spdx: fix invalid SPDX syntax for symbols
Also use more common uppercase operators for backwards compatibility
2024-08-26 13:55:37 -04:00
Mike McQuaid
70e777cc73
Merge pull request #18144 from cho-m/installed_size 2024-08-26 09:18:24 +01:00
Mike McQuaid
d58302ef6b
Merge pull request #18147 from Homebrew/shellcheck-helpers.sh 2024-08-26 09:17:24 +01:00
apainintheneck
cd430c4d34 cmd/update-report: improve formula file validation
Currently, ruby files that are not in the Cask directory are
considered to be formulae if a Formula or HomebrewFormula directory
doesn't exist  which doesn't make sense. We know that these should
only be in a few directories so we can check for that explicitly.

Beyond that the `Tap#cask_file?` and `Tap.formula_file?` methods
were only used inside update-report so it doesn't make sense to
turn them into pathnames and expand things when we know that
each string will be a relative path from a tap that we can just
check with a regex.

This change will stop other tap changes like new commands or
changes to other directories like lib/ from showing up as new formulae.

I tried opening a PR for this a long time ago but I got busy
with other things and it got closed by the stale bot.

- https://github.com/Homebrew/brew/pull/15489
2024-08-25 18:32:04 -07:00
Carlo Cabrera
3588f1b8c5
github_runner_matrix: filter incompatible testing formulae
`brew test-bot` can occasionally spend a long time doing nothing when
testing dependents.[^1] This is because it takes a long time to work out
that there is nothing to do.

To fix this, let's adjust `brew determine-test-runners` to pass on only
the list of formulae for which there is work to be done so that
`brew test-bot` doesn't need to waste time working this out.

[^1]: For example, it spends about 15 minutes doing nothing at https://github.com/Homebrew/homebrew-core/actions/runs/10500178069/job/29133091332?pr=180185
2024-08-26 08:10:31 +08:00
apainintheneck
f3a5a3c449 Speed up the Tap#formula_files and Tap#cask_files methods
These are slow because of some Pathname related reasons so it's been
changed up to use `Dir.glob` instead and that makes a large difference.

```
$ hyperfine --parameter-list branch master,speed-up-loading-cask-and-formula-file-names,speed-up-loading-cask-and-formula-file-names_v2 --warmup 5 --setup 'git switch {branch}' 'brew cat gimp'
Benchmark 1: brew cat gimp (branch = master)
  Time (mean ± σ):      2.150 s ±  0.014 s    [User: 1.369 s, System: 0.745 s]
  Range (min … max):    2.126 s …  2.174 s    10 runs

Benchmark 2: brew cat gimp (branch = speed-up-loading-cask-and-formula-file-names)
  Time (mean ± σ):      1.814 s ±  0.012 s    [User: 1.068 s, System: 0.711 s]
  Range (min … max):    1.797 s …  1.840 s    10 runs

Benchmark 3: brew cat gimp (branch = speed-up-loading-cask-and-formula-file-names_v2)
  Time (mean ± σ):      1.489 s ±  0.009 s    [User: 0.905 s, System: 0.550 s]
  Range (min … max):    1.478 s …  1.503 s    10 runs

Summary
  brew cat gimp (branch = speed-up-loading-cask-and-formula-file-names_v2) ran
    1.22 ± 0.01 times faster than brew cat gimp (branch = speed-up-loading-cask-and-formula-file-names)
    1.44 ± 0.01 times faster than brew cat gimp (branch = master)
```
2024-08-25 15:34:10 -07:00
Ruoyu Zhong
0b3b7d9bc3
shims/super/cc: only set HOMEBREW_LD_LIBRARY_PATH when needed
Co-authored-by: Bo Anderson <mail@boanderson.me>
2024-08-26 00:39:27 +08:00