38364 Commits

Author SHA1 Message Date
Sam Ford
370e61e504
perl: refactor to align Shebang modules
This primarily reworks `Language::Perl::Shebang` to use constants for
the shebang regex and max length (like the previous Node commit) and
to extract the `RewriteInfo` call into a separate method (like Python
and Node).

Besides that, this also adds type signatures to the methods.
2023-08-15 00:53:41 -04:00
Sam Ford
d1297c0974
node: add shebang rewriting
Formulae that depend on `node` sometimes contain files that use a
shebang like `#!/usr/bin/env node` and this can lead to issues when
the `node` in a user's environment isn't brewed `node`.

For example, some node modules are compiled when the formula is built
but if the user's `node` is a different major version than brew's
`node`, the differing `NODE_MODULE_VERSION` can produce an error when
certain parts of the application are used. The formula may build and
test fine and the issue may only become apparent when more of the
application is exercised.

This adds a `Language::Node::Shebang` module (borrowing from the
existing Perl and Python examples), which allows us to use
`rewrite_shebang detected_node_shebang, ...` in formulae to address
this type of issue.
2023-08-15 00:53:41 -04:00
Bo Anderson
d30b68715f
Merge pull request #15866 from MikeMcQuaid/update_report_sharding_add_delete
cmd/update-report: correctly handle added/deleted formulae/casks.
2023-08-15 03:07:50 +01:00
Carlo Cabrera
e1dd963a84
Merge pull request #15867 from Homebrew/sorbet-files-update
sorbet: Update RBI files.
2023-08-15 09:25:13 +08:00
BrewTestBot
ebdea56cd8
sorbet: Autobump sigils via Spoom
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow.
2023-08-15 00:25:50 +00:00
BrewTestBot
3c9dce0ac6
sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow.
2023-08-15 00:25:50 +00:00
Mike McQuaid
8d1064cdb1
formula_{auditor,versions}: handle sharding.
Ensure that `FormulaVersions` correctly also looks at older paths for
sharded formulae.

While we're here, also cleanup `FormulaVersions` a bit to have more
signatures, cleanup dead code, make more code private, improve
variable naming.
2023-08-14 19:31:15 +01:00
Mike McQuaid
38f00671c4
cmd/update-report: correctly handle added/deleted formulae/casks.
If a formulae or cask is marked as both added and deleted, we've just
incorrectly detected it. Remove it from the report.

This can happen when a formula or cask is moved around in the repository
e.g. with sharding.
2023-08-14 19:28:56 +01:00
Mike McQuaid
0bd17c5b79
Merge pull request #15863 from dduugg/strict-types
Turn up the types
2023-08-14 12:40:15 +01:00
Carlo Cabrera
b8b46501e4
Merge pull request #15864 from carlocab/fat-rpaths
os/mac/mach: fix rpath deletion of fat machos
4.1.5
2023-08-14 14:43:48 +08:00
Carlo Cabrera
93b43ad7a9
os/mac/mach: fix rpath deletion of fat machos
Fixes #15859.
2023-08-14 14:29:05 +08:00
Douglas Eichelberger
d01cda2815 Turn up the types 2023-08-12 22:01:22 -07:00
Eric Knibbe
2cfea600d4
Merge pull request #15860 from EricFromCanada/docs-terminology
Formula-Cookbook: expand terminology table
2023-08-12 22:01:38 -04:00
Eric Knibbe
569c833924
Formula-Cookbook: expand terminology table 2023-08-12 21:48:16 -04:00
Carlo Cabrera
7044f50f88
Merge pull request #15858 from Homebrew/sponsors-maintainers-man-completions 2023-08-12 19:21:36 +08:00
BrewTestBot
1e2fcb25d4
Update sponsors.
Autogenerated by the [sponsors-maintainers-man-completions](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/sponsors-maintainers-man-completions.yml) workflow.
2023-08-12 00:05:11 +00:00
Mike McQuaid
f70a49be2f
Merge pull request #15852 from MikeMcQuaid/tests_fail_fast
dev-cmd/tests: add `--fail-fast`.
2023-08-11 04:45:35 +01:00
Mike McQuaid
237d1e783f
Merge pull request #15851 from MikeMcQuaid/tests_macos_subversion
tests: install Subversion for macOS.
2023-08-10 16:45:43 +01:00
Mike McQuaid
16feec525f
tests: install Subversion for macOS.
Some tests need this and warn without and it's not installed by
default these days.
2023-08-10 16:27:52 +01:00
Mike McQuaid
597f0840a3
dev-cmd/tests: add --fail-fast.
This is useful when testing very slow test files with many tests.
2023-08-10 16:27:37 +01:00
Mike McQuaid
62d1ed0ca9
Merge pull request #15850 from MikeMcQuaid/fix_cask_sharding_tests
Fix cask sharding issues
2023-08-10 16:21:35 +01: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
1a8f1be34b
Merge pull request #15849 from razvanazamfirei/sharding-audit
cask/audit: audit for appropriate sharding directory
2023-08-09 20:44:50 +01:00
Razvan Azamfirei
72df964b33
change path 2023-08-09 15:27:36 -04:00
Razvan Azamfirei
a916d6184b
Update Library/Homebrew/cask/audit.rb
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-08-09 15:26:47 -04:00
Razvan Azamfirei
ef9e0bc8a6
cask/audit: audit for appropriate sharding directory 2023-08-09 14:52:30 -04:00
Mike McQuaid
f4f170c00d
Merge pull request #15848 from MikeMcQuaid/formula_cop_sharding
formula_cop: fix `style_exceptions_dir` handling.
2023-08-09 16:12:45 +01:00
Mike McQuaid
d30fee25e4
formula_cop: fix style_exceptions_dir handling.
This needed to be adjusted to handle a sharded homebrew/core and
repositories with formulae in the root.
2023-08-09 15:20:57 +01:00
Mike McQuaid
f18aa6ff1a
Merge pull request #15847 from MikeMcQuaid/all_casks_subdirectory
tap: always create new casks in subdirectory.
2023-08-09 12:55:13 +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
319faed8f9
Merge pull request #15845 from MikeMcQuaid/update_deleted_installed
update_report: show "Delete and Installed" header.
2023-08-09 10:59:01 +01:00
Mike McQuaid
565eb363ea
update_report: show "Delete and Installed" header.
Clarify that the deleted formulae/casks when not using `report_all`
are only those that have been deleted _and_ the user has them
installed. This should avoid users glossing over this information as
it is pretty relevant to them.

