Skip to content
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

Vendor more gems #15075

Merged
merged 1 commit into from Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion Library/Homebrew/Gemfile
Expand Up @@ -17,6 +17,7 @@ gem "byebug", require: false
gem "json_schemer", require: false
gem "minitest", require: false
gem "parallel_tests", require: false
gem "pry", require: false
gem "ronn", require: false
gem "rspec", require: false
gem "rspec-github", require: false
Expand All @@ -26,6 +27,9 @@ gem "rspec-retry", require: false
gem "rspec-sorbet", require: false
gem "rubocop", require: false
gem "rubocop-ast", require: false
# NOTE: ruby-prof v1.4.3 is the last version that supports Ruby 2.6.x
# TODO: remove explicit version when HOMEBREW_REQUIRED_RUBY_VERSION >= 2.7
gem "ruby-prof", "1.4.3", require: false
gem "simplecov", require: false
gem "simplecov-cobertura", require: false
gem "stackprof", require: false
Expand All @@ -52,7 +56,7 @@ gem "rubocop-sorbet"
gem "ruby-macho"
gem "sorbet-runtime"

# remove when HOMEBREW_REQUIRED_RUBY_VERSION >= 2.7
# TODO: remove when HOMEBREW_REQUIRED_RUBY_VERSION >= 2.7
install_if -> { RUBY_VERSION < "2.7" } do
gem "did_you_mean"
end
3 changes: 3 additions & 0 deletions Library/Homebrew/Gemfile.lock
Expand Up @@ -157,6 +157,7 @@ GEM
rubocop-sorbet (0.7.0)
rubocop (>= 0.90.0)
ruby-macho (3.0.0)
ruby-prof (1.4.3)
ruby-progressbar (1.13.0)
rubyntlm (0.6.3)
simplecov (0.22.0)
Expand Down Expand Up @@ -239,6 +240,7 @@ DEPENDENCIES
parlour
patchelf
plist
pry
ronn
rspec
rspec-github
Expand All @@ -253,6 +255,7 @@ DEPENDENCIES
rubocop-rspec
rubocop-sorbet
ruby-macho
ruby-prof (= 1.4.3)
simplecov
simplecov-cobertura
sorbet-runtime
Expand Down
1 change: 0 additions & 1 deletion Library/Homebrew/dev-cmd/irb.rb
Expand Up @@ -64,7 +64,6 @@ def irb
end

if args.pry?
Homebrew.install_gem_setup_path! "pry"
require "pry"
else
require "irb"
Expand Down
6 changes: 3 additions & 3 deletions Library/Homebrew/dev-cmd/prof.rb
Expand Up @@ -41,16 +41,16 @@ def prof
end

if args.stackprof?
# Already installed from Gemfile but use this to setup PATH and LOADPATH
Homebrew.install_gem_setup_path! "stackprof"
with_env HOMEBREW_STACKPROF: "1" do
system(*HOMEBREW_RUBY_EXEC_ARGS, brew_rb, *args.named)
end
output_filename = "prof/d3-flamegraph.html"
safe_system "stackprof --d3-flamegraph prof/stackprof.dump > #{output_filename}"
else
# NOTE: ruby-prof v1.4.3 is the last version that supports Ruby 2.6.x
# TODO: Remove explicit version arg when we move to a newer version of Ruby
Homebrew.install_gem_setup_path! "ruby-prof", version: "1.4.3"
# Already installed from Gemfile but use this to setup PATH and LOADPATH
Homebrew.install_gem_setup_path! "ruby-prof"
output_filename = "prof/call_stack.html"
safe_system "ruby-prof", "--printer=call_stack", "--file=#{output_filename}", brew_rb, "--", *args.named
end
Expand Down