Merge pull request #15006 from dduugg/brew-types
Enable typing in Library/Homebrew/brew.rb
This commit is contained in:
commit
26914e2469
@ -28,6 +28,7 @@ gem "rubocop", require: false
|
|||||||
gem "rubocop-ast", require: false
|
gem "rubocop-ast", require: false
|
||||||
gem "simplecov", require: false
|
gem "simplecov", require: false
|
||||||
gem "simplecov-cobertura", require: false
|
gem "simplecov-cobertura", require: false
|
||||||
|
gem "stackprof", require: false
|
||||||
gem "warning", require: false
|
gem "warning", require: false
|
||||||
|
|
||||||
group :sorbet, optional: true do
|
group :sorbet, optional: true do
|
||||||
|
@ -188,6 +188,7 @@ GEM
|
|||||||
sorbet (>= 0.5.9204)
|
sorbet (>= 0.5.9204)
|
||||||
sorbet-runtime (>= 0.5.9204)
|
sorbet-runtime (>= 0.5.9204)
|
||||||
thor (>= 0.19.2)
|
thor (>= 0.19.2)
|
||||||
|
stackprof (0.2.23)
|
||||||
tapioca (0.7.3)
|
tapioca (0.7.3)
|
||||||
bundler (>= 1.17.3)
|
bundler (>= 1.17.3)
|
||||||
pry (>= 0.12.2)
|
pry (>= 0.12.2)
|
||||||
@ -257,6 +258,7 @@ DEPENDENCIES
|
|||||||
sorbet-runtime
|
sorbet-runtime
|
||||||
sorbet-static-and-runtime
|
sorbet-static-and-runtime
|
||||||
spoom
|
spoom
|
||||||
|
stackprof
|
||||||
tapioca
|
tapioca
|
||||||
warning
|
warning
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# typed: false
|
# typed: true
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# `HOMEBREW_STACKPROF` should be set via `brew prof --stackprof`, not manually.
|
||||||
if ENV["HOMEBREW_STACKPROF"]
|
if ENV["HOMEBREW_STACKPROF"]
|
||||||
require "rubygems"
|
require "rubygems"
|
||||||
require "stackprof"
|
require "stackprof"
|
||||||
@ -35,8 +36,8 @@ begin
|
|||||||
empty_argv = ARGV.empty?
|
empty_argv = ARGV.empty?
|
||||||
help_flag_list = %w[-h --help --usage -?]
|
help_flag_list = %w[-h --help --usage -?]
|
||||||
help_flag = !ENV["HOMEBREW_HELP"].nil?
|
help_flag = !ENV["HOMEBREW_HELP"].nil?
|
||||||
help_cmd_index = nil
|
help_cmd_index = T.let(nil, T.nilable(Integer))
|
||||||
cmd = nil
|
cmd = T.let(nil, T.nilable(String))
|
||||||
|
|
||||||
ARGV.each_with_index do |arg, i|
|
ARGV.each_with_index do |arg, i|
|
||||||
break if help_flag && cmd
|
break if help_flag && cmd
|
||||||
@ -64,7 +65,7 @@ begin
|
|||||||
path.prepend(HOMEBREW_SHIMS_PATH/"shared")
|
path.prepend(HOMEBREW_SHIMS_PATH/"shared")
|
||||||
homebrew_path.prepend(HOMEBREW_SHIMS_PATH/"shared")
|
homebrew_path.prepend(HOMEBREW_SHIMS_PATH/"shared")
|
||||||
|
|
||||||
ENV["PATH"] = path
|
ENV["PATH"] = path.to_s
|
||||||
|
|
||||||
require "commands"
|
require "commands"
|
||||||
require "settings"
|
require "settings"
|
||||||
@ -76,7 +77,7 @@ begin
|
|||||||
homebrew_path.append(Tap.cmd_directories)
|
homebrew_path.append(Tap.cmd_directories)
|
||||||
|
|
||||||
# External commands expect a normal PATH
|
# External commands expect a normal PATH
|
||||||
ENV["PATH"] = homebrew_path
|
ENV["PATH"] = homebrew_path.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
# Usage instructions should be displayed if and only if one of:
|
# Usage instructions should be displayed if and only if one of:
|
||||||
|
88
Library/Homebrew/sorbet/rbi/gems/stackprof@0.2.23.rbi
Normal file
88
Library/Homebrew/sorbet/rbi/gems/stackprof@0.2.23.rbi
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
# typed: true
|
||||||
|
|
||||||
|
# DO NOT EDIT MANUALLY
|
||||||
|
# This is an autogenerated file for types exported from the `stackprof` gem.
|
||||||
|
# Please instead update this file by running `bin/tapioca gem stackprof`.
|
||||||
|
|
||||||
|
module StackProf
|
||||||
|
class << self
|
||||||
|
def results(*_arg0); end
|
||||||
|
def run(*_arg0); end
|
||||||
|
def running?; end
|
||||||
|
def sample; end
|
||||||
|
def start(*_arg0); end
|
||||||
|
def stop; end
|
||||||
|
def use_postponed_job!; end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class StackProf::Middleware
|
||||||
|
def initialize(app, options = T.unsafe(nil)); end
|
||||||
|
|
||||||
|
def call(env); end
|
||||||
|
|
||||||
|
class << self
|
||||||
|
def enabled; end
|
||||||
|
def enabled=(_arg0); end
|
||||||
|
def enabled?(env); end
|
||||||
|
def interval; end
|
||||||
|
def interval=(_arg0); end
|
||||||
|
def metadata; end
|
||||||
|
def metadata=(_arg0); end
|
||||||
|
def mode; end
|
||||||
|
def mode=(_arg0); end
|
||||||
|
def path; end
|
||||||
|
def path=(_arg0); end
|
||||||
|
def raw; end
|
||||||
|
def raw=(_arg0); end
|
||||||
|
def save; end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class StackProf::Report
|
||||||
|
def initialize(data); end
|
||||||
|
|
||||||
|
def +(other); end
|
||||||
|
def add_lines(a, b); end
|
||||||
|
def convert_to_d3_flame_graph_format(name, stacks, depth); end
|
||||||
|
def data; end
|
||||||
|
def files; end
|
||||||
|
def flamegraph_row(f, x, y, weight, addr); end
|
||||||
|
def flamegraph_stacks(raw); end
|
||||||
|
def frames(sort_by_total = T.unsafe(nil)); end
|
||||||
|
def max_samples; end
|
||||||
|
def modeline; end
|
||||||
|
def normalized_frames; end
|
||||||
|
def overall_samples; end
|
||||||
|
def print_alphabetical_flamegraph(f = T.unsafe(nil), skip_common = T.unsafe(nil)); end
|
||||||
|
def print_callgrind(f = T.unsafe(nil)); end
|
||||||
|
def print_d3_flamegraph(f = T.unsafe(nil), skip_common = T.unsafe(nil)); end
|
||||||
|
def print_debug; end
|
||||||
|
def print_dump(f = T.unsafe(nil)); end
|
||||||
|
def print_file(filter, f = T.unsafe(nil)); end
|
||||||
|
def print_files(sort_by_total = T.unsafe(nil), limit = T.unsafe(nil), f = T.unsafe(nil)); end
|
||||||
|
def print_flamegraph(f, skip_common, alphabetical = T.unsafe(nil)); end
|
||||||
|
def print_graphviz(options = T.unsafe(nil), f = T.unsafe(nil)); end
|
||||||
|
def print_json(f = T.unsafe(nil)); end
|
||||||
|
def print_method(name, f = T.unsafe(nil)); end
|
||||||
|
def print_stackcollapse; end
|
||||||
|
def print_text(sort_by_total = T.unsafe(nil), limit = T.unsafe(nil), select_files = T.unsafe(nil), reject_files = T.unsafe(nil), select_names = T.unsafe(nil), reject_names = T.unsafe(nil), f = T.unsafe(nil)); end
|
||||||
|
def print_timeline_flamegraph(f = T.unsafe(nil), skip_common = T.unsafe(nil)); end
|
||||||
|
def version; end
|
||||||
|
def walk_method(name); end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def callers_for(addr); end
|
||||||
|
def root_frames; end
|
||||||
|
def source_display(f, file, lines, range = T.unsafe(nil)); end
|
||||||
|
|
||||||
|
class << self
|
||||||
|
def from_file(file); end
|
||||||
|
def from_json(json); end
|
||||||
|
def parse_json(json); end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
StackProf::Report::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String)
|
||||||
|
StackProf::VERSION = T.let(T.unsafe(nil), String)
|
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
# typed: false
|
# typed: false
|
||||||
|
|
||||||
module ::StackProf; end
|
|
||||||
module T::InterfaceWrapper::Helpers; end
|
module T::InterfaceWrapper::Helpers; end
|
||||||
module T::Private::Abstract::Hooks; end
|
module T::Private::Abstract::Hooks; end
|
||||||
module T::Private::Methods::MethodHooks; end
|
module T::Private::Methods::MethodHooks; end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user