2125 Commits

Author SHA1 Message Date
Douglas Eichelberger
92b99b3132 Remove misleading upstream.rbi, enable types in on_system 2023-03-19 19:41:46 -07:00
Douglas Eichelberger
4dcd5ac47f Remove HashValidator 2023-03-19 17:37:58 -07:00
Mike McQuaid
96eb047121
Merge pull request #15008 from dduugg/enable-types
Enable types in Library/Homebrew/cask, etc.
2023-03-19 17:22:18 -04:00
Douglas Eichelberger
4f2ff3819b Clean up rbi files 2023-03-18 16:03:25 -07:00
Ruiyang Wu
4ac228cc41 Use install-info from texinfo if not available in /usr/bin
`install-info` is not shipped with macOS Ventura and some Linux
distros. This commit uses `install-info` from `texinfo` formula if it
is not available in `/usr/bin`.

See: https://github.com/Homebrew/discussions/discussions/4306
2023-03-18 18:24:03 -04:00
Mike McQuaid
6fd54eba5f
Merge pull request #14985 from dduugg/no-compat
Remove compatibility layer
2023-03-15 13:48:00 -04:00
Douglas Eichelberger
da3e28b026 Fix tests 2023-03-14 23:01:08 -07:00
Douglas Eichelberger
cc5b013cb9 Remove compatibility layer 2023-03-14 14:49:34 -07:00
Douglas Eichelberger
a1748605ab Minor Kernel cleanup 2023-03-14 10:27:16 -07:00
Douglas Eichelberger
f4c9a96c70 Enable types in dev-cmd 2023-03-14 08:32:03 -07:00
Douglas Eichelberger
04fa6e24d7 Enable more typing 2023-03-13 09:08:56 -07:00
Douglas Eichelberger
999594dc07 Remove oxford comma from to_sentence default 2023-03-11 17:27:53 -08:00
Issy Long
8e13a6e1f4
Merge pull request #14944 from issyl0/more-rubocop-naming-method-parameter-name
rubocop: Further trim `Naming/MethodParameterName` allowlist
2023-03-11 22:59:39 +00:00
Issy Long
e9d994622e
rubocop: Drop "f" from Naming/MethodParameterName allowlist
- This either stands for "file" but more often than not "formula".
2023-03-11 00:17:27 +00:00
Douglas Eichelberger
76671ef555 Typecheck ENV extensions 2023-03-09 20:51:01 -08:00
Issy Long
89fb8c78e8
rubocop: Drop "s" from Naming/MethodParameterName allowlist
- Most usages of this were in the `pretty_duration` method, where "s"
  is better described as "seconds" since we're calculating a duration.
- I also took the executive decision to do the same to "m" which refers
  to "minutes".
2023-03-08 14:42:53 +00:00
Douglas Eichelberger
7aab1c2a38 Remove ActiveSupport String inflections 2023-03-07 10:16:52 -08:00
Carlo Cabrera
4c4e9369b1
Fix brew style 2023-03-07 23:28:59 +08:00
Carlo Cabrera
46c3c86caa
Parse ld version from -version_details 2023-03-07 22:41:07 +08:00
Mike McQuaid
b698cef945
brew style --fix (and a manual one) 2023-03-07 10:48:35 +00:00
Mike McQuaid
9e370b0a3d
Merge pull request #14847 from dduugg/no-to_sentence
Move Array#to_sentence monkey-patch from ActiveSupport to extend/
2023-03-06 12:37:02 +00:00
Mike McQuaid
5689065c9e
Merge pull request #14880 from dduugg/fix--env
Fix type error in brew --env
2023-03-06 12:33:11 +00:00
Issy Long
6a704f2f40
sorbet: Bump more files to typed: true
- This was done through the `brew typecheck --suggest-typed --update`
  command.
2023-03-05 18:18:59 +00:00
Carlo Cabrera
c4fe6e7617
Incoroporate feedback from code review
- check the version of `/usr/bin/ld` for support of `-no_fixup_chains`
- check for usage of the `-fuse-ld` flag, since this flag is only
  supported by Apple ld64

Also, call `no_fixup_chains` when setting up the build environment.
2023-03-05 16:55:00 +08:00
Douglas Eichelberger
b7d2953412 enable typing in --env 2023-03-03 19:12:33 -08:00
Douglas Eichelberger
e94d3767e6 Add rails license 2023-03-03 12:44:23 -08:00
Douglas Eichelberger
d8ba8c807a Fix type errors 2023-03-03 12:44:23 -08:00
Douglas Eichelberger
e68b02c4a6 Move tests and requires 2023-03-03 12:44:23 -08:00
Douglas Eichelberger
0d200944c8 Move nostdout to lone calling class 2023-03-03 08:30:15 -08:00
Douglas Eichelberger
d98b7845d3 Enable typing in misc files 2023-03-03 08:29:26 -08:00
Carlo Cabrera
1b12d74945
Pass -no_fixup_chains to linker when required
Invoking `ld` with `-undefined dynamic_lookup` emits a warning starting
Xcode 14:

    ld: warning: -undefined dynamic_lookup may not work with chained fixups

