261 Commits

Author SHA1 Message Date
Patrick Linnane
3fdba532a2
various: fix miscellaneous typos
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-01-12 10:56:49 -08:00
Bo Anderson
b42256d286
Deprecate, disable & delete code for Homebrew 4.2.0 2023-12-07 23:42:13 +00:00
Bo Anderson
5f95ca7259
tap: don't display file info for uninstalled taps 2023-11-25 13:38:37 +00:00
Bo Anderson
b1ddb056db
tap: optimise CoreTap#formula_files_by_name 2023-11-18 01:01:41 +00:00
Bo Anderson
34e4ec2460
tap: fix repair not working in some cases 2023-11-05 00:44:50 +00:00
Bo Anderson
0c08a3cccb
Improve performance of Formula#to_hash 2023-09-28 14:07:25 +01:00
apainintheneck
5760ae4fb2 cmd/readall: Cleanup todos
- keep running the command against all os/arch combinations
  as the default
- remove todos and deprecations related to changing the behavior
- create constants for os/arch combinations
2023-09-19 21:33:13 -07:00
apainintheneck
7e05a9b574 cmd/audit: improve performance of versioned formula names
There is a check for other versioned formula with the same name
in the file audit. This just memoizes all of the versioned
formulae in a tap during the first call and then uses that much
shorter list everytime it checks for things.
2023-09-16 09:18:13 -07:00
Eric Knibbe
931f762598
docs+rubydoc: various grammar/wording fixes 2023-09-11 02:26:37 -04:00
Mike McQuaid
22553cd34a
Fix cask sharding issues
- Fix cask info output being incorrect
- Improve some code referring to casks as formulae
- Move livecheck cask fixtures to not shadow existing names
- Adjust the cask tap symlinking logic to make handling outdated
  shadowed casks significantly easier
- Fix various flaky tests caused by casks sharding logic
- Prefer longer paths when there's multiple formulae or casks in a tap
  with the same name rather than always using the first
2023-08-10 16:08:47 +01:00
Mike McQuaid
cf71b5b3ea
tap: always create new casks in subdirectory.
For homebrew-cask, all casks should now be created in subdirectories,
even if that subdirectory doesn't yet exist.
2023-08-09 12:11:20 +01:00
Mike McQuaid
b3c33d34ab
Various sharding fixes
- Load paths with no API when needed (e.g. for `brew edit`)
- Use no API mode for `brew log` as it's needed there
- Define sharding format for homebrew-cask and homebrew-core inside
  `Tap` methods
- Create new formulae/casks in location defined by these `Tap` methods
- Fix a bug in Formulary that made sharded formulae lookup less
  efficient (and possibly broke it for core and some API usage)
- Fix various other hardcoded Formula/Cask directory assumptions

Co-authored-by: Bo Anderson <mail@boanderson.me>
2023-08-04 16:43:13 +01:00
Eric Knibbe
b6c49b7a2d
docs: assume core repositories are untapped 2023-07-24 09:55:56 -04:00
EricFromCanada
d47aa103d2
cmd/tap: ensure remote exists before repairing 2023-07-23 00:42:09 -04:00
Bo Anderson
ba02c669e1
Introduce CoreCaskTap class 2023-07-13 20:33:26 +01:00
Bo Anderson
0a9e69ffdf
tap: fix handling of taps without formulae 2023-07-07 20:58:22 +01:00
Mike McQuaid
7da934f7e2
Deprecate/disable/delete code.
The next release after this is merged will be 4.1.0.

Co-authored-by: Markus Reiter <me@reitermark.us>
2023-07-06 16:56:20 +01:00
Bo Anderson
8d1aabba81
tap: warn if tapping core taps under API mode 2023-07-05 21:57:00 +01:00
Mike McQuaid
27dda52a5d
Download tap_migrations.json files from the API
Download the previously stored tap migrations files for homebrew/core
and homebrew/cask from the formulae.brew.sh API.

This adds a much longer stale time (24 hours) to decide whether or not
the migrations files need downloaded from the API in Ruby land.
`brew update` will still update them every time.

Requires https://github.com/Homebrew/brew/pull/15628
Fixes https://github.com/Homebrew/brew/issues/14897
2023-07-05 17:18:12 +01:00
Mike McQuaid
229a1f6c1e
Remove Tap#versioned_formula_files
This doesn't work with the API and the single caller can be
refactored to not need it instead.
2023-07-05 16:28:44 +01:00
Alexander Bayandin
f6e4849c0f
tap: disable fsmonitor for third-party taps 2023-07-04 09:56:57 +00:00
Mike McQuaid
cd414bd95f
Include core formulae from API in Formula.all.
This is needed to allow `Formula.all` to behave as expected when using
the API. Let's also (immediately, because it's broken) deprecate the
`CoreTap#formula_files` method.

