28581 Commits

Author SHA1 Message Date
Alexander Bayandin
b7cb8356c1
audit_file: fix condition
Co-authored-by: Bo Anderson <mail@boanderson.me>
2023-09-04 14:35:59 +01:00
Alexander Bayandin
de8eb35b73 audit_file: check formula path 2023-09-04 14:26:59 +01:00
Gibson Fahnestock
b4feaf27d9
cask/url: accept Class for using in Cask::URL#initialize
https://github.com/Homebrew/brew/pull/15754 fixed
`Cask::URL::DSL#initialize`, but we also need to fix
`Cask::URL#initialize` as that takes the same parameters.

Error:

```
Error: Cask 'mycask' definition is invalid: 'url' stanza failed
  with: Parameter 'using': Expected type T.nilable(Symbol), got type Class
  with value MyCustomDownloadStrategy
Caller:
  /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/sorbet-runtime-0.5.10461/lib/types/private/methods/call_validation.rb:113
```

Refs: https://github.com/Homebrew/brew/issues/15750
2023-09-04 08:46:22 +01:00
Mike McQuaid
8a2a16d521
WIP 2023-09-03 15:07:48 -04:00
Mike McQuaid
9fcdaa2b85
Make formula upgrades more liberal based on bottle
When we're installing a formula from a bottle, we currently always
upgrade all dependencies in the dependency tree to be safe.

However, if we're installing a bottle and the `runtime_dependencies`
within that bottle's tab all have older or equal versions to those
already installed: we do not need to upgrade these dependencies.

This should help a lot of upgrading a lot of the time, at least for
users using bottles (which is the huge majority).

The only downside or other noticeable change is that this requires us
to download or attempt to download the bottle tab before we compute
the dependencies at installation time.

Co-authored-by: Kevin <apainintheneck@gmail.com>
2023-09-03 15:07:48 -04:00
Mike McQuaid
fc72dfc6ca
Merge pull request #15935 from MikeMcQuaid/api_curl_args
api: use `Utils::Curl.curl_args`
2023-09-03 09:31:49 -04:00
Mike McQuaid
4ad5321d03
Merge pull request #15937 from MikeMcQuaid/cleanup_todo
Cleanup various TODOs
2023-09-03 09:29:03 -04:00
Mike McQuaid
db1267bdff
Merge pull request #15943 from apainintheneck/handle-nil-urls-in-cask-installer
Handle nil cask urls caused by unsupported macOS version
2023-09-03 09:23:08 -04:00
Mike McQuaid
a1269fcbfc
Merge pull request #15941 from MikeMcQuaid/audit_gcc_dependency_not_strict
formula_auditor: make Linux-only GCC dep audit non-strict.
2023-09-03 09:13:58 -04:00
Mike McQuaid
f73607553c
Cleanup various TODOs
These were also easily fixed, already fixed or incorrect and
non-controversial.

Co-authored-by: Issy Long <issyl0@github.com>
2023-09-03 09:12:41 -04:00
Mike McQuaid
8ba389817f
api: retry manually without curl_args defaults.
Co-authored-by: Kevin <apainintheneck@gmail.com>
2023-09-03 09:10:25 -04:00
Mike McQuaid
dbc4406e02
Merge pull request #15938 from MikeMcQuaid/sonoma_rosetta_2_bottles
os/mac/hardware: remove TODO.
2023-09-03 09:09:56 -04:00
Mike McQuaid
daa175e760
cask/installer: remove outdated comment. 2023-09-03 09:09:14 -04:00
apainintheneck
8c2f101138 cmd/fetch: handle nil cask urls
These urls can be nil if there is an unsatisfied macos version
requirement. We check for false here because either the macos
requirement can be satisfied and return true or can not be
specified and return nil. If it's not specified, it means it
can run on any macos version.

