-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are all of the undef
s we use really necessary?
#17998
Comments
Change the value of The There was a previous goal to get rid of these warnings. |
You answered a question I didn't even know I had (yet): how do I actually check for these being unused. Thanks! |
$ HOMEBREW_RUBY_WARNINGS="-W2" brew info wget
/opt/homebrew/Library/Homebrew/extend/os/mac/hardware/cpu.rb:38: warning: method redefined; discarding old in_rosetta2?
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/_methods.rb:257: warning: previous definition of in_rosetta2? was here
/opt/homebrew/Library/Homebrew/extend/os/mac/hardware/cpu.rb:92: warning: method redefined; discarding old virtualized?
/opt/homebrew/Library/Homebrew/hardware.rb:163: warning: previous definition of virtualized? was here
/opt/homebrew/Library/Homebrew/extend/pathname.rb:235: warning: method redefined; discarding old extname
/opt/homebrew/Library/Homebrew/extend/pathname.rb:507: warning: method redefined; discarding old rmtree
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/pathname.rb:598: warning: previous definition of rmtree was here
<internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: loading in progress, circular require considered harmful - /opt/homebrew/Library/Homebrew/cli/parser.rb
from /opt/homebrew/Library/Homebrew/brew.rb:50:in `<main>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cli/parser.rb:4:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/abstract_command.rb:4:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
/opt/homebrew/Library/Homebrew/extend/os/mac/development_tools.rb:64: warning: method redefined; discarding old installation_instructions
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/_methods.rb:257: warning: previous definition of installation_instructions was here
/opt/homebrew/Library/Homebrew/extend/os/mac/development_tools.rb:69: warning: method redefined; discarding old custom_installation_instructions
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/_methods.rb:257: warning: previous definition of custom_installation_instructions was here
<internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: loading in progress, circular require considered harmful - /opt/homebrew/Library/Homebrew/cask/cask_loader.rb
from /opt/homebrew/Library/Homebrew/brew.rb:65:in `<main>'
from /opt/homebrew/Library/Homebrew/commands.rb:37:in `valid_internal_cmd?'
from /opt/homebrew/Library/Homebrew/extend/kernel.rb:11:in `require?'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cmd/info.rb:5:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/missing_formula.rb:6:in `<top (required)>'
from /opt/homebrew/Library/Homebrew/missing_formula.rb:8:in `<module:Homebrew>'
from /opt/homebrew/Library/Homebrew/missing_formula.rb:9:in `<module:MissingFormula>'
from /opt/homebrew/Library/Homebrew/missing_formula.rb:198:in `singleton class'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/extend/os/missing_formula.rb:4:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/extend/os/mac/missing_formula.rb:5:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cask/cask_loader.rb:5:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cask/cask.rb:6:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
<internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: loading in progress, circular require considered harmful - /opt/homebrew/Library/Homebrew/cask/cask.rb
from /opt/homebrew/Library/Homebrew/brew.rb:65:in `<main>'
from /opt/homebrew/Library/Homebrew/commands.rb:37:in `valid_internal_cmd?'
from /opt/homebrew/Library/Homebrew/extend/kernel.rb:11:in `require?'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cmd/info.rb:5:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/missing_formula.rb:6:in `<top (required)>'
from /opt/homebrew/Library/Homebrew/missing_formula.rb:8:in `<module:Homebrew>'
from /opt/homebrew/Library/Homebrew/missing_formula.rb:9:in `<module:MissingFormula>'
from /opt/homebrew/Library/Homebrew/missing_formula.rb:198:in `singleton class'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/extend/os/missing_formula.rb:4:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/extend/os/mac/missing_formula.rb:5:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cask/cask_loader.rb:5:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cask/cask.rb:8:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cask/dsl.rb:7:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/livecheck.rb:5:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
/opt/homebrew/Library/Homebrew/extend/os/mac/missing_formula.rb:24: warning: method redefined; discarding old cask_reason
/opt/homebrew/Library/Homebrew/missing_formula.rb:194: warning: previous definition of cask_reason was here
/opt/homebrew/Library/Homebrew/extend/os/mac/missing_formula.rb:31: warning: method redefined; discarding old suggest_command
/opt/homebrew/Library/Homebrew/missing_formula.rb:196: warning: previous definition of suggest_command was here
/opt/homebrew/Library/Homebrew/extend/os/mac/formula_support.rb:6: warning: method redefined; discarding old applicable?
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/_methods.rb:257: warning: previous definition of applicable? was here
/opt/homebrew/Library/Homebrew/extend/os/mac/keg.rb:33: warning: method redefined; discarding old codesign_patched_binary
/opt/homebrew/Library/Homebrew/keg.rb:548: warning: previous definition of codesign_patched_binary was here
<internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: loading in progress, circular require considered harmful - /opt/homebrew/Library/Homebrew/formula.rb
from /opt/homebrew/Library/Homebrew/brew.rb:65:in `<main>'
from /opt/homebrew/Library/Homebrew/commands.rb:37:in `valid_internal_cmd?'
from /opt/homebrew/Library/Homebrew/extend/kernel.rb:11:in `require?'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cmd/info.rb:8:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/formula.rb:28:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/linkage_checker.rb:5:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
<internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: loading in progress, circular require considered harmful - /opt/homebrew/Library/Homebrew/formula.rb
from /opt/homebrew/Library/Homebrew/brew.rb:65:in `<main>'
from /opt/homebrew/Library/Homebrew/commands.rb:37:in `valid_internal_cmd?'
from /opt/homebrew/Library/Homebrew/extend/kernel.rb:11:in `require?'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cmd/info.rb:8:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/formula.rb:29:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/extend/ENV.rb:5:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/diagnostic.rb:6:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
<internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: loading in progress, circular require considered harmful - /opt/homebrew/Library/Homebrew/extend/ENV.rb
from /opt/homebrew/Library/Homebrew/brew.rb:65:in `<main>'
from /opt/homebrew/Library/Homebrew/commands.rb:37:in `valid_internal_cmd?'
from /opt/homebrew/Library/Homebrew/extend/kernel.rb:11:in `require?'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cmd/info.rb:8:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/formula.rb:29:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/extend/ENV.rb:5:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/diagnostic.rb:11:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/system_config.rb:7:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
/opt/homebrew/Library/Homebrew/extend/os/mac/system_config.rb:32: warning: method redefined; discarding old core_tap_config
/opt/homebrew/Library/Homebrew/system_config.rb:136: warning: previous definition of core_tap_config was here
/opt/homebrew/Library/Homebrew/extend/os/mac/extend/ENV/super.rb:7: warning: method redefined; discarding old shims_path
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/_methods.rb:257: warning: previous definition of shims_path was here
/opt/homebrew/Library/Homebrew/extend/os/mac/language/java.rb:6: warning: method redefined; discarding old java_home
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/_methods.rb:257: warning: previous definition of java_home was here
==> wget: stable 1.24.5 (bottled), HEAD
Internet file retriever
https://www.gnu.org/software/wget/
Installed
/opt/homebrew/Cellar/wget/1.24.5 (92 files, 4.5MB) *
Poured from bottle using the formulae.brew.sh API on 2024-07-04 at 10:26:26
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/w/wget.rb
License: GPL-3.0-or-later
==> Dependencies
Build: pkg-config ✔
Required: libidn2 ✔, openssl@3 ✔, gettext ✔, libunistring ✔
==> Options
--HEAD
Install HEAD version
==> Analytics
install: 74,368 (30 days), 265,276 (90 days), 1,001,763 (365 days)
install-on-request: 74,218 (30 days), 264,636 (90 days), 999,749 (365 days)
build-error: 9 (30 days)
mikebook # HOMEBREW_RUBY_WARNINGS="-W2" brew info wget
/opt/homebrew/Library/Homebrew/extend/os/mac/hardware/cpu.rb:38: warning: method redefined; discarding old in_rosetta2?
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/_methods.rb:257: warning: previous definition of in_rosetta2? was here
/opt/homebrew/Library/Homebrew/extend/os/mac/hardware/cpu.rb:92: warning: method redefined; discarding old virtualized?
/opt/homebrew/Library/Homebrew/hardware.rb:163: warning: previous definition of virtualized? was here
/opt/homebrew/Library/Homebrew/extend/pathname.rb:235: warning: method redefined; discarding old extname
/opt/homebrew/Library/Homebrew/extend/pathname.rb:507: warning: method redefined; discarding old rmtree
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/pathname.rb:598: warning: previous definition of rmtree was here
<internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: loading in progress, circular require considered harmful - /opt/homebrew/Library/Homebrew/cli/parser.rb
from /opt/homebrew/Library/Homebrew/brew.rb:50:in `<main>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cli/parser.rb:4:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/abstract_command.rb:4:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
/opt/homebrew/Library/Homebrew/extend/os/mac/development_tools.rb:64: warning: method redefined; discarding old installation_instructions
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/_methods.rb:257: warning: previous definition of installation_instructions was here
/opt/homebrew/Library/Homebrew/extend/os/mac/development_tools.rb:69: warning: method redefined; discarding old custom_installation_instructions
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/_methods.rb:257: warning: previous definition of custom_installation_instructions was here
<internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: loading in progress, circular require considered harmful - /opt/homebrew/Library/Homebrew/cask/cask_loader.rb
from /opt/homebrew/Library/Homebrew/brew.rb:65:in `<main>'
from /opt/homebrew/Library/Homebrew/commands.rb:37:in `valid_internal_cmd?'
from /opt/homebrew/Library/Homebrew/extend/kernel.rb:11:in `require?'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cmd/info.rb:5:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/missing_formula.rb:6:in `<top (required)>'
from /opt/homebrew/Library/Homebrew/missing_formula.rb:8:in `<module:Homebrew>'
from /opt/homebrew/Library/Homebrew/missing_formula.rb:9:in `<module:MissingFormula>'
from /opt/homebrew/Library/Homebrew/missing_formula.rb:198:in `singleton class'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/extend/os/missing_formula.rb:4:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/extend/os/mac/missing_formula.rb:5:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cask/cask_loader.rb:5:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cask/cask.rb:6:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
<internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: loading in progress, circular require considered harmful - /opt/homebrew/Library/Homebrew/cask/cask.rb
from /opt/homebrew/Library/Homebrew/brew.rb:65:in `<main>'
from /opt/homebrew/Library/Homebrew/commands.rb:37:in `valid_internal_cmd?'
from /opt/homebrew/Library/Homebrew/extend/kernel.rb:11:in `require?'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cmd/info.rb:5:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/missing_formula.rb:6:in `<top (required)>'
from /opt/homebrew/Library/Homebrew/missing_formula.rb:8:in `<module:Homebrew>'
from /opt/homebrew/Library/Homebrew/missing_formula.rb:9:in `<module:MissingFormula>'
from /opt/homebrew/Library/Homebrew/missing_formula.rb:198:in `singleton class'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/extend/os/missing_formula.rb:4:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/extend/os/mac/missing_formula.rb:5:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cask/cask_loader.rb:5:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cask/cask.rb:8:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cask/dsl.rb:7:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/livecheck.rb:5:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
/opt/homebrew/Library/Homebrew/extend/os/mac/missing_formula.rb:24: warning: method redefined; discarding old cask_reason
/opt/homebrew/Library/Homebrew/missing_formula.rb:194: warning: previous definition of cask_reason was here
/opt/homebrew/Library/Homebrew/extend/os/mac/missing_formula.rb:31: warning: method redefined; discarding old suggest_command
/opt/homebrew/Library/Homebrew/missing_formula.rb:196: warning: previous definition of suggest_command was here
/opt/homebrew/Library/Homebrew/extend/os/mac/formula_support.rb:6: warning: method redefined; discarding old applicable?
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/_methods.rb:257: warning: previous definition of applicable? was here
/opt/homebrew/Library/Homebrew/extend/os/mac/keg.rb:33: warning: method redefined; discarding old codesign_patched_binary
/opt/homebrew/Library/Homebrew/keg.rb:548: warning: previous definition of codesign_patched_binary was here
<internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: loading in progress, circular require considered harmful - /opt/homebrew/Library/Homebrew/formula.rb
from /opt/homebrew/Library/Homebrew/brew.rb:65:in `<main>'
from /opt/homebrew/Library/Homebrew/commands.rb:37:in `valid_internal_cmd?'
from /opt/homebrew/Library/Homebrew/extend/kernel.rb:11:in `require?'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cmd/info.rb:8:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/formula.rb:28:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/linkage_checker.rb:5:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
<internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: loading in progress, circular require considered harmful - /opt/homebrew/Library/Homebrew/formula.rb
from /opt/homebrew/Library/Homebrew/brew.rb:65:in `<main>'
from /opt/homebrew/Library/Homebrew/commands.rb:37:in `valid_internal_cmd?'
from /opt/homebrew/Library/Homebrew/extend/kernel.rb:11:in `require?'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cmd/info.rb:8:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/formula.rb:29:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/extend/ENV.rb:5:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/diagnostic.rb:6:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
<internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37: warning: loading in progress, circular require considered harmful - /opt/homebrew/Library/Homebrew/extend/ENV.rb
from /opt/homebrew/Library/Homebrew/brew.rb:65:in `<main>'
from /opt/homebrew/Library/Homebrew/commands.rb:37:in `valid_internal_cmd?'
from /opt/homebrew/Library/Homebrew/extend/kernel.rb:11:in `require?'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/cmd/info.rb:8:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/formula.rb:29:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/extend/ENV.rb:5:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/diagnostic.rb:11:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /opt/homebrew/Library/Homebrew/system_config.rb:7:in `<top (required)>'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
/opt/homebrew/Library/Homebrew/extend/os/mac/system_config.rb:32: warning: method redefined; discarding old core_tap_config
/opt/homebrew/Library/Homebrew/system_config.rb:136: warning: previous definition of core_tap_config was here
/opt/homebrew/Library/Homebrew/extend/os/mac/extend/ENV/super.rb:7: warning: method redefined; discarding old shims_path
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/_methods.rb:257: warning: previous definition of shims_path was here
/opt/homebrew/Library/Homebrew/extend/os/mac/language/java.rb:6: warning: method redefined; discarding old java_home
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/_methods.rb:257: warning: previous definition of java_home was here
==> wget: stable 1.24.5 (bottled), HEAD
Internet file retriever
https://www.gnu.org/software/wget/
Installed
/opt/homebrew/Cellar/wget/1.24.5 (92 files, 4.5MB) *
Poured from bottle using the formulae.brew.sh API on 2024-07-04 at 10:26:26
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/w/wget.rb
License: GPL-3.0-or-later
==> Dependencies
Build: pkg-config ✔
Required: libidn2 ✔, openssl@3 ✔, gettext ✔, libunistring ✔
==> Options
--HEAD
Install HEAD version
==> Analytics
install: 74,368 (30 days), 265,276 (90 days), 1,001,763 (365 days)
install-on-request: 74,218 (30 days), 264,636 (90 days), 999,749 (365 days)
build-error: 9 (30 days) |
It's unclear to me what the "right"/Sorbet-friendly way to do this is. CC @dduugg for thoughts. |
Here's how Sorbet deals with it: |
I'm so honored someone asked! I haven't been a fan of how we do OS-specific code, and I would be curious to hear about how we landed there. (I wasted hours in confusion before I caught on, not realizing that methods may be dynamically redefined based on the OS.) Using Also, is there a reason we're reluctant to do OS checks within methods? Feels like an over-optimization to avoid them (it should be plenty fast, though we should be able to cache the result). This seems ~fine to me: sig { params(path: Pathname).returns(T::Boolean) }
def executable_path?(path)
if OS.mac?
path.mach_o_executable? || path.text_executable?
elsif OS.linux?
path.elf? || path.text_executable?
else
path.text_executable? || path.executable?
end
end |
I'd be game to try something like this.
I think the reason has to do with readability -- littering
I'm a bit sympathetic to this. I think moving OS-specific code into separate files makes these methods harder to reason about (since you now need to have multiple files open to do this), and there was definitely a point where I had the same confusion you did. It also makes the source displayed on rubydoc.brew.sh pretty useless for some methods (example). |
I'm not that big a fan of the existing platform-specific code organization approach either but I'm not aware of any better approaches. I wonder if it'd make sense to add some developer documentation about it so that it's more obvious for new contributors how it works assuming it doesn't already exist somewhere. |
Am OK changing up the way things are but I'm not particularly a fan of a factory approach in Ruby. |
I did much of the original cross-platform work in Homebrew/brew and decided on the approach that would be landed in Homebrew/brew when Linuxbrew merged in. This was based on my work across several other open source projects and ~4 companies building and maintaining cross-platform software in a way that was maintainable in the longer-term.
Yes:
This is part of it. Another part of it is, if you're porting to a new OS in future (this is not hypothetical, I have an email in my inbox asking about porting Homebrew to Windows so this is timely 😁): being able to relatively easy tell "which parts of Homebrew already require cross-platform code" rather than "
This would be good to address in RubyDoc. I don't think adjusting the code to improve the generated documentation makes sense.
Same here. I strongly dislike it, sorry. I would be game for something that maintains the file separation we have today while avoiding the need to I would ideally like us to lean harder into this approach and have fewer still/no
I'm game to do this if someone can suggest where they'd expect to find said documentation. A "cross-platform code" section in docs.brew.sh for "Contributors"? |
For this specific
This also seems like a good option for us to progress with Sorbet strict usage. It'd be a shame to be blocked on making progress on Sorbet strict additions to requiring us to resolve how we use |
I don't imagine this to be helpful, if it's a general "methods may be redefined in |
My thinking was more that this documentation would explain how we separate code by OSs and why to ease people doing either Homebrew/brew platform work or porting to a new platform. Another undef-avoiding option would be that we move the "generic" layer to Similarly, we could use I'm open to ideas, I just mainly want to avoid:
|
Agreed, personally I love (/feel reassured) when reading how technical decisions were thought out and considered.
I think this is a very promising approach! ( |
To be clear: I'm not personally planning on rolling out this approach any time soon but someone in this thread who feels strongly should do so 😁. To unblock things for now (CC @issyl0!), I'd like to strongly suggest we either do:
or, which I'd now be fine with: just remove these |
As of #18056 we suppress type errors caused by using Here is a draft of using Note that sorbet has limited support for |
Gah, #18056 doesn't work like I had hoped. You can see that https://github.com/Homebrew/brew/blob/70b072a/Library/Homebrew/extend/os/mac/readall.rb is marked I was somewhat indifferent to the |
Should probably just remove the brew/Library/Homebrew/sorbet/config Line 7 in fc8b80a
|
I don't think |
Does it? module A
def f(x)
p "no error"
end
end
class B
sig { params(x: Integer).void }
def f(x)
p x
end
end
B.prepend(A)
B.new.f("ABC")
=> no error It also doesn't work at all for class methods - I think that would require splitting further. |
Correct, tbc it's due to defining the same method multiple times within the same namespace. Sorbet is happy at |
Sorry, that isn't quite my bug report. If |
Ah, gotcha. Though it does however lose the ability for arity checking: Method redefinitions at least checked that behaviour. Not sure how to best to get that back to get the best of both. I do generally agree though that something like prepend makes sense if we can get it right. |
I imagine interfaces could be one solution there. |
It occurs to me that if a generic-OS path existed, it would solve the discoverability issue for me, as well as the It:
It still suffers from the issue that signatures are not enforced in every OS extension file, even at # Library/Homebrew/extend/os/linux/cleaner.rb
module CleanerLinux
include CleanerOS
private
sig { override.params(path: Pathname).returns(T::Boolean) }
def executable_path?(path)
path.elf? || path.text_executable?
end
end
class Cleaner
include CleanerOS
end (Sorry for throwing so many approaches onto this thread, though it's helping me understand what coding styles are aligned with Homebrew. Folks in the sorbet Slack may find a more definitive answer there…) |
It does already. Run
I like this approach more than others suggested above and mostly more than what exists already. It'd be nice to be able to reduce the boilerplate there a little, if at all possible but not a blocker, but I agree having the method defined just in the
I like this even more, nice work.
No, it's good. More ideas means we get a better end result! |
Are we good to close this, now that we have an approach from #18305 ? |
I think it'd be good to wait for this. After that, I think it'd be good to have:
Based on the format we've decided and used consistently. |
👍 This is mostly resolved with #18378 (which I may chunk into smaller pieces) with the exceptions of: |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
There doesn't seem to be an obvious way to remove the remaining undef usages throughout the codebase so maybe we can close this. It might be nice to add a linter rule to prevent undef from being used in new code as well if something like that doesn't already exist. |
A linter rule, you say? My favourite! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Verification
brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.Provide a detailed description of the proposed feature
As part of the Sorbet work, I went through and commented every file that uses
undef
so that others don't waste their time trying to make ittyped: strict
(because Sorbet doesn't supportundef
).Carlo commented, wisely, that maybe we don't need to have the
undef
s anymore.We should investigate this and remove any unnecessary
undef
s. Or find a Sorbet-compatible way.The files are:
What is the motivation for the feature?
Reducing unnecessary code. Improving Sorbet coverage eventually maybe.
How will the feature be relevant to at least 90% of Homebrew users?
It won't be.
What alternatives to the feature have been considered?
Keeping them even though they may not be needed.
The text was updated successfully, but these errors were encountered: