41947 Commits

Author SHA1 Message Date
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
Ruoyu Zhong
80c04e2528
Merge pull request #18175 from Homebrew/docker-build-push-action
workflows/docker: use `docker/build-push-action` to build images
2024-08-27 22:06:56 +08:00
Ruoyu Zhong
73b8950d87
workflows/docker: use safer delimiters
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
2024-08-27 18:34:52 +08:00
Ruoyu Zhong
d452cd947d
workflows/docker: consolidate pushes in single step 2024-08-27 18:34:52 +08:00
Ruoyu Zhong
82f97bcf29
workflows/docker: use docker/build-push-action to build images
This allows us to use Docker's build cache across workflow runs.

Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
2024-08-27 18:29:59 +08:00
Ruoyu Zhong
ae2b3bc7d4
workflows/docker: only perform login when necessary 2024-08-27 18:29:59 +08: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
Kevin
f31aa91f67
Merge pull request #18176 from Homebrew/speed-up-loading-cask-and-formula-file-names_v4
Simplify globbing for casks and formula in taps
2024-08-27 01:02:58 -07: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
Patrick Linnane
b7b155bf0e
Merge pull request #18170 from Homebrew/dependabot/bundler/Library/Homebrew/ruby-lsp-0.17.16 2024-08-26 16:08:01 -07: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
abc0584215
Merge pull request #18168 from Homebrew/docker-tests 4.3.18 2024-08-26 09:35:52 +01: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
Ruoyu Zhong
e7e244e6c2
workflows/docker: tweak syntax
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
2024-08-26 12:56:29 +08:00
Ruoyu Zhong
74e27a9127
workflow/tests: move Docker tests to docker.yml
It's more intuitive that way.
2024-08-26 12:28:34 +08: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
Kevin
0c3104a8f2
Merge pull request #18165 from Homebrew/speed-up-loading-cask-and-formula-file-names_v2
Speed up the `Tap#formula_files` and `Tap#cask_files` methods
2024-08-25 17:53:10 -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
Bo Anderson
17e3bee3da
Merge pull request #18162 from Homebrew/cc-LD_LIBRARY_PATH
shims/super/cc: unset `LD_LIBRARY_PATH`
2024-08-25 17:55:08 +01: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
Ruoyu Zhong
fb57604fe2
shims/super/cc: preserve LD_LIBRARY_PATH
This could be used by the linker [^1] so let's preserve it before
invoking the compiler/linker.

[^1]: https://sourceware.org/binutils/docs/ld/Options.html
2024-08-26 00:18:15 +08:00
Bo Anderson
47f5ed17f9
Merge pull request #18156 from Homebrew/stricter-sudo
bin/brew: improve `sudo` handling
2024-08-25 17:06:21 +01:00
Ruoyu Zhong
86de678086
shims/super/cc: unset LD_LIBRARY_PATH
A local `ruby` build failed while building extensions, with:

    *** Following extensions are not compiled:
    -test-/file:
      Could not be configured. It will not be installed.
      /tmp/ruby-20240824-893184-ehcnsa/ruby-3.3.4/lib/mkmf.rb:480: The compiler failed to generate an executable file.
      You have to install development tools first.
      Check ext/-test-/file/mkmf.log for more details.
    -test-/symbol:
      Could not be configured. It will not be installed.
      /tmp/ruby-20240824-893184-ehcnsa/ruby-3.3.4/lib/mkmf.rb:480: The compiler failed to generate an executable file.
      You have to install development tools first.
      Check ext/-test-/symbol/mkmf.log for more details.
    [...]