The change in Cask::Download should provide better error messages
in Downloadable but honestly we're better off just checking for
the missing url higher up the call stack which is why I made
the changes in the fetch command. Either way it seemed like
a good idea while I'm here.
2023-09-02 20:56:55 -07:00
apainintheneck
51387287f7 Handle nil urls in cask installer and API cask loader
The goal here is to handle the case where a cask might have a nil
url stanza because that cask is not available on the current version
of macOS or the given architecture. This just moves those checks
from the end of the `Cask::Installer#fetch` method to the beginning
so that we don't try and download casks that are missing urls.

This will now provide a helpful error message like so:
```
Error: This software does not run on macOS versions older than Big Sur.
```

Beyond that it no longer tries to run the url stanza with a nil value
when loading casks from the API.
2023-09-02 20:56:36 -07:00
Mike McQuaid
b594e87a7f
formula_auditor: make Linux-only GCC dep audit non-strict.
Otherwise we have to run this separately in `brew test-bot` which is
slower and more confusing.
2023-09-02 21:39:16 -04:00
Mike McQuaid
f30788018c
os/mac/hardware: remove TODO.
As discussed in #15938, this TODO can pretty much never be done so
doesn't make sense to leave as-is.
2023-09-02 21:36:27 -04:00
Mike McQuaid
d5a1f3e02c
api: use Utils::Curl.curl_args
This sets user-agent nicely and avoids some duplication.
2023-09-02 21:31:01 -04:00
Mike McQuaid
e7d0625776
Merge pull request #15939 from MikeMcQuaid/sorbet_dev_cmd 2023-09-02 18:29:22 -04:00
Mike McQuaid
8775465872
Enable Sorbet after running a developer command
We have no commands with Sorbet disabled and have had Sorbet enabled
for developers for a decent amount of time. As a result, we can enable
it for everyone who has run a developer command.

This also allows a bunch of `raise TypeError`s to be removed in favour
of relying on Sorbet here instead.
2023-09-02 08:39:28 -04:00
hyuraku
adc2a2fea1 remove ARGV from Formula#all 2023-09-02 19:35:22 +09:00
Mike McQuaid
59cc141524
Merge pull request #15923 from MikeMcQuaid/brew_contributions_improvements
dev-cmd/contributions: usability/performance improvements.
2023-08-30 15:21:30 +01:00
Mike McQuaid
d357607b2c
dev-cmd/contributions: usability/performance improvements.
- more sensible/performant defaults: default to primary repositories
  only for the last year rather than all repositories forever
- allow specifying more than one user at a time
- output the breakdown of contributions without needing `--csv`
- add a space before the `--csv` output
- consolidate some code
- avoid counting authored commits twice, to improve performance
- retry failed GitHub API calls (this happens often when querying all
  maintainers)
- stop counting after we find 1000 commits for a given user to avoid
  excessive API queries/pagination
2023-08-30 15:08:50 +01:00
Mike McQuaid
340b982df8
Merge pull request #15922 from MikeMcQuaid/deps_no_formula_options
cmd/deps: fix documentation and handling of formula_options.
2023-08-30 09:56:08 +01:00
Mike McQuaid
34f13db657
Merge pull request #15921 from EricFromCanada/cask-url-audit
cask/audit: format-check block URLs only if online
2023-08-30 09:04:39 +01:00
Mike McQuaid
9863d555a8
cmd/deps: fix documentation and handling of formula_options.
https://github.com/Homebrew/brew/pull/15892#issuecomment-1698659908
2023-08-30 08:46:59 +01:00
Mike McQuaid
851df262a0
Merge pull request #15892 from apainintheneck/rework-recursive-dependency-resolution
dependency_helpers: rework recursive dependency resolution
2023-08-30 08:29:24 +01:00
Eric Knibbe
686638b683
cask/audit: format-check block URLs only if online 2023-08-29 17:10:40 -04:00
apainintheneck
b2b8f0ea86 cmd/uses & cmd/deps: update help/man pages
- add clarification about precedence of command options
- reword some options for readability
- clarify the defaults in `brew deps`
2023-08-28 22:14:26 -07:00
apainintheneck
5c41e85ae9 update cmd/uses and cmd/deps tests
These tests were very simple before and now this should result
in more code coverage without affecting test performance.

