248 Commits

Author SHA1 Message Date
Rylan Polster
233cef08cf
Fix style 2022-07-25 18:31:35 +02:00
Rylan Polster
d4e5886571
Simplify checking for variations hash availability
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2022-07-25 17:43:54 +02:00
Rylan Polster
bae5abda82
Remove uses_from_macos dep duplication in FormulaAPILoader 2022-07-25 08:49:19 +02:00
Rylan Polster
7392f9811e
Formulary: use variations hash when installing from API 2022-07-24 22:59:42 +02:00
Gregory Anders
f387c7f0b2 Require deprecate_disable module in formulary
This solves a recurrent issue where various brew commands (e.g. doctor,
cleanup) would print the following stack trace:

    Error: uninitialized constant Formulary::DeprecateDisable
    Did you mean?  DeprecatedOption
    /opt/homebrew/Library/Homebrew/formulary.rb:269:in `convert_to_deprecate_disable_reason_string_or_symbol'
    /opt/homebrew/Library/Homebrew/formulary.rb:171:in `block in load_formula_from_api'
    /opt/homebrew/Library/Homebrew/formulary.rb:139:in `initialize'
    /opt/homebrew/Library/Homebrew/formulary.rb:139:in `new'
    /opt/homebrew/Library/Homebrew/formulary.rb:139:in `load_formula_from_api'
    /opt/homebrew/Library/Homebrew/formulary.rb:519:in `load_from_api'
    /opt/homebrew/Library/Homebrew/formulary.rb:510:in `klass'
    /opt/homebrew/Library/Homebrew/formulary.rb:296:in `get_formula'
    /opt/homebrew/Library/Homebrew/formulary.rb:542:in `factory'
    /opt/homebrew/Library/Homebrew/formulary.rb:565:in `from_rack'
    /opt/homebrew/Library/Homebrew/cleanup.rb:85:in `stale_formula?'
    /opt/homebrew/Library/Homebrew/cleanup.rb:58:in `stale?'
    /opt/homebrew/Library/Homebrew/cleanup.rb:356:in `block in cleanup_cache'
    /opt/homebrew/Library/Homebrew/cleanup.rb:339:in `each'
    /opt/homebrew/Library/Homebrew/cleanup.rb:339:in `cleanup_cache'
    /opt/homebrew/Library/Homebrew/cleanup.rb:222:in `clean!'
    /opt/homebrew/Library/Homebrew/cmd/cleanup.rb:58:in `cleanup'
    /opt/homebrew/Library/Homebrew/brew.rb:93:in `<main>'
2022-07-19 06:29:14 -06:00
Rylan Polster
b63474398e
Always prefer loading from API when HOMEBREW_INSTALL_FROM_API is set 2022-06-17 13:54:05 -04:00
Rylan Polster
15cf890ed7
Fix caveats when loading from the API 2022-06-16 20:24:22 -04:00
Rylan Polster
3cf86dad30
Handle deprecate/disable symbols when loading from the API 2022-06-16 16:22:59 -04:00
Rylan Polster
dd81ca57ca
Cleanup 2022-06-16 13:26:51 -04:00
Rylan Polster
996ca83a73
Don't ignore errors when loading from the API 2022-06-15 16:57:15 -04:00
Rylan Polster
ccd46af7c6
Cleanup 2022-06-14 16:42:10 -04:00
Rylan Polster
90c6aef0f0
Fix style 2022-06-14 16:06:05 -04:00
Rylan Polster
e53ccbc3cd
Remove unnecessary code 2022-06-14 16:06:05 -04:00
Rylan Polster
827acd3dc6
Align API loading with other formula loading 2022-06-14 16:06:05 -04:00
Rylan Polster
944d7eebf0
Add bottle rebuild when loading from API 2022-06-14 16:06:05 -04:00
Bo Anderson
1d36c42fb7
Support offline usage under HOMEBREW_INSTALL_FROM_API 2022-06-14 16:06:05 -04:00
Alexander Bayandin
7fb74cb1dc
Fix error message duplication for installation from URL 2021-12-03 13:15:42 +00:00
fn ⌃ ⌥
db0c1d999b Print warning if given old short name of renamed formula 2021-11-17 22:20:48 -08:00
Rylan Polster
5f4d4fb3fb
Cleanup 2021-10-31 00:27:05 -04:00
Rylan Polster
ae457a8028
Fix loading formulae from core tap 2021-10-30 23:54:01 -04:00
Rylan Polster
268a32f0aa
Handle depends_on "homebrew/core/foo" for HOMEBREW_INSTALL_FROM_API 2021-10-29 14:03:24 -04:00
Bo Anderson
267dd32a34
formulary: fix keg resolving not setting force_bottle 2021-10-26 15:07:18 +01:00
Rylan Polster
0b8032d421
Document HOMEBREW_INSTALL_FROM_API 2021-10-22 12:37:57 -04:00
Rylan Polster
5d536d66fc
Rename HOMEBREW_JSON_CORE to HOMEBREW_INSTALL_FROM_API 2021-08-27 00:24:15 -04:00
Nanda H Krishna
5ccfbcd1d2
Autocorrect style issues with brew style --fix 2021-07-08 12:36:39 +05:30
Rylan Polster
044da5d5ac
Fix style 2021-06-18 15:30:14 -04:00
Rylan Polster
60203afdd5
Merge env variables into HOMEBREW_JSON_CORE 2021-06-18 12:10:26 -04:00
Rylan Polster
1d516b628b
Use #present? and #blank? to check env variable 2021-06-18 12:07:34 -04:00
Rylan Polster
2760d981d3
Allow for homebrew/core to be untapped 2021-06-17 14:18:43 -04:00
Rylan Polster
8b04bcb994
Only allow mapping with environment variable
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-06-16 10:27:15 -04:00
Rylan Polster
618c41926b
Allow strings to be passed, too 2021-06-15 11:32:04 -04:00
Rylan Polster
75c1a23f63
Rename method to ::map_name_to_bottle 2021-06-15 11:21:59 -04:00
Rylan Polster
e9631d969c
Formulary: add ::map to map formula refs 2021-06-14 12:01:01 -04:00
Bo Anderson
f174d4363f
extend/pathname: limit write override to a refinement 2021-05-04 14:20:20 +01:00
Bo Anderson
49285fb88c
formulary: introduce ignore_errors parameter 2021-04-14 12:37:22 +01:00
Mike McQuaid
8800b85f64
More GitHub Packages bulk upload fixes
- replace invalid non-ASCII characters from the descriptions
- handle invalid macOS versions on attempting to load old formulae from
  old bottles