`mkmf.log` indicated that the compiler shim failed to load `pathname`:

    LD_LIBRARY_PATH=.:../../.. "gcc-13 -o conftest -I../../../.ext/include/aarch64-linux -I../../.././include -I../../.././ext/-test-/file -I/home/linuxbrew/.linuxbrew/opt/libyaml/include -I/home/linuxbrew/.linuxbrew/opt/openssl@3/include    -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wmisleading-indentation -Wundef  -fPIC conftest.c  -L. -L../../.. -L/home/linuxbrew/.linuxbrew/opt/libyaml/lib -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/libyaml/lib -L/home/linuxbrew/.linuxbrew/opt/openssl@3/lib -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/openssl@3/lib -L. -fstack-protector-strong -L/home/linuxbrew/.linuxbrew/opt/libyaml/lib  -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/libyaml/lib -L/home/linuxbrew/.linuxbrew/opt/openssl@3/lib  -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/openssl@3/lib -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed     -Wl,-rpath,/home/linuxbrew/.linuxbrew/Cellar/ruby/3.3.4/lib -L/home/linuxbrew/.linuxbrew/Cellar/ruby/3.3.4/lib -lruby-static -lz -lrt -lrt -ldl -lcrypt -lm -lpthread   -lm -lpthread  -lc"
    /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/gcc-13:12:in `require': cannot load such file -- pathname (LoadError)
      from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/gcc-13:12:in `<main>'

I believe this was due to `../../..` in `LD_LIBRARY_PATH` containing
`libruby.so`, causing the Ruby script to load the being-built Ruby
library instead of the system/portable one.
2024-08-25 23:50:13 +08:00
Patrick Linnane
e267c1f188
Merge pull request #18158 from Homebrew/dependabot/bundler/Library/Homebrew/sorbet-0.5.11545 2024-08-25 08:07:27 -07:00
Patrick Linnane
4fae2393b5
Merge pull request #18157 from Homebrew/dependabot/github_actions/github/codeql-action-3.26.5 2024-08-25 08:04:40 -07:00
BrewTestBot
057fe8b186
brew vendor-gems: commit updates. 2024-08-25 14:55:43 +00:00
dependabot[bot]
0392aa0582
build(deps-dev): bump sorbet in /Library/Homebrew
Bumps [sorbet](https://github.com/sorbet/sorbet) from 0.5.11537 to 0.5.11545.
- [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-25 14:54:29 +00:00
dependabot[bot]
46d8228db8
build(deps): bump github/codeql-action from 3.26.4 to 3.26.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.4 to 3.26.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](f0f3afee80...2c779ab0d0)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-25 14:54:25 +00:00
Carlo Cabrera
cd4f6eb2c0
bin/brew: improve sudo handling
- prioritise `/usr/bin/sudo` instead of any random `sudo` in `PATH`
2024-08-25 18:03:16 +08:00
Bo Anderson
36a0e539e4
Merge pull request #18155 from Homebrew/github-simplifications
utils/github: a few more simplifications
2024-08-25 00:50:45 +01:00
Carlo Cabrera
af4cd63408
Merge pull request #18154 from chenrui333/fix-tag-audit 2024-08-25 04:36:20 +08:00
Carlo Cabrera
43ec1fc38a
utils/github: a few more simplifications
Follow-up to #18150.
2024-08-25 04:33:42 +08:00
Carlo Cabrera
58ea96583f
brew.sh: use read instead of cat
This will be slightly more efficient since it can be done in-process.
2024-08-25 04:06:30 +08:00
Rui Chen
a4dd50f6f1
formula_auditor: ensure tag is not nil when doing online audit
Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-08-24 16:03:12 -04:00
Bo Anderson
ff8bb50cfa
Merge pull request #18151 from Homebrew/speed-up-cask-files-by-name
Speed up `CoreCaskTap#cask_files_by_name`
2024-08-24 20:17:11 +01:00
Bo Anderson
0408c184ac
Merge pull request #18152 from Homebrew/more-paginate-graphql
utils/github: use `paginate_graphql` in `sponsorships`
2024-08-24 20:17:02 +01:00
Bo Anderson
a208b1bee4
Merge pull request #18150 from Homebrew/pr-count-fix
utils/github: fix `too_many_open_prs?`
2024-08-24 20:16:54 +01:00
Bo Anderson
e521f3947b
Merge pull request #18149 from cho-m/perl-shebang-whitespaces
keg_relocate: allow spaces/tabs after shebang
2024-08-24 20:16:43 +01:00