The only tricky thing was testing the `--missing` option without
actually installing a package using `install_test_formula` because
that is very slow (around 10 seconds on my machine). I ended
up just writing the tab to a plausible keg directory for each
package I wanted to "install". This allows us to test the behavior
while also not increasing CI time by ~20 seconds (though it'd
probably be faster on CI than my local machine).
2023-08-28 21:54:32 -07:00
Eric Knibbe
df38dcc3d1
dependency: consider bounds when comparing macOS deps 2023-08-28 17:34:04 -04:00
Eric Knibbe
49d531a6ce
dependency_collector: distinguish macOS deps by OS 2023-08-28 12:20:15 -04:00
apainintheneck
72152c09c7 cmd/uses: handle --missing
Ignore all dependencies that are already installed before
checking if they use the dependency in question. Remove
the :satisfied? criteria before checking used dependents.
2023-08-27 13:50:53 -07:00
Michael Cho
bc2bb59726
extend/os/linux/system_config: show glibc/gcc version for API users 2023-08-26 22:19:32 -07:00
Bo Anderson
b0c54058f3
Merge pull request #15903 from cho-m/codesign-intel-if-invalid
extend/os/mac/keg: codesign on Intel if invalid signature
2023-08-27 05:11:06 +01:00
Alexander Bayandin
45378f35e2 get_repo_license: ignore ip allowlist error 2023-08-26 17:16:43 +01:00
Alexander Bayandin
89d52f19a9
shared_audits: allow GitHub's IP not permitted error
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-08-26 14:53:38 +01:00
Mike McQuaid
ae0f5637b7
Merge pull request #15911 from branchvincent/pip-feature
formula: drop old pip feature flag
2023-08-26 13:03:40 +01:00
Branch Vincent
a75568147e
brew.sh: disable shellcheck warning 2023-08-26 12:48:30 +01:00
Branch Vincent
f8ab19d187
formula: drop old pip feature flag 2023-08-26 12:48:16 +01:00
apainintheneck
e314a43754 dependency_helpers: include required & use public_send
- Use .required? instead of .tags.empty?
- use .public_send
- modify .reject_ignores to be .select_includes
  - checks ignores first now
- Don't use runtime deps with --missing in `brew deps` command
2023-08-25 00:25:14 -07:00
Michael Cho
7412487891
extend/os/mac/keg: codesign on Intel if invalid signature 2023-08-23 11:48:13 -07:00
Mike McQuaid
3c8b4949ba
Merge pull request #15900 from clint-stripe/clint/homebrew-curlrc-vendor-install
Use HOMEBREW_CURLRC in vendor-install
2023-08-23 08:37:52 +01:00
Mike McQuaid
bc5fce2477
Merge pull request #15895 from EricFromCanada/api-old-certs
api: ignore HTTPS errors if required certs aren't installed
2023-08-23 08:37:21 +01:00
BrewTestBot
2a90974b86
Update RBI files for activesupport.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2023-08-23 04:35:20 +00:00
BrewTestBot
503db092a3
brew vendor-gems: commit updates. 2023-08-23 04:28:37 +00:00
dependabot[bot]
8733f58064
build(deps): bump activesupport in /Library/Homebrew
Bumps [activesupport](https://github.com/rails/rails) from 6.1.7.4 to 6.1.7.6.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.0.7.2/activesupport/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v6.1.7.4...v6.1.7.6)

---
updated-dependencies:
- dependency-name: activesupport
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-23 04:24:54 +00:00
Eric Knibbe
70e676c176
api: ignore HTTPS errors if required certs aren't installed 2023-08-22 17:41:46 -04:00
Clint Harrison
e75a72dcb5 Use HOMEBREW_CURLRC in vendor-install 2023-08-22 17:21:37 -04:00
Branch Vincent
47e82add43
utils/pypi: exclude deps of excluded packages 2023-08-21 21:45:54 -07:00