Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Library/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ inherit_mode:
- Exclude

AllCops:
TargetRubyVersion: 3.4
TargetRubyVersion: 4.0
NewCops: enable
Include:
- "**/*.rbi"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/.ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.4.8
4.0.1
8 changes: 6 additions & 2 deletions Library/Homebrew/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ source "https://rubygems.org"
# The default case (no envs), should always be a restrictive bound on the lowest supported minor version.
# This is the branch that Dependabot will use.
if ENV.fetch("HOMEBREW_USE_RUBY_FROM_PATH", "").empty?
ruby "~> 3.4.0"
ruby "~> 4.0.0"
else
ruby ">= 3.4.0"
ruby ">= 4.0.0"
end

# disallowed gems (should not be used)
Expand All @@ -26,6 +26,9 @@ end
group :formula_test, optional: true do
gem "minitest", require: false
end
group :irb, optional: true do
gem "irb", require: false
end
group :livecheck, optional: true do
gem "ruby-progressbar", require: false
end
Expand Down Expand Up @@ -54,6 +57,7 @@ group :style, :tests, optional: true do
gem "test-prof", require: false
end
group :tests, optional: true do
gem "ostruct", require: false
gem "parallel_tests", require: false
gem "rspec", require: false
gem "rspec-core", require: false
Expand Down
24 changes: 22 additions & 2 deletions Library/Homebrew/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,19 @@ GEM
coderay (1.1.3)
concurrent-ruby (1.3.6)
csv (3.3.5)
date (3.5.1)
diff-lcs (1.6.2)
docile (1.4.1)
elftools (1.3.1)
bindata (~> 2)
erb (6.0.1)
erubi (1.13.1)
hana (1.3.7)
io-console (0.8.2)
irb (1.16.0)
pp (>= 0.6.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
json (2.18.1)
json_schemer (2.5.0)
bigdecimal
Expand All @@ -33,6 +39,7 @@ GEM
minitest (6.0.1)
prism (~> 1.5)
netrc (0.11.0)
ostruct (0.6.3)
parallel (1.27.0)
parallel_tests (5.6.0)
parallel
Expand All @@ -43,11 +50,17 @@ GEM
elftools (>= 1.3)
logger (~> 1)
plist (3.7.2)
pp (0.6.3)
prettyprint
prettyprint (0.2.0)
prism (1.9.0)
pry (0.16.0)
coderay (~> 1.1)
method_source (~> 1.0)
reline (>= 0.6.0)
psych (5.3.1)
date
stringio
public_suffix (7.0.2)
pycall (1.5.2)
racc (1.8.1)
Expand All @@ -59,6 +72,10 @@ GEM
logger
prism (>= 1.3.0)
tsort
rdoc (7.1.0)
erb
psych (>= 4.0.0)
tsort
redcarpet (3.6.1)
regexp_parser (2.11.3)
reline (0.6.3)
Expand Down Expand Up @@ -149,6 +166,7 @@ GEM
sorbet-static-and-runtime (>= 0.5.10187)
thor (>= 0.19.2)
stackprof (0.2.27)
stringio (3.2.0)
tapioca (0.17.10)
benchmark
bundler (>= 2.2.25)
Expand Down Expand Up @@ -184,10 +202,12 @@ DEPENDENCIES
base64
concurrent-ruby
csv
irb
json_schemer
kramdown
method_source
minitest
ostruct
parallel_tests
patchelf
plist
Expand Down Expand Up @@ -226,7 +246,7 @@ DEPENDENCIES
yard-sorbet

RUBY VERSION
ruby 3.4.8p72
ruby 4.0.1

BUNDLED WITH
2.6.9
4.0.3
1 change: 0 additions & 1 deletion Library/Homebrew/bundle/dumper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# frozen_string_literal: true

require "fileutils"
require "pathname"

module Homebrew
module Bundle
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/dev-cmd/irb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def run
Homebrew.install_bundler_gems!(groups: ["pry"])
require "pry"
else
Homebrew.install_bundler_gems!(groups: ["irb"])
require "irb"
end

Expand Down
16 changes: 16 additions & 0 deletions Library/Homebrew/extend/os/mac/linkage_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ def system_libraries_exist_in_cache?
# In macOS Big Sur and later, system libraries do not exist on-disk and instead exist in a cache.
MacOS.version >= :big_sur
end

sig { params(dylib: String).returns(T::Boolean) }
def dylib_found_in_shared_cache?(dylib)
Kernel.require "fiddle"
@dyld_shared_cache_contains_path ||= T.let(begin
libc = Fiddle.dlopen("/usr/lib/libSystem.B.dylib")

Fiddle::Function.new(
libc["_dyld_shared_cache_contains_path"],
[Fiddle::TYPE_CONST_STRING],
Fiddle::TYPE_BOOL,
)
end, T.nilable(Fiddle::Function))

@dyld_shared_cache_contains_path.call(dylib)
end
end
end
end
Expand Down
17 changes: 3 additions & 14 deletions Library/Homebrew/linkage_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -232,20 +232,9 @@ def system_libraries_exist_in_cache?
false
end

sig { params(dylib: String).returns(T::Boolean) }
def dylib_found_in_shared_cache?(dylib)
require "fiddle"
@dyld_shared_cache_contains_path ||= T.let(begin
libc = Fiddle.dlopen("/usr/lib/libSystem.B.dylib")

Fiddle::Function.new(
libc["_dyld_shared_cache_contains_path"],
[Fiddle::TYPE_CONST_STRING],
Fiddle::TYPE_BOOL,
)
end, T.nilable(Fiddle::Function))

@dyld_shared_cache_contains_path.call(dylib)
sig { params(_dylib: String).returns(T::Boolean) }
def dylib_found_in_shared_cache?(_dylib)
false
end

sig {
Expand Down
3 changes: 3 additions & 0 deletions Library/Homebrew/sorbet/tapioca/require.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
next if name == "sorbet-static"
next if name == "sorbet-static-and-runtime"

# We don't generate RBIs for pycall
next if name == "pycall"

name = dependency_require_map[name] if dependency_require_map.key?(name)
require name
additional_requires_map[name]&.each { require(it) }
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/utils/ruby.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# When bumping to a new major/minor version, also update the bounds in the Gemfile
# HOMEBREW_LIBRARY set by bin/brew
# shellcheck disable=SC2154
export HOMEBREW_REQUIRED_RUBY_VERSION="3.4"
export HOMEBREW_REQUIRED_RUBY_VERSION="4.0"
HOMEBREW_PORTABLE_RUBY_VERSION="$(cat "${HOMEBREW_LIBRARY}/Homebrew/vendor/portable-ruby-version")"
export HOMEBREW_BUNDLER_VERSION="2.6.9"
export HOMEBREW_BUNDLER_VERSION="4.0.3"

# Disable Ruby options we don't need.
export HOMEBREW_RUBY_DISABLE_OPTIONS="--disable=gems,rubyopt"
Expand Down
17 changes: 15 additions & 2 deletions Library/Homebrew/vendor/bundle/bundler/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,27 @@ def self.extension_api_version
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/coderay-1.1.3/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/concurrent-ruby-1.3.6/lib/concurrent-ruby")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/csv-3.3.5/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/date-3.5.1")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/date-3.5.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/diff-lcs-1.6.2/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/docile-1.4.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/elftools-1.3.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/erb-6.0.1")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/erb-6.0.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/erubi-1.13.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/hana-1.3.7/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/io-console-0.8.2")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/io-console-0.8.2/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/prettyprint-0.2.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/pp-0.6.3/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/stringio-3.2.0")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/stringio-3.2.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/psych-5.3.1")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/psych-5.3.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/tsort-0.2.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rdoc-7.1.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/reline-0.6.3/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/irb-1.16.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/json-2.18.1")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/json-2.18.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/regexp_parser-2.11.3/lib")
Expand All @@ -67,19 +81,18 @@ def self.extension_api_version
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/prism-1.9.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/minitest-6.0.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/netrc-0.11.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/ostruct-0.6.3/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/parallel-1.27.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/parallel_tests-5.6.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/racc-1.8.1")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/racc-1.8.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/parser-3.3.10.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/patchelf-1.5.2/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/plist-3.7.2/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/reline-0.6.3/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/pry-0.16.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/pycall-1.5.2")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/pycall-1.5.2/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rainbow-3.1.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/tsort-0.2.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/rbs-4.0.0.dev.5")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rbs-4.0.0.dev.5/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rbi-0.3.9/lib")
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/vendor/portable-ruby-arm64-darwin
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ruby_TAG=arm64_big_sur
ruby_SHA=1c98fa49eacc935640a6f8e10a2bf33f14cfc276804b71ddb658ea45ba99d167
ruby_SHA=643ad12da2e9265085a961d678f5b3219283fbc5a73cdf0615adc8609ba8539e
2 changes: 1 addition & 1 deletion Library/Homebrew/vendor/portable-ruby-arm64-linux
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ruby_TAG=arm64_linux
ruby_SHA=56b0017d634509e49272a6eccd88f888dd4031404e230f9defb3b21707781310
ruby_SHA=7cc511b5933ecb4e857994d01ddc66accdbcdb772214ba415664993fe80442f6
2 changes: 1 addition & 1 deletion Library/Homebrew/vendor/portable-ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.4.8
4.0.1
2 changes: 1 addition & 1 deletion Library/Homebrew/vendor/portable-ruby-x86_64-darwin
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ruby_TAG=catalina
ruby_SHA=80c194381e990a4967a1ae44b8242b688e6a17ab590865a38671137677411469
ruby_SHA=09a5c468e76c2176c7a5a941831f28463f0035172f2fcf64f8a80f2dc1a31f01
2 changes: 1 addition & 1 deletion Library/Homebrew/vendor/portable-ruby-x86_64-linux
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ruby_TAG=x86_64_linux
ruby_SHA=63a9c333137e7cf8a568e0f37ec6802c22fbbdd5839f4825c863c26e415d2947
ruby_SHA=5f52e03e2799621b7f7f103173fb9c7d660d6bc1b9748efbcaab09881bb136cc
Loading