Chained fixups is a linker optimisation that results in faster binary
load times, and is enabled by default starting Xcode 13 when the target
is macOS 12 or newer.

However, this interacts poorly with `-undefined dynamic_lookup`, and
Xcode will disable chained fixups when it is invoked with this flag
starting Xcode 14.3. Until then, we may be shipping binaries that are
broken in subtle ways, so let's disable chained fixups when necessary
instead.

I patterned the changes here after the handling of `-no_weak_imports`.
The only difference is that we need to check the flags that were passed
to the linker first to see if we do need to disable chained fixups.

For additional context, see:

https://developer.apple.com/documentation/xcode-release-notes/xcode-13-release-notes
https://www.wwdcnotes.com/notes/wwdc22/110362/
https://www.emergetools.com/blog/posts/iOS15LaunchTime
https://github.com/python/cpython/issues/97524
https://github.com/pybind/pybind11/pull/4301
2023-03-04 00:19:13 +08:00
Mike McQuaid
9296db0c41
Merge pull request #14839 from hyuraku/move-cask/cmd/info-to-cask/info
Move `cask/cmd/info` to `cask/info`
2023-03-01 12:25:26 +00:00
Mike McQuaid
7c15dce285
Merge pull request #14798 from MikeMcQuaid/deprecate_shell
Deprecate `preferred_shell` and `shell_profile`.
2023-02-28 15:18:00 +00:00
Mike McQuaid
32463227ac
Deprecate preferred_shell and shell_profile.
I know that we're outside our normal deprecation cycle but: these are
totally broken with the API and it doesn't make sense to support them
only for non-core formulae.
2023-02-28 15:02:06 +00:00
hyuraku
efdef5f26c move cask/cmd/info to cask/info 2023-03-01 00:00:54 +09:00
Issy Long
267d72a9d0
More comments and TODOs
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-02-28 12:50:05 +00:00
Issy Long
316df75da9
utils: Add a comment to module Kernel to appease RuboCop
- This `Homebrew/utils.rb` file contains one `@api public` method so it's now
  included in `Style/Documentation`.
- This method not having a comment was causing the style specs to fail because
  this file isn't usually failing RuboCop.
- And the test description was confusing so I improved it.
2023-02-28 00:18:52 +00:00
Douglas Eichelberger
2b4d4a3707 Isolate Kernel extensions 2023-02-27 11:22:10 -08:00
Douglas Eichelberger
ff48ce24c4 Copy utils.rb into extend/kernel.rb 2023-02-27 11:19:11 -08:00
Maxim Belkin
c9b289fc3d Use 'wslview' instead of 'xdg-open' on Windows 2023-02-27 14:39:56 +00:00
Bo Anderson
e86a8c2477
Move HOMEBREW_NO_INSTALL_FROM_API defaults to shell 2023-02-24 21:53:08 +00:00
Mike McQuaid
b3db997e7b
os/mac/extend/ENV/super: handle nil sdk.
I'm aware this is not meant to happen but: sometimes it does and the
lack of handling produces a subpar error.
2023-02-23 15:31:04 +00:00
apainintheneck
8de625e0e2 extend/os: clean up requires
These need to be after the original module/class definitions
for the monkey-patching to work correctly.
2023-02-22 21:21:24 -08:00
Mike McQuaid
c3ba29570c
Merge pull request #14653 from danielnachun/libquadmath_linkage
linkage_checker: add libquadmath
2023-02-17 06:02:29 +00:00
danielnachun
99f968535f
linkage_checker: add libquadmath 2023-02-15 19:18:11 -08:00
Mike McQuaid
c5252817c2
analytics: refactor InfluxDB/Google handling. 2023-02-15 16:34:50 +00:00
Sean Molenaar
50e9247da4
fix: add better keys and fuller values to influxDB analytics 2023-02-15 14:12:05 +01:00
Mike McQuaid
4c8ed77302
Improve homebrew/{core,cask} autotapping.
Don't automatically tap these when running a developer command that's
not using the API.

Fixes #14606
2023-02-14 09:54:24 +00:00
Mike McQuaid
2bdf20b0ba
Merge pull request #14576 from apainintheneck/remove-cask-check-for-linux
extend/os: remove cask install on linux
2023-02-12 12:02:24 +00:00
EricFromCanada
dfc9906184
internal messaging fixes 2023-02-10 23:17:16 -05:00