1528 Commits

Author SHA1 Message Date
Mike McQuaid
b066ac414c
SBOM: various fixes.
- be a bit stricter with SBOM handling with the test default formula
  flow in CI by making it raise errors if SBOM's aren't generated and
  validated as expected
- fix handling of HEAD installations of formulae so SBOM generation is
  both correct and doesn't raise errors
- make `Formula#bottle_hash` more accepting of edge cases e.g. HEAD-only
  formulae without a stable spec

Fixes #17333
2024-05-20 09:41:29 +01:00
Caleb Xu
920364ca87
formula: trap CMake FetchContent usage instead of using FETCHCONTENT_FULLY_DISCONNECTED 2024-05-17 14:41:08 -04:00
Mike McQuaid
cff0531888
formula: this was nilable before so remove it.
Other maintainers consider this preferable to setting to `odeprecated`.
2024-05-13 07:42:20 +01:00
Mike McQuaid
222fe8ef0b
Homebrew 4.3.0 deprecation/disable/removals.
The usual pass of deprecating/disabling/removing code for the next
minor Homebrew release.
2024-05-07 12:18:04 +01:00
Markus Reiter
e39a421bb0
Add resource signature. 2024-05-03 22:29:50 +02:00
Mike McQuaid
9da18b634c
formula: fix missing test resources.
Revert one change from https://github.com/Homebrew/brew/pull/17165.

It's unclear to me why this fixes the problem, but it does.

Fixes https://github.com/Homebrew/brew/issues/17203
2024-05-03 08:29:10 +01:00
Markus Reiter
caf87c0336
Warn about undocumented non-private APIs. 2024-05-01 11:35:20 +02:00
Mike McQuaid
7c0b989740
Merge pull request #17153 from apainintheneck/new-formula-json-dependencies-format
New formula internal json v3 dependencies format
2024-05-01 08:45:18 +01:00
apainintheneck
6ad02b8e34 formula: internal json v3 dependencies: address feedback
- rename #dependencies_list to #internal_dependencies_hash
  - the initial implementation returned an array but now it doesn't
- simplify usage of #tap in #internal_dependencies_hash
- remove safe navigation operator usages in #internal_dependencies_hash
- better document why implicit dependencies are not included in the API JSON
- add new test fixture formula to better test generation of uses from
  macos bounds with the new internal json format