While we're here, refactor some of the `report_all` logic to make it
easier to remove it all on the next Homebrew major/minor version.
2023-08-08 16:57:03 +01:00
Mike McQuaid
dc42544c59
Merge pull request #15844 from EricFromCanada/cookbook-env-vars
Formula Cookbook: expand environment variable section
2023-08-08 15:10:03 +01:00
Eric Knibbe
0f4b0028b5
Formula-Cookbook: expand environment var section 2023-08-08 08:22:59 -04:00
Mike McQuaid
d313e8b027
Merge pull request #15824 from dduugg/inreplace-static
Make inreplace a purely static method v2
2023-08-08 12:32:10 +01:00
Mike McQuaid
97fdc9243b
Merge pull request #15843 from EricFromCanada/cookbook-download-strategies
Formula Cookbook: revise download strategy docs
2023-08-08 12:30:53 +01:00
Douglas Eichelberger
5d5c22e104 Replace integration test with unit test 2023-08-07 18:32:08 -07:00
Douglas Eichelberger
2b29c498fa s/blk/block 2023-08-07 17:26:46 -07:00
Eric Knibbe
2b8c37b04e
Formula-Cookbook: revise download strategy docs 2023-08-07 15:30:11 -04:00
Mike McQuaid
a7d8ba131e
Merge pull request #15839 from Homebrew/sponsors-maintainers-man-completions
Update manpage and completions.
2023-08-07 19:22:44 +01:00
BrewTestBot
c2160f68e7
Update manpage and completions.
Autogenerated by the [sponsors-maintainers-man-completions](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/sponsors-maintainers-man-completions.yml) workflow.
2023-08-07 16:10:53 +00:00
Mike McQuaid
7ed11b230f
Merge pull request #15836 from eugenesvk/hide_section
Allow hiding new/deleted formula/cask sections on update
2023-08-07 17:09:57 +01:00
eugenesvk
2c7c064040 Allow hiding new formula/cask sections on update 2023-08-07 20:38:54 +07:00
Mike McQuaid
a8022e6040
Merge pull request #15835 from carlocab/framework-install-names
keg_relocate: retain framework info in relocatable install names
2023-08-07 08:47:05 +01:00
Mike McQuaid
3929bbc1de
Merge pull request #15830 from branchvincent/pip-no-compile
formula: use pip's `--no-compile`
2023-08-07 08:20:15 +01:00
Mike McQuaid
6b773a36e8
Merge pull request #15831 from branchvincent/update-python-git-clone
pypi: support updating resources for git clones
2023-08-07 08:19:44 +01:00
Carlo Cabrera
dbeac59584
keg_relocate: retain framework info in relocatable install names
`dyld` uses the target library's install name to work out whether this
is a Framework or a dylib, which affects how `dyld` searches for the
desired library.

We should therefore avoid confusing `dyld` by including the
`*.framework` part of the install name in the target dylib, which is
what this change does.

Here's a concrete example of what this changes. Before:

    ❯ otool -L /usr/local/bin/python3
    /usr/local/bin/python3:
            @loader_path/../Python (compatibility version 3.11.0, current version 3.11.0)
            /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)

After:

    ❯ otool -L /usr/local/bin/python3
    /usr/local/bin/python3:
            @loader_path/../../../../Python.framework/Versions/3.11/Python (compatibility version 3.11.0, current version 3.11.0)
            /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)

By retaining the `Python.framework` part of the install name, we make
sure that `dyld` knows that it should be looking for a framework rather
than a dylib.
2023-08-07 14:43:56 +08:00
Kevin
98f1be77f9
Merge pull request #15829 from apainintheneck/add-installed-flag-to-bump-cmd
cmd/bump: add --installed flag
4.1.4
2023-08-06 20:39:46 -07:00
Bo Anderson
c0233eaa2a
Merge pull request #15834 from muescha/muescha-fix-fignature-KeyboardLayout
unversioned_cask_checker.rb - fix signature of KeyboardLayout
2023-08-06 21:14:03 +01:00
Muescha
c447aa6d94
unversioned_cask_checker.rb - fix signature of KeyboardLayout
fix signature for KeyboardLayout
2023-08-06 21:30:45 +02:00