Fixes #15122
2023-06-28 15:27:20 +01:00
Markus Reiter
a3231a03fa
Implement cask renames. 2023-05-12 21:17:30 +02:00
Bo Anderson
5510c3fb2b
Support formula renames in API 2023-04-27 05:15:45 +01:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Douglas Eichelberger
403f08db8b Remove delegation 2023-04-16 09:30:21 -07:00
Douglas Eichelberger
b90897e280 Create git_repo attr 2023-04-15 19:35:13 -07:00
Douglas Eichelberger
1ffb77f821 cleanup 2023-04-15 19:35:13 -07:00
Douglas Eichelberger
8307255ce8 Update call sites 2023-04-15 19:35:13 -07:00
Douglas Eichelberger
429f23dcc6 Create GitRepoPath 2023-04-15 19:35:12 -07:00
Mike McQuaid
104434c1d9
Merge pull request #15150 from muzimuzhi/tap-formula-file
Tighten `tap.formula_file?(file)` and `tap.formula_files` to not detect cask file as formula
2023-04-06 08:37:50 +01:00
Yukai Chou
0cfc4ab1e8 fixup! avoid duplicating logic 2023-04-06 05:03:56 +08:00
Yukai Chou
16c81d7a55 tighten tap.formula_files similarly 2023-04-06 05:00:21 +08:00
Yukai Chou
1098cb6a7d avoid duplicating logic 2023-04-06 04:59:55 +08:00
Mike McQuaid
61eec0002d
tap: remove some CoreTap installed? checks.
We should be using the API unless specifically requested not to.

Fixes #15153.
2023-04-05 09:19:20 +01:00
Yukai Chou
b1b94187af tap: tighten formula_file?(file)
Cask is never a formula.
2023-04-05 03:41:11 +08:00
Dustin Rodrigues
b776fb32de
change includecount to include_count for readability 2023-03-20 07:23:17 -04:00
Dustin Rodrigues
e5fba88035
use includecount argument in pluralize 2023-03-19 23:35:47 -04:00
Douglas Eichelberger
0eccc0e987 git grep -l Utils::Inflection | xargs gsed -i 's|Utils::Inflection|Utils|g' 2023-02-27 20:18:27 -08:00
Douglas Eichelberger
3da68651e5 Port more call sites 2023-02-27 20:18:08 -08:00
Bo Anderson
e86a8c2477
Move HOMEBREW_NO_INSTALL_FROM_API defaults to shell 2023-02-24 21:53:08 +00:00
Mike McQuaid
f280ce069b
Support loading formulae/casks from subdirectories
Previously, we required all formulae and casks to be in a specific
formula or cask directory but did not check any subdirectories.

This commit allows using subdirectories for official taps, the only
ones likely to be big enough to warrant sharding in this way and to
avoid potentially breaking backwards compatibility for existing taps.

This was inspired by the most recent issues with homebrew-cask.
2023-02-24 10:57:41 +00:00
Mike McQuaid
53c57d7a70
tap: return the default_remote if not installed.
Fixes #14656.
2023-02-16 12:25:28 +00:00
Bo Anderson
7ef0c48362
Fix analytics handling when core/cask taps are untapped 2023-02-15 05:31:08 +00:00
Mike McQuaid
4c8ed77302
Improve homebrew/{core,cask} autotapping.
Don't automatically tap these when running a developer command that's
not using the API.

Fixes #14606
2023-02-14 09:54:24 +00:00
EricFromCanada
dfc9906184
internal messaging fixes 2023-02-10 23:17:16 -05:00
Asutosh Palai
a3765d0a80 making core tap install an in-process call
This helps fixes problems with fresh install on ARM Linux.
When brew is relaunched with filtered PATH, it is not able to
find user installed Ruby.
2023-02-03 00:36:39 +00:00
Mike McQuaid
fd18c7b0ac
Tweak cask-source API handling
- Use raw.githubusercontent.com to download cask source rather than
  formulae.brew.sh. This allows us to remove these files
- output the tap's current `HEAD` for both formulae and cask JSON
- use this `HEAD` for the cask-source API to get the exact file on
  raw.githubusercontent.com rather than just whatever is newest (which
  is what the previous API did)
- set the `Tap` correctly when creating a `Cask` from the API
- if the `formula.json` file exists: print its modified time include
  `brew config`
- memoize `tap.git_head` as we'll be calling it a lot in the same
  process with the same value
2023-01-26 17:36:40 +00:00
Rylan Polster
cc615ef7fb
Fix brew search for HOMEBREW_INSTALL_FROM_API 2023-01-23 13:32:54 -05:00
Mike McQuaid
59f4b5226a
tests: test on Ubuntu 18.04. 2022-11-09 14:45:43 +00:00