2024-04-30 23:44:25 -07:00
Markus Reiter
0b56d0be4a
Document Tab.for_keg and use Keg#tab where possible. 2024-04-28 20:50:13 +02:00
apainintheneck
039eb1adff Update formula internal json v3 to improve dependencies readability
This improves the readability of dependencies in the json we
produce for this internally.
2024-04-27 18:07:54 -07:00
Markus Reiter
0f0055ede4
Make documentation @api private by default. 2024-04-26 19:04:20 +02:00
Markus Reiter
c76170a456
Hide #to_s in docs. 2024-04-26 14:04:55 +02:00
Markus Reiter
fe4ef62aa9
Hide #inspect in docs. 2024-04-26 13:20:05 +02:00
Branch Vincent
4bf8fef5aa
Reapply "formula: configure git/npm to ignore .brew_home"
This reverts commit abf8df38661c4b60f122336d3db3a1a810d3a0e8.
2024-04-23 18:35:55 -07:00
Mike McQuaid
abf8df3866
Revert "formula: configure git/npm to ignore .brew_home" 2024-04-23 16:09:57 +01:00
Mike McQuaid
b5f857b627
Merge pull request #17081 from alebcay/formula-offline-phases
Support for opt-in network isolation in build/test sandboxes
2024-04-23 08:30:10 +01:00
Mike McQuaid
5ad4e6e293
Merge pull request #17128 from reitermarkus/docs-api-public
Explicitly mark non-private APIs.
2024-04-23 08:28:27 +01:00
Caleb Xu
7c11699d73
formula: add methods for allowing/denying network access 2024-04-22 22:39:44 -04:00
Markus Reiter
4b432c7ea4
Explicitly mark non-private APIs. 2024-04-22 21:16:49 +02:00
Branch Vincent
46a3bbe3c5
formula: configure git/npm to ignore .brew_home 2024-04-19 11:45:25 -07:00
Caleb Xu
60d9e63ae4
formula: add FETCHCONTENT_FULLY_DISCONNECTED to std_cmake_args 2024-04-11 13:03:33 -04:00
Michael Cho
f81dcd8c58
go_resource deprecation comments
Signed-off-by: Michael Cho <michael@michaelcho.dev>
2024-04-01 09:00:32 -04:00
apainintheneck
db507be41a keg: update sorting by version logic
This updates logic to add a `#scheme_and_version` method to be used
with `.sort_by` and `.max_by`. Using `Keg#version` by itself can be
inaccurate when different version schemes are present. This also
updates the behavior of `Formula#eligible_kegs_for_cleanup` to match
the previous behavior. We were dropping the wrong keg based on the
sort being reversed in a previous PR.
2024-03-31 17:52:32 -07:00
Bo Anderson
dd382487c7
Sort kegs based on version scheme 2024-03-29 23:33:41 +00:00
Michael Cho
cc82c52d6f
formula: remove setting up home for python 2.7
Signed-off-by: Michael Cho <michael@michaelcho.dev>
2024-03-14 02:05:52 -04:00
apainintheneck
08442734ab s/Tap.reverse_tap_migrations_renames/Tap.tap_migration_oldnames/ 2024-03-09 10:27:22 -08:00
apainintheneck
d4a273443c tap: add #reverse_tap_migrations_renames to speed things up
This gets used by `Tap.reverse_tap_migrations_renames` and reduces
the amount of information that needs to be calculated on the fly
every time.
2024-03-09 10:25:47 -08:00
Mike McQuaid
b70884a474
Merge pull request #16848 from Homebrew/rubocop_default_hash_syntax
rubocop: default hash syntax.
2024-03-08 07:55:33 +00:00
apainintheneck
e0cea903ec s/to_api_hash/to_internal_api_hash/ 2024-03-07 20:29:58 -08:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Michael Cho
6638243cd8
formula: update bottle :unneeded comment
Signed-off-by: Michael Cho <michael@michaelcho.dev>
2024-03-07 11:02:01 -05:00
Michael Cho
72f8399110
formula_auditor: move out synced_versions_formulae logic
* tap: take ownership of synced_versions_formulae.json
* formula: add synced_with_other_formulae? logic

Signed-off-by: Michael Cho <michael@michaelcho.dev>
2024-03-03 20:51:09 -05:00
Issy Long
f4218a6316
Fix RuboCop Performance/MapCompact offenses
- Rename an iterator variable since it would make the line too long.
2024-02-25 22:59:59 +00: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
4641690674
Refactor Formulary::loader_for. 2024-02-14 20:28:06 +01:00
Markus Reiter
1c4b06fce2
Merge pull request #16647 from reitermarkus/uses_from_macos_sig
Refactor and add type signature for `uses_from_macos`.
2024-02-13 19:36:11 +01:00
Markus Reiter
a3a1b4c253
Check tap migrations for renames. 2024-02-13 06:03:10 +01:00
Markus Reiter
c6788bb27e
Avoid T.unsafe. 2024-02-13 00:42:54 +01:00
Markus Reiter
d9712f4d50
Refactor and add type signature for uses_from_macos. 2024-02-13 00:31:10 +01:00
Markus Reiter
73f1629fa1
Merge pull request #16624 from reitermarkus/avoid-t-must
Avoid `T.must`.
2024-02-10 12:38:43 +01:00
Markus Reiter
5cc1ddc5c5
Use numbered block parameter.
Co-authored-by: Douglas Eichelberger <697964+dduugg@users.noreply.github.com>
2024-02-09 17:03:01 +01:00
Markus Reiter
a20d95b1b5
Simplify conditionals. 2024-02-09 16:51:35 +01:00
Markus Reiter
1d549c4815
Avoid T.must. 2024-02-08 20:07:01 +01:00
Markus Reiter
8cbb5566b6
Remove unused methods. 2024-02-08 20:06:48 +01:00
Kevin
d94772171f
Merge pull request #16541 from apainintheneck/next-gen-api-formula-json-v3
Next gen api formula json v3
2024-02-04 11:16:01 -08:00
Eric Knibbe
e63b1f4da5
docs: monospace suggested values 2024-02-04 15:42:26 +01:00
apainintheneck
54b54b7e93
formula: change how #to_hash is defined for backwards compatibility
Now the output of commands like `brew info --json=` and
`brew generate-formula-api` should be the same as before along with
the additional files for the internal API. Before this commit the
hash key order had changed.
2024-02-04 13:50:57 +01:00