1391 Commits

Author SHA1 Message Date
EricFromCanada
e67abce950
formula: consider arbitrary formula source paths 2023-04-22 18:56:01 -04:00
Markus Reiter
844db75361
Add source paths to API. 2023-04-07 15:20:01 +02:00
Douglas Eichelberger
f3a8241e69 Remove useless T.unsafe wrappers 2023-04-03 17:34:39 -07:00
apainintheneck
c073cf901a search: show results by platform
This means that formulas that are only available on one
OS should only show up in the search results for the platform.
2023-03-27 20:04:57 -07:00
Markus Reiter
5e52d415a9
Allow fetching for different arch. 2023-03-25 11:56:09 +01:00
apainintheneck
38146893c3 api_hashable: Make API path subs generic
This turns the ability to replace common paths with placeholders
into a mixin that can be used with both Casks and Formulae.

The idea here is to make formula hash generation more consistent.
2023-03-21 23:20:42 -07:00
apainintheneck
db8d488db4 service: add info to API json and load from api
As a part of serializing the hash, certain path
placeholders are used for the HOMEBREW_PREFIX and $HOME
directories. Beyond that certain elements need to be
turned back into strings like cron and sockets and symbols
need to be preserved as well.

The run command accepts either an arg or kwargs so it
has to be treated specially here.
2023-03-19 00:09:10 -07:00
Markus Reiter
3b45ecdc70
Move to_s. 2023-03-13 00:59:08 +01:00
Issy Long
8862c33b62
sorbet: Autogenerate the RBI file for Homebrew::EnvConfig
- I'm not as happy with this as I was with my work on `utils/tty.rb`,
  it feels a lot hackier and prone to breaking - especially the
  `T.nilable` "detection".
- However, it generates an RBI file that passes `brew typecheck`, so we
  can clean up some `hidden-definitions` entries, getting further
  towards fully typed.
2023-03-11 02:13:30 +00:00
Issy Long
6d822d9a62
rubocop: Drop "fn" from Naming/MethodParameterName allowlist
- I originally thought this was short for "function", but upon closer
  inspection all its usages are to do with filenames. So, use "filename",
  it's clearer.
2023-03-08 14:40:56 +00:00
Issy Long
3e7a46f474
rubocop: Drop "v" from Naming/MethodParameterName allowlist
- This was an easy fix, "v" => "version".
2023-03-08 14:40:55 +00:00
Alexander Bayandin
9b4f29e47c
formula: fix alias loading 2023-03-01 09:44:57 +00:00
Bo Anderson
e86a8c2477
Move HOMEBREW_NO_INSTALL_FROM_API defaults to shell 2023-02-24 21:53:08 +00:00
Bo Anderson
e663f532a6
Checksum Ruby source file downloads 2023-02-22 22:50:24 +00:00
Issy Long
298bb65dfb
rubocop: Entirely disable Metrics cops
- These are arbitrary length limits that had a load of disables in code.
- The limits were only increasing over time rather than decreasing.
- Fixing the problematic code to be shorter would take a long time for
  questionable gain since the problem has been around so long.
2023-02-21 00:34:17 +00:00
Bo Anderson
cacd7194f6
Support link_overwrite and conflicts_with in API 2023-02-20 16:28:07 +00:00
Issy Long
f8654bd363
rubocop: In-line disables of Metrics/{Module,Block,Class}Length
- We're not going to make the really long things be any shorter any time soon.
- The instructions in issue 14685 say, pragmatically, "disable all the rubocop
  rules we're never going to realistically fix e.g. Metrics/ClassLength". But
  that felt like a slippery slope to more _really_ long modules/classes/blocks,
  and the limits are here for a reason.
2023-02-19 16:33:23 +00:00
Mike McQuaid
237eec8ef8
Overhaul Formula/Cask JSON generation
- Use constants for placeholders
- Monkeypatch to set `HOMEBREW_PREFIX` consistently to placeholder
- Use environment variable to set `Dir.home` consistently to placeholder
- Use `appdir` short-circuit to set `Cask#appdir` consistently to placeholder
- Use `Cask.generating_hash!` to enable "generating mode" with these patches
- Fix `Formula#caveats` from JSON

