268 Commits

Author SHA1 Message Date
Markus Reiter
4b432c7ea4
Explicitly mark non-private APIs. 2024-04-22 21:16:49 +02:00
Markus Reiter
e0743a1436
Reapply "Refactor Formulary::loader_for."
This reverts commit 24683525cb5abf3cc79a9e0e268fa6efd0af558b.
2024-02-22 18:24:57 +01:00
Mike McQuaid
24683525cb
Revert "Refactor Formulary::loader_for." 2024-02-16 13:41:54 +00:00
Markus Reiter
b717f5d954
Remove unused TapFormulaWithOldnameAmbiguityError. 2024-02-14 22:56:25 +01:00
Markus Reiter
ce60048192
Handle TapFormulaAmbiguityError in diagnostics. 2024-02-14 20:28:08 +01:00
Markus Reiter
4641690674
Refactor Formulary::loader_for. 2024-02-14 20:28:06 +01:00
Eric Knibbe
e63b1f4da5
docs: monospace suggested values 2024-02-04 15:42:26 +01:00
Sam Ford
578c935bcf
Formula, BuildError: Update type signatures
We're seeing type errors when building formulae that use something
like `xcodebuild ..., "-arch", Hardware::CPU.arch`, since `CPU.arch`
is a symbol. We've been addressing these issues by calling `#to_s` on
the value but there was some talk about simply expanding the type
signatures to accommodate anything that will be cast to a `String`.

There's maybe still an argument to be made for doing string conversion
in formulae but expanding the type signatures will resolve a number of
existing type errors if we simply want to rely on implicit type
casting.

Past that, this also updates the type signature for `BuildError` to
align with the `#system` signature changes, as we receive a type error
otherwise.
2023-09-13 19:16:04 -04:00
Eric Knibbe
b3ecd91f97
dev-cmd/edit: suggest tapping core repositories 2023-08-01 13:39:28 -04:00
Colin Dean
de1e1fdf0a
Corrects an uncaught spelling error
I guess someone did mot see it.
2023-07-17 10:33:48 -04:00
Issy Long
b9d8fd4f79
Enable issues_for_formula to show only issues, only PRs, or both
- This change is useful for the "these issues are also open for this
  build failure" exception. Hopefully there'll be less noise on PRs with
  people encouraging us to fix things faster if we don't link them to
  WIP PRs (or any PRs at all).
- Fixes https://github.com/Homebrew/brew/issues/ 15608.
2023-07-08 22:15:58 +01:00
Bo Anderson
68289f1165
Add without_api specifier for CLI named args 2023-06-22 01:57:28 +01:00
Markus Reiter
8274920217
Rename OS::Mac::Version to MacOSVersion. 2023-05-09 05:08:38 +02:00
Bo Anderson
44f058edb5
Refactor formula, cask and Ruby source downloads to use shared code 2023-04-27 23:23:07 +01:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Douglas Eichelberger
eb23a2c44a Enable typing in a couple more files 2023-03-03 08:30:15 -08: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
EricFromCanada
dfc9906184
internal messaging fixes 2023-02-10 23:17:16 -05:00
Mike McQuaid
46fc4f9f1b
Don't allow HOMEBREW_INSTALL_FROM_API when building from source
When either being in a non-default prefix or being on an unsupported
macOS version we expect most things to be built from source. In that
environment, do not allow HOMEBREW_INSTALL_FROM_API to be set.

Fixes #14475
2023-02-02 14:49:34 +00:00
Sean Molenaar
2de6958a36
build_environment: add proper types to dump() and fix inreplace error 2022-08-15 19:03:55 +02:00
Rylan Polster
e53ccbc3cd
Remove unnecessary code 2022-06-14 16:06:05 -04:00
Bo Anderson
4cb0b1978c
exceptions: fix did_you_mean error in some scenarios 2022-06-02 05:54:42 +01:00
Bo Anderson
d47517f635
exceptions: handle backslash in args for BuildError 2022-05-20 01:41:26 +01:00
Alexander Bayandin
7fb74cb1dc
Fix error message duplication for installation from URL 2021-12-03 13:15:42 +00:00
XuehaiPan
63f2f6cca7 tap: allow to change tap remote with brew tap --custom-remote 2021-10-12 01:11:34 +08:00
Bo Anderson
c49dc6803b
exceptions: set backtrace for FormulaUnreadableError 2021-09-17 00:06:42 +01:00
fn ⌃ ⌥
c0795b5029 upgrade: raise error if developer and there are cyclic dependencies 2021-09-12 07:56:37 -07:00
Michka Popoff
07df4a7e70
Use Homebrew curl for audit and fetch when specified in the formula
Introduce new :using for urls
2021-08-17 13:35:55 +02:00
Kaito Udagawa
fec4ff5ca3
Insert space
I got the following error message:

Install Clang or run `brew install gcc`.Alternatively, remove the flag to attempt bottle installation.

A space is missing after the period. This change ensures a space to be inserted.
2021-08-09 02:21:45 +09:00
Alexander Bayandin
ce4410fd8d
exceptions: add "Did you mean ..." for FormulaOrCaskUnavailableError 2021-06-22 18:06:52 +01:00
Rylan Polster
2760d981d3
Allow for homebrew/core to be untapped 2021-06-17 14:18:43 -04:00
Bo Anderson
728bb547a7
language: raise ShebangDetectionError rather than a generic error 2021-05-10 05:50:08 +01:00
nandahkrishna
585ec90878
cask_loader: do not auto-tap in FromTapLoader 2021-03-11 21:09:42 +05:30
Bo Anderson
f079373d8c
utils/fork: handle termsig in safe_fork 2021-02-25 13:42:44 +00:00
nandahkrishna
56e0c3d9e8
Update GitHub API usage 2021-02-15 22:38:27 +05:30
nandahkrishna
8e5451df2f
style: use parentheses for assignment in conditions 2021-02-12 18:33:37 +05:30
EricFromCanada
99ad3350ee use single quotes around stanza and parameter names 2021-01-26 16:19:47 -05:00
Mike McQuaid
51b149b8ee
exceptions: more handling of nil status.
This was occurring on ARM CI.
2021-01-21 08:30:36 +00:00
Michka Popoff
5e91802470 checksum: simplify, use only sha256
We use only one sha type right now.

Needed for https://github.com/Homebrew/brew/pull/10186
2021-01-07 20:46:13 +01:00
Mike McQuaid
d345864d7e
exceptions: fix ErrorDuringExecution status.
This can sometimes be nil so handle that.

Fixes #10158
2020-12-28 09:04:08 +00:00
Markus Reiter
3db55d13d6 Improve handling of SIGINT. 2020-12-18 16:48:49 +01:00
Mike McQuaid
eb74717a9e
Fix unbottled dependency handling
- Rename `BuildToolsError` to `UnbottledError` to better reflect what it
  does (particularly now)
- Improve the `UnbottledError` messaging
- Raise the `UnbottledError` for dependencies also when building bottles
  (so that we don't try and build bottles against things that have been
  built from source).
2020-12-11 16:57:47 +00:00
Markus Reiter
c54a9937e7 Remove cask-specific checksum errors. 2020-11-19 19:46:59 +01:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
EricFromCanada
3768b7a6e9 apidoc: update comment wording, punctuation, formatting 2020-11-06 00:21:02 -05:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Markus Reiter
d6b563e752 Support min_named :formula_or_cask. 2020-10-08 11:12:17 +02:00
Markus Reiter
f54b458cda Allow installing casks with brew install. 2020-09-27 22:53:32 +02:00
Markus Reiter
0240128f29 Document exceptions. 2020-08-26 03:13:58 +02:00