- let `rubocop` auto-remove a no-longer needed `rubocop:disable`
- fix `skopeo` credentials argument
2021-04-07 17:03:44 +01:00
Mike McQuaid
1942e60a37
formulary: fall back on missing bottle formula.
These aren't available on old macOS version bottles.
2021-04-01 17:37:16 +01:00
Mike McQuaid
d8a2cf9efc
Write tabs to bottle JSON, optionally not bottle
- Write a subset of the tab required for bottles as an annotation.
- Add option on new bottle creation to skip writing tab into bottle
  and instead add it (and other useful metadata) to bottle JSON.
- Read formula information and tab from bottle JSON.
- Write prettier JSON to disk.
- Don't write `HEAD` to tab; this duplicates `HOMEBREW_VERSION`.
- Allow `brew bottle` to use `--json` to generate JSON files from a
  local bottle file.
2021-03-31 09:43:37 +01:00
Mike McQuaid
6be0b57a82
formulary: fix constant redefined warning. 2021-03-31 09:30:38 +01:00
Bo Anderson
90e9d17789 formulary: remove consts if loading failed 2021-02-17 17:38:16 +00:00
Bo Anderson
da9e42f312 formulary: remove consts on cache clear 2021-02-17 17:13:06 +00:00
Nanda H Krishna
b9cbeb3019
Merge pull request #10608 from nandahkrishna/assignment-condition-parentheses
style: use parentheses for assignment in conditions
2021-02-15 18:43:54 +05:30
nandahkrishna
8e5451df2f
style: use parentheses for assignment in conditions 2021-02-12 18:33:37 +05:30
Bo Anderson
323ff660fa rubocop: use consistent array/hash indentation 2021-02-11 13:27:42 +00:00
EricFromCanada
2ed324ebc0 use backticks around suggested input, flags, and binaries 2021-01-26 16:19:47 -05:00
Mike McQuaid
9216d8abe6
rubocop-rails: make fixes. 2020-12-02 10:43:04 +00:00
Markus Reiter
5786a8937d
Merge pull request #9278 from reitermarkus/formulary-backtrace
Don't output backtrace in `Formulary`.
2020-11-26 11:38:28 +01:00
Markus Reiter
0fb9fd2cbe Don't output backtrace in Formulary. 2020-11-24 18:55:17 +01:00
Mike McQuaid
d496f5c121
Deprecations for Homebrew 2.6.0
Do the usual deprecate/disable dance for the Homebrew 2.6.0 release.

Not to be merged until the next release will definitely be 2.6.0.
2020-11-24 16:44:02 +00:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00