Fixes #14505
Fixes #14595
2023-02-14 14:19:40 +00:00
Mike McQuaid
e0ba9a1249
Merge pull request #14617 from Bo98/api-reqs-oldname
formulary: support requirements, aliases etc from API
2023-02-14 11:54:55 +00:00
Bo Anderson
9b26bf9b92
formulary: support requirements, aliases etc from API 2023-02-14 03:32:56 +00:00
Bo Anderson
5619e5cc2c
formula: fix to_hash tampering with requirement names 2023-02-14 02:31:49 +00:00
Bo Anderson
cc956d73aa
Fix brew info --json regressions around install status 2023-02-13 05:07:40 +00:00
Rylan Polster
f7fa5937d8
Allow brew info --json=v2 without taps with JSON API 2023-02-12 12:03:40 +00:00
EricFromCanada
dfc9906184
internal messaging fixes 2023-02-10 23:17:16 -05:00
Mike McQuaid
6b4363092d
Revert "Merge pull request #14548 from Homebrew/revert-14382-deprecate-disable-remove"
This reverts commit 932d2cf3b77c9439a57b6a43577fc8d3b6399a62, reversing
changes made to f4e60482791d2ff628efadfdbf0d14d9237d2d29.
2023-02-07 19:25:51 +01:00
Mike McQuaid
6882ac17e7
Revert "Add deprecations and disables" 2023-02-07 15:13:19 +01:00
Bo Anderson
2055792791
Better support source builds under API mode 2023-02-06 13:27:36 +00:00
Bo Anderson
33681f90e3
Add HEAD information to JSON API 2023-02-06 13:06:39 +00:00
Mike McQuaid
a086fcd293
Merge branch 'chore/formula/deprecate_plist_options' into deprecate-disable-remove 2023-02-03 10:51:06 +00:00
Mike McQuaid
3c7adc91ac
Merge branch 'deprecate-ignore_missing_libraries' into deprecate-disable-remove 2023-02-03 10:49:54 +00:00
Mike McQuaid
59c03cb2a6
Add deprecations and disables
Do the usual dance:
- commented `odeprecated` to `odeprecated`
- `odeprecated` to `odisabled`
- `odisabled` removed
2023-02-03 10:48:43 +00:00
Sean Molenaar
f67d4c4ed6
chore: deprecate plist_options in formula 2023-02-01 17:44:36 +01: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
Carlo Cabrera
131f5eba0f
formula: deprecate ignore_missing_libraries
We removed all uses of this method in Homebrew/core. See
Homebrew/homebrew-core#111297.
2023-01-26 13:29:51 +08:00
Tom Forbes
42a95dc7a7 Add PYTHONDONTWRITEBYTECODE to common_stage_test_env. Closes #14274 2023-01-07 15:22:06 +00:00
Mike McQuaid
080a1c3c43
Merge pull request #14271 from cho-m/completions-stderr
formula: show stderr by default when generating completions
2022-12-27 21:07:48 +00:00
Nanda H Krishna
768ebe5750
Fix access to livecheck constants in formulae 2022-12-21 05:27:23 -05:00
Michael Cho
1209fc046f
formula: show stderr by default when generating completions 2022-12-19 20:09:23 -08:00
Sam Ford
f03a400e28
Extract latest_version string to a constant 2022-12-19 18:15:51 -05:00
Michael Cho
5c7d53476e
formula: add support for generating click shell completions 2022-12-08 09:31:04 -08:00
EricFromCanada
216a045b36
rubydoc: fixes for output 2022-11-11 16:16:54 -05:00
Sean Molenaar
133c639ba9
Merge pull request #14113 from SMillerDev/feature/service/require_root
Service: add method to define a root requirement
2022-11-08 11:56:31 +01:00
Sean Molenaar
fb9cc17c43
formula.rb: add deprecation 2022-11-08 09:07:24 +01:00
Sean Molenaar
a23d969df8
formula: comment out deprecation 2022-11-08 09:06:40 +01:00
Dustin Rodrigues
eb1fbab729
minor typo fixes 2022-11-06 22:50:07 -05:00
Sean Molenaar
d477d1663a
Service: add method to define a root requirement 2022-11-06 13:52:53 +01:00
Rylan Polster
cc78b155c6
Add stable checksum to the JSON API 2022-10-21 01:22:36 -04:00
Mike McQuaid
53b1c0f48e
Strengthen "don't create issues" language
We're still getting a non-trivial number of issues from configurations
we don't support and don't plan to.

Let people know that we know their experience will not be good and what
to expect if they file issues.

Co-authored-by: Eric Knibbe <enk3@outlook.com>
2022-10-20 11:39:20 +01:00
Carlo Cabrera
f30f68be7d
Merge pull request #13978 from carlocab/rpath-prefix
formula: ensure `rpath` is passed a valid `target`
2022-10-11 02:06:20 +08:00
Carlo Cabrera
933129dcdb
Make error message clearer
Co-authored-by: Bo Anderson <mail@boanderson.me>
2022-10-08 11:43:43 +08:00