diff --git a/Gemfile.lock b/Gemfile.lock index db932b55..30905b2f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -91,7 +91,7 @@ GEM irb (~> 1.10) reline (>= 0.3.8) drb (2.2.1) - erubi (1.13.0) + erubi (1.13.1) globalid (1.2.1) activesupport (>= 6.1) i18n (1.14.6) @@ -102,7 +102,7 @@ GEM reline (>= 0.4.2) json (2.7.6) language_server-protocol (3.17.0.3) - logger (1.6.4) + logger (1.6.5) loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -183,7 +183,7 @@ GEM zeitwerk (~> 2.6) rainbow (3.1.1) rake (13.2.1) - rbi (0.2.2) + rbi (0.2.3) prism (~> 1.0) sorbet-runtime (>= 0.5.9204) rbs (3.8.1) @@ -214,7 +214,7 @@ GEM rubocop (~> 1.51) rubocop-sorbet (0.8.7) rubocop (>= 1) - ruby-lsp (0.23.3) + ruby-lsp (0.23.6) language_server-protocol (~> 3.17.0) prism (>= 1.2, < 2.0) rbs (>= 3, < 4) @@ -222,15 +222,15 @@ GEM ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) securerandom (0.3.1) - sorbet (0.5.11635) - sorbet-static (= 0.5.11635) - sorbet-runtime (0.5.11635) - sorbet-static (0.5.11635-universal-darwin) - sorbet-static (0.5.11635-x86_64-linux) - sorbet-static-and-runtime (0.5.11635) - sorbet (= 0.5.11635) - sorbet-runtime (= 0.5.11635) - spoom (1.5.0) + sorbet (0.5.11761) + sorbet-static (= 0.5.11761) + sorbet-runtime (0.5.11761) + sorbet-static (0.5.11761-universal-darwin) + sorbet-static (0.5.11761-x86_64-linux) + sorbet-static-and-runtime (0.5.11761) + sorbet (= 0.5.11761) + sorbet-runtime (= 0.5.11761) + spoom (1.5.1) erubi (>= 1.10.0) prism (>= 0.28.0) sorbet-static-and-runtime (>= 0.5.10187) @@ -240,7 +240,8 @@ GEM sqlite3 (2.1.0-x86_64-darwin) sqlite3 (2.1.0-x86_64-linux-gnu) stringio (3.1.2) - tapioca (0.16.5) + tapioca (0.16.8) + benchmark bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) @@ -291,4 +292,4 @@ DEPENDENCIES tzinfo-data BUNDLED WITH - 2.5.19 + 2.6.3 diff --git a/sorbet/rbi/gems/erubi@1.13.0.rbi b/sorbet/rbi/gems/erubi@1.13.1.rbi similarity index 94% rename from sorbet/rbi/gems/erubi@1.13.0.rbi rename to sorbet/rbi/gems/erubi@1.13.1.rbi index c5f4e9a1..190ba0df 100644 --- a/sorbet/rbi/gems/erubi@1.13.0.rbi +++ b/sorbet/rbi/gems/erubi@1.13.1.rbi @@ -67,44 +67,49 @@ class Erubi::Engine private + # :nocov: + # + # source://erubi/lib/erubi.rb#209 + def _dup_string_if_frozen(string); end + # Add ruby code to the template # - # source://erubi/lib/erubi.rb#223 + # source://erubi/lib/erubi.rb#232 def add_code(code); end # Add the given ruby expression result to the template, # escaping it based on the indicator given and escape flag. # - # source://erubi/lib/erubi.rb#232 + # source://erubi/lib/erubi.rb#241 def add_expression(indicator, code); end # Add the result of Ruby expression to the template # - # source://erubi/lib/erubi.rb#241 + # source://erubi/lib/erubi.rb#250 def add_expression_result(code); end # Add the escaped result of Ruby expression to the template # - # source://erubi/lib/erubi.rb#246 + # source://erubi/lib/erubi.rb#255 def add_expression_result_escaped(code); end # Add the given postamble to the src. Can be overridden in subclasses # to make additional changes to src that depend on the current state. # - # source://erubi/lib/erubi.rb#252 + # source://erubi/lib/erubi.rb#261 def add_postamble(postamble); end # Add raw text to the template. Modifies argument if argument is mutable as a memory optimization. # Must be called with a string, cannot be called with nil (Rails's subclass depends on it). # - # source://erubi/lib/erubi.rb#210 + # source://erubi/lib/erubi.rb#222 def add_text(text); end # Raise an exception, as the base engine class does not support handling other indicators. # # @raise [ArgumentError] # - # source://erubi/lib/erubi.rb#258 + # source://erubi/lib/erubi.rb#267 def handle(indicator, code, tailch, rspace, lspace); end # Make sure that any current expression has been terminated. @@ -112,7 +117,7 @@ class Erubi::Engine # the chain_appends option is used, expressions may not be # terminated. # - # source://erubi/lib/erubi.rb#286 + # source://erubi/lib/erubi.rb#295 def terminate_expression; end # Make sure the buffer variable is the target of the next append @@ -122,7 +127,7 @@ class Erubi::Engine # This method should only be called if the block will result in # code where << will append to the bufvar. # - # source://erubi/lib/erubi.rb#268 + # source://erubi/lib/erubi.rb#277 def with_buffer; end end diff --git a/sorbet/rbi/gems/logger@1.6.4.rbi b/sorbet/rbi/gems/logger@1.6.5.rbi similarity index 98% rename from sorbet/rbi/gems/logger@1.6.4.rbi rename to sorbet/rbi/gems/logger@1.6.5.rbi index fa5a2669..607a72c5 100644 --- a/sorbet/rbi/gems/logger@1.6.4.rbi +++ b/sorbet/rbi/gems/logger@1.6.5.rbi @@ -857,34 +857,34 @@ class Logger::LogDevice private - # source://logger/lib/logger/log_device.rb#143 + # source://logger/lib/logger/log_device.rb#148 def add_log_header(file); end - # source://logger/lib/logger/log_device.rb#149 + # source://logger/lib/logger/log_device.rb#154 def check_shift_log; end - # source://logger/lib/logger/log_device.rb#119 + # source://logger/lib/logger/log_device.rb#124 def create_logfile(filename); end - # source://logger/lib/logger/log_device.rb#91 + # source://logger/lib/logger/log_device.rb#96 def fixup_mode(dev, filename); end - # source://logger/lib/logger/log_device.rb#135 + # source://logger/lib/logger/log_device.rb#140 def handle_write_errors(mesg); end - # source://logger/lib/logger/log_device.rb#164 + # source://logger/lib/logger/log_device.rb#169 def lock_shift_log; end - # source://logger/lib/logger/log_device.rb#106 + # source://logger/lib/logger/log_device.rb#111 def open_logfile(filename); end - # source://logger/lib/logger/log_device.rb#76 + # source://logger/lib/logger/log_device.rb#81 def set_dev(log); end - # source://logger/lib/logger/log_device.rb#193 + # source://logger/lib/logger/log_device.rb#198 def shift_log_age; end - # source://logger/lib/logger/log_device.rb#205 + # source://logger/lib/logger/log_device.rb#210 def shift_log_period(period_end); end end @@ -893,10 +893,10 @@ end # source://logger/lib/logger/log_device.rb#72 Logger::LogDevice::MODE = T.let(T.unsafe(nil), Integer) -# source://logger/lib/logger/log_device.rb#74 +# source://logger/lib/logger/log_device.rb#79 Logger::LogDevice::MODE_TO_CREATE = T.let(T.unsafe(nil), Integer) -# source://logger/lib/logger/log_device.rb#73 +# source://logger/lib/logger/log_device.rb#75 Logger::LogDevice::MODE_TO_OPEN = T.let(T.unsafe(nil), Integer) # source://logger/lib/logger/period.rb#4 diff --git a/sorbet/rbi/gems/rbi@0.2.2.rbi b/sorbet/rbi/gems/rbi@0.2.3.rbi similarity index 95% rename from sorbet/rbi/gems/rbi@0.2.2.rbi rename to sorbet/rbi/gems/rbi@0.2.3.rbi index 48f3afba..9b5a3f7a 100644 --- a/sorbet/rbi/gems/rbi@0.2.2.rbi +++ b/sorbet/rbi/gems/rbi@0.2.3.rbi @@ -464,7 +464,7 @@ class RBI::File sig { returns(T::Boolean) } def empty?; end - # source://rbi/lib/rbi/printer.rb#743 + # source://rbi/lib/rbi/printer.rb#751 sig do params( out: T.any(::IO, ::StringIO), @@ -475,11 +475,11 @@ class RBI::File end def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end - # source://rbi/lib/rbi/rbs_printer.rb#989 + # source://rbi/lib/rbi/rbs_printer.rb#1040 sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end - # source://rbi/lib/rbi/rbs_printer.rb#995 + # source://rbi/lib/rbi/rbs_printer.rb#1046 sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) } def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end @@ -501,14 +501,14 @@ class RBI::File # source://rbi/lib/rbi/model.rb#146 def strictness=(_arg0); end - # source://rbi/lib/rbi/printer.rb#749 + # source://rbi/lib/rbi/printer.rb#757 sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end end # source://rbi/lib/rbi/formatter.rb#5 class RBI::Formatter - # source://rbi/lib/rbi/formatter.rb#24 + # source://rbi/lib/rbi/formatter.rb#21 sig do params( add_sig_templates: T::Boolean, @@ -521,30 +521,26 @@ class RBI::Formatter end def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_members: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end - # source://rbi/lib/rbi/formatter.rb#47 + # source://rbi/lib/rbi/formatter.rb#44 sig { params(file: ::RBI::File).void } def format_file(file); end - # source://rbi/lib/rbi/formatter.rb#52 + # source://rbi/lib/rbi/formatter.rb#49 sig { params(tree: ::RBI::Tree).void } def format_tree(tree); end - # source://rbi/lib/rbi/formatter.rb#12 + # source://rbi/lib/rbi/formatter.rb#9 sig { returns(T.nilable(::Integer)) } def max_line_length; end # @return [Integer, nil] # - # source://rbi/lib/rbi/formatter.rb#12 + # source://rbi/lib/rbi/formatter.rb#9 def max_line_length=(_arg0); end - # source://rbi/lib/rbi/formatter.rb#41 + # source://rbi/lib/rbi/formatter.rb#38 sig { params(file: ::RBI::File).returns(::String) } def print_file(file); end - - # source://rbi/lib/rbi/formatter.rb#9 - sig { params(sort_nodes: T::Boolean).returns(T::Boolean) } - def sort_nodes=(sort_nodes); end end # source://rbi/lib/rbi/rewriters/group_nodes.rb#87 @@ -582,11 +578,11 @@ class RBI::GroupNodesError < ::RBI::Error; end # Sorbet's misc. # -# source://rbi/lib/rbi/model.rb#1374 +# source://rbi/lib/rbi/model.rb#1377 class RBI::Helper < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi/lib/rbi/model.rb#1388 + # source://rbi/lib/rbi/model.rb#1391 sig do params( name: ::String, @@ -605,11 +601,11 @@ class RBI::Helper < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi/lib/rbi/model.rb#1378 + # source://rbi/lib/rbi/model.rb#1381 sig { returns(::String) } def name; end - # source://rbi/lib/rbi/model.rb#1395 + # source://rbi/lib/rbi/model.rb#1398 sig { override.returns(::String) } def to_s; end end @@ -990,11 +986,11 @@ class RBI::Method < ::RBI::NodeWithComments def visibility=(_arg0); end end -# source://rbi/lib/rbi/model.rb#1435 +# source://rbi/lib/rbi/model.rb#1438 class RBI::MixesInClassMethods < ::RBI::Mixin include ::RBI::Indexable - # source://rbi/lib/rbi/model.rb#1447 + # source://rbi/lib/rbi/model.rb#1450 sig do params( name: ::String, @@ -1014,7 +1010,7 @@ class RBI::MixesInClassMethods < ::RBI::Mixin sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi/lib/rbi/model.rb#1453 + # source://rbi/lib/rbi/model.rb#1456 sig { override.returns(::String) } def to_s; end end @@ -1130,7 +1126,7 @@ class RBI::Node # source://rbi/lib/rbi/model.rb#14 def parent_tree=(_arg0); end - # source://rbi/lib/rbi/printer.rb#767 + # source://rbi/lib/rbi/printer.rb#775 sig do params( out: T.any(::IO, ::StringIO), @@ -1141,11 +1137,11 @@ class RBI::Node end def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end - # source://rbi/lib/rbi/rbs_printer.rb#1006 + # source://rbi/lib/rbi/rbs_printer.rb#1057 sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end - # source://rbi/lib/rbi/rbs_printer.rb#1012 + # source://rbi/lib/rbi/rbs_printer.rb#1063 sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) } def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end @@ -1159,7 +1155,7 @@ class RBI::Node sig { params(version: ::Gem::Version).returns(T::Boolean) } def satisfies_version?(version); end - # source://rbi/lib/rbi/printer.rb#773 + # source://rbi/lib/rbi/printer.rb#781 sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end end @@ -1294,7 +1290,7 @@ class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor sig { returns(::RBI::Sig) } def current; end - # source://rbi/lib/rbi/parser.rb#887 + # source://rbi/lib/rbi/parser.rb#903 sig { override.params(node: ::Prism::AssocNode).void } def visit_assoc_node(node); end @@ -1861,7 +1857,7 @@ class RBI::RBSPrinter < ::RBI::Visitor # source://rbi/lib/rbi/rbs_printer.rb#9 def print_locs=(_arg0); end - # source://rbi/lib/rbi/rbs_printer.rb#350 + # source://rbi/lib/rbi/rbs_printer.rb#363 sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void } def print_method_sig(node, sig); end @@ -1887,7 +1883,7 @@ class RBI::RBSPrinter < ::RBI::Visitor sig { override.params(nodes: T::Array[::RBI::Node]).void } def visit_all(nodes); end - # source://rbi/lib/rbi/rbs_printer.rb#505 + # source://rbi/lib/rbi/rbs_printer.rb#534 sig { override.params(node: ::RBI::Arg).void } def visit_arg(node); end @@ -1911,7 +1907,7 @@ class RBI::RBSPrinter < ::RBI::Visitor sig { override.params(node: ::RBI::BlankLine).void } def visit_blank_line(node); end - # source://rbi/lib/rbi/rbs_printer.rb#444 + # source://rbi/lib/rbi/rbs_printer.rb#473 sig { override.params(node: ::RBI::BlockParam).void } def visit_block_param(node); end @@ -1923,7 +1919,7 @@ class RBI::RBSPrinter < ::RBI::Visitor sig { override.params(node: ::RBI::Comment).void } def visit_comment(node); end - # source://rbi/lib/rbi/rbs_printer.rb#625 + # source://rbi/lib/rbi/rbs_printer.rb#654 sig { override.params(node: ::RBI::ConflictTree).void } def visit_conflict_tree(node); end @@ -1931,7 +1927,7 @@ class RBI::RBSPrinter < ::RBI::Visitor sig { override.params(node: ::RBI::Const).void } def visit_const(node); end - # source://rbi/lib/rbi/rbs_printer.rb#454 + # source://rbi/lib/rbi/rbs_printer.rb#483 sig { override.params(node: ::RBI::Extend).void } def visit_extend(node); end @@ -1939,43 +1935,43 @@ class RBI::RBSPrinter < ::RBI::Visitor sig { override.params(file: ::RBI::File).void } def visit_file(file); end - # source://rbi/lib/rbi/rbs_printer.rb#601 + # source://rbi/lib/rbi/rbs_printer.rb#630 sig { override.params(node: ::RBI::Group).void } def visit_group(node); end - # source://rbi/lib/rbi/rbs_printer.rb#591 + # source://rbi/lib/rbi/rbs_printer.rb#620 sig { override.params(node: ::RBI::Helper).void } def visit_helper(node); end - # source://rbi/lib/rbi/rbs_printer.rb#449 + # source://rbi/lib/rbi/rbs_printer.rb#478 sig { override.params(node: ::RBI::Include).void } def visit_include(node); end - # source://rbi/lib/rbi/rbs_printer.rb#510 + # source://rbi/lib/rbi/rbs_printer.rb#539 sig { override.params(node: ::RBI::KwArg).void } def visit_kw_arg(node); end - # source://rbi/lib/rbi/rbs_printer.rb#434 + # source://rbi/lib/rbi/rbs_printer.rb#463 sig { override.params(node: ::RBI::KwOptParam).void } def visit_kw_opt_param(node); end - # source://rbi/lib/rbi/rbs_printer.rb#429 + # source://rbi/lib/rbi/rbs_printer.rb#458 sig { override.params(node: ::RBI::KwParam).void } def visit_kw_param(node); end - # source://rbi/lib/rbi/rbs_printer.rb#439 + # source://rbi/lib/rbi/rbs_printer.rb#468 sig { override.params(node: ::RBI::KwRestParam).void } def visit_kw_rest_param(node); end - # source://rbi/lib/rbi/rbs_printer.rb#292 + # source://rbi/lib/rbi/rbs_printer.rb#297 sig { override.params(node: ::RBI::Method).void } def visit_method(node); end - # source://rbi/lib/rbi/rbs_printer.rb#596 + # source://rbi/lib/rbi/rbs_printer.rb#625 sig { override.params(node: ::RBI::MixesInClassMethods).void } def visit_mixes_in_class_methods(node); end - # source://rbi/lib/rbi/rbs_printer.rb#459 + # source://rbi/lib/rbi/rbs_printer.rb#488 sig { params(node: ::RBI::Mixin).void } def visit_mixin(node); end @@ -1983,31 +1979,31 @@ class RBI::RBSPrinter < ::RBI::Visitor sig { override.params(node: ::RBI::Module).void } def visit_module(node); end - # source://rbi/lib/rbi/rbs_printer.rb#419 + # source://rbi/lib/rbi/rbs_printer.rb#448 sig { override.params(node: ::RBI::OptParam).void } def visit_opt_param(node); end - # source://rbi/lib/rbi/rbs_printer.rb#486 + # source://rbi/lib/rbi/rbs_printer.rb#515 sig { override.params(node: ::RBI::Private).void } def visit_private(node); end - # source://rbi/lib/rbi/rbs_printer.rb#481 + # source://rbi/lib/rbi/rbs_printer.rb#510 sig { override.params(node: ::RBI::Protected).void } def visit_protected(node); end - # source://rbi/lib/rbi/rbs_printer.rb#476 + # source://rbi/lib/rbi/rbs_printer.rb#505 sig { override.params(node: ::RBI::Public).void } def visit_public(node); end - # source://rbi/lib/rbi/rbs_printer.rb#414 + # source://rbi/lib/rbi/rbs_printer.rb#443 sig { override.params(node: ::RBI::ReqParam).void } def visit_req_param(node); end - # source://rbi/lib/rbi/rbs_printer.rb#620 + # source://rbi/lib/rbi/rbs_printer.rb#649 sig { override.params(node: ::RBI::RequiresAncestor).void } def visit_requires_ancestor(node); end - # source://rbi/lib/rbi/rbs_printer.rb#424 + # source://rbi/lib/rbi/rbs_printer.rb#453 sig { override.params(node: ::RBI::RestParam).void } def visit_rest_param(node); end @@ -2019,7 +2015,7 @@ class RBI::RBSPrinter < ::RBI::Visitor sig { params(node: ::RBI::Scope).void } def visit_scope_body(node); end - # source://rbi/lib/rbi/rbs_printer.rb#634 + # source://rbi/lib/rbi/rbs_printer.rb#663 sig { override.params(node: ::RBI::ScopeConflict).void } def visit_scope_conflict(node); end @@ -2027,10 +2023,18 @@ class RBI::RBSPrinter < ::RBI::Visitor sig { params(node: ::RBI::Scope).void } def visit_scope_header(node); end - # source://rbi/lib/rbi/rbs_printer.rb#500 + # source://rbi/lib/rbi/rbs_printer.rb#529 sig { override.params(node: ::RBI::Send).void } def visit_send(node); end + # source://rbi/lib/rbi/rbs_printer.rb#425 + sig { params(node: ::RBI::Sig).void } + def visit_sig(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#438 + sig { params(node: ::RBI::SigParam).void } + def visit_sig_param(node); end + # source://rbi/lib/rbi/rbs_printer.rb#133 sig { override.params(node: ::RBI::SingletonClass).void } def visit_singleton_class(node); end @@ -2039,11 +2043,11 @@ class RBI::RBSPrinter < ::RBI::Visitor sig { override.params(node: ::RBI::Struct).void } def visit_struct(node); end - # source://rbi/lib/rbi/rbs_printer.rb#563 + # source://rbi/lib/rbi/rbs_printer.rb#592 sig { override.params(node: ::RBI::TEnum).void } def visit_tenum(node); end - # source://rbi/lib/rbi/rbs_printer.rb#568 + # source://rbi/lib/rbi/rbs_printer.rb#597 sig { override.params(node: ::RBI::TEnumBlock).void } def visit_tenum_block(node); end @@ -2051,33 +2055,33 @@ class RBI::RBSPrinter < ::RBI::Visitor sig { override.params(node: ::RBI::Tree).void } def visit_tree(node); end - # source://rbi/lib/rbi/rbs_printer.rb#515 + # source://rbi/lib/rbi/rbs_printer.rb#544 sig { override.params(node: ::RBI::TStruct).void } def visit_tstruct(node); end - # source://rbi/lib/rbi/rbs_printer.rb#549 + # source://rbi/lib/rbi/rbs_printer.rb#578 sig { override.params(node: ::RBI::TStructConst).void } def visit_tstruct_const(node); end - # source://rbi/lib/rbi/rbs_printer.rb#556 + # source://rbi/lib/rbi/rbs_printer.rb#585 sig { override.params(node: ::RBI::TStructProp).void } def visit_tstruct_prop(node); end - # source://rbi/lib/rbi/rbs_printer.rb#586 + # source://rbi/lib/rbi/rbs_printer.rb#615 sig { override.params(node: ::RBI::TypeMember).void } def visit_type_member(node); end - # source://rbi/lib/rbi/rbs_printer.rb#491 + # source://rbi/lib/rbi/rbs_printer.rb#520 sig { params(node: ::RBI::Visibility).void } def visit_visibility(node); end - # source://rbi/lib/rbi/rbs_printer.rb#607 + # source://rbi/lib/rbi/rbs_printer.rb#636 sig { override.params(node: ::RBI::VisibilityGroup).void } def visit_visibility_group(node); end private - # source://rbi/lib/rbi/rbs_printer.rb#725 + # source://rbi/lib/rbi/rbs_printer.rb#754 sig { params(node: ::RBI::Node).returns(T::Boolean) } def oneline?(node); end @@ -2085,31 +2089,31 @@ class RBI::RBSPrinter < ::RBI::Visitor # # Returns `nil` is the string is not a `T.let`. # - # source://rbi/lib/rbi/rbs_printer.rb#759 + # source://rbi/lib/rbi/rbs_printer.rb#788 sig { params(code: T.nilable(::String)).returns(T.nilable(::String)) } def parse_t_let(code); end - # source://rbi/lib/rbi/rbs_printer.rb#747 + # source://rbi/lib/rbi/rbs_printer.rb#776 sig { params(type: T.any(::RBI::Type, ::String)).returns(::RBI::Type) } def parse_type(type); end - # source://rbi/lib/rbi/rbs_printer.rb#650 + # source://rbi/lib/rbi/rbs_printer.rb#679 sig { params(node: ::RBI::Node).void } def print_blank_line_before(node); end - # source://rbi/lib/rbi/rbs_printer.rb#669 + # source://rbi/lib/rbi/rbs_printer.rb#698 sig { params(node: ::RBI::Node).void } def print_loc(node); end - # source://rbi/lib/rbi/rbs_printer.rb#699 + # source://rbi/lib/rbi/rbs_printer.rb#728 sig { params(node: ::RBI::Param, last: T::Boolean).void } def print_param_comment_leading_space(node, last:); end - # source://rbi/lib/rbi/rbs_printer.rb#675 + # source://rbi/lib/rbi/rbs_printer.rb#704 sig { params(node: ::RBI::Method, param: ::RBI::SigParam).void } def print_sig_param(node, param); end - # source://rbi/lib/rbi/rbs_printer.rb#717 + # source://rbi/lib/rbi/rbs_printer.rb#746 sig { params(node: ::RBI::SigParam, last: T::Boolean).void } def print_sig_param_comment_leading_space(node, last:); end end @@ -2138,11 +2142,11 @@ class RBI::ReqParam < ::RBI::Param def ==(other); end end -# source://rbi/lib/rbi/model.rb#1458 +# source://rbi/lib/rbi/model.rb#1461 class RBI::RequiresAncestor < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi/lib/rbi/model.rb#1471 + # source://rbi/lib/rbi/model.rb#1474 sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end @@ -2150,11 +2154,11 @@ class RBI::RequiresAncestor < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi/lib/rbi/model.rb#1462 + # source://rbi/lib/rbi/model.rb#1465 sig { returns(::String) } def name; end - # source://rbi/lib/rbi/model.rb#1477 + # source://rbi/lib/rbi/model.rb#1480 sig { override.returns(::String) } def to_s; end end @@ -2489,7 +2493,7 @@ class RBI::Rewriters::Merge::Conflict < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11635lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11761lib/types/struct.rb#13 def inherited(s); end end end @@ -2734,7 +2738,7 @@ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11635lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11761lib/types/struct.rb#13 def inherited(s); end end end @@ -2884,7 +2888,7 @@ end # # source://rbi/lib/rbi/model.rb#1104 class RBI::Sig < ::RBI::NodeWithComments - # source://rbi/lib/rbi/model.rb#1137 + # source://rbi/lib/rbi/model.rb#1138 sig do params( params: T::Array[::RBI::SigParam], @@ -2893,6 +2897,7 @@ class RBI::Sig < ::RBI::NodeWithComments is_override: T::Boolean, is_overridable: T::Boolean, is_final: T::Boolean, + allow_incompatible_override: T::Boolean, type_params: T::Array[::String], checked: T.nilable(::Symbol), loc: T.nilable(::RBI::Loc), @@ -2900,20 +2905,30 @@ class RBI::Sig < ::RBI::NodeWithComments block: T.nilable(T.proc.params(node: ::RBI::Sig).void) ).void end - def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), allow_incompatible_override: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi/lib/rbi/model.rb#1163 + # source://rbi/lib/rbi/model.rb#1166 sig { params(param: ::RBI::SigParam).void } def <<(param); end - # source://rbi/lib/rbi/model.rb#1173 + # source://rbi/lib/rbi/model.rb#1176 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end - # source://rbi/lib/rbi/model.rb#1168 + # source://rbi/lib/rbi/model.rb#1171 sig { params(name: ::String, type: T.any(::RBI::Type, ::String)).void } def add_param(name, type); end + # @return [Boolean] + # + # source://rbi/lib/rbi/model.rb#1114 + def allow_incompatible_override; end + + # @return [Boolean] + # + # source://rbi/lib/rbi/model.rb#1114 + def allow_incompatible_override=(_arg0); end + # source://rbi/lib/rbi/model.rb#1120 sig { returns(T.nilable(::Symbol)) } def checked; end @@ -2980,9 +2995,9 @@ class RBI::Sig < ::RBI::NodeWithComments def type_params; end end -# source://rbi/lib/rbi/model.rb#1182 +# source://rbi/lib/rbi/model.rb#1185 class RBI::SigParam < ::RBI::NodeWithComments - # source://rbi/lib/rbi/model.rb#1200 + # source://rbi/lib/rbi/model.rb#1203 sig do params( name: ::String, @@ -2994,15 +3009,15 @@ class RBI::SigParam < ::RBI::NodeWithComments end def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi/lib/rbi/model.rb#1208 + # source://rbi/lib/rbi/model.rb#1211 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end - # source://rbi/lib/rbi/model.rb#1186 + # source://rbi/lib/rbi/model.rb#1189 sig { returns(::String) } def name; end - # source://rbi/lib/rbi/model.rb#1189 + # source://rbi/lib/rbi/model.rb#1192 sig { returns(T.any(::RBI::Type, ::String)) } def type; end end @@ -3077,9 +3092,9 @@ end # Sorbet's T::Enum # -# source://rbi/lib/rbi/model.rb#1329 +# source://rbi/lib/rbi/model.rb#1332 class RBI::TEnum < ::RBI::Class - # source://rbi/lib/rbi/model.rb#1340 + # source://rbi/lib/rbi/model.rb#1343 sig do params( name: ::String, @@ -3091,9 +3106,9 @@ class RBI::TEnum < ::RBI::Class def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi/lib/rbi/model.rb#1346 +# source://rbi/lib/rbi/model.rb#1349 class RBI::TEnumBlock < ::RBI::Scope - # source://rbi/lib/rbi/model.rb#1356 + # source://rbi/lib/rbi/model.rb#1359 sig do params( loc: T.nilable(::RBI::Loc), @@ -3103,7 +3118,7 @@ class RBI::TEnumBlock < ::RBI::Scope end def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi/lib/rbi/model.rb#1362 + # source://rbi/lib/rbi/model.rb#1365 sig { override.returns(::String) } def fully_qualified_name; end @@ -3111,16 +3126,16 @@ class RBI::TEnumBlock < ::RBI::Scope sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi/lib/rbi/model.rb#1367 + # source://rbi/lib/rbi/model.rb#1370 sig { override.returns(::String) } def to_s; end end # Sorbet's T::Struct # -# source://rbi/lib/rbi/model.rb#1215 +# source://rbi/lib/rbi/model.rb#1218 class RBI::TStruct < ::RBI::Class - # source://rbi/lib/rbi/model.rb#1226 + # source://rbi/lib/rbi/model.rb#1229 sig do params( name: ::String, @@ -3132,11 +3147,11 @@ class RBI::TStruct < ::RBI::Class def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi/lib/rbi/model.rb#1267 +# source://rbi/lib/rbi/model.rb#1270 class RBI::TStructConst < ::RBI::TStructField include ::RBI::Indexable - # source://rbi/lib/rbi/model.rb#1280 + # source://rbi/lib/rbi/model.rb#1283 sig do params( name: ::String, @@ -3153,7 +3168,7 @@ class RBI::TStructConst < ::RBI::TStructField sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi/lib/rbi/model.rb#1286 + # source://rbi/lib/rbi/model.rb#1289 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end @@ -3161,18 +3176,18 @@ class RBI::TStructConst < ::RBI::TStructField sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi/lib/rbi/model.rb#1292 + # source://rbi/lib/rbi/model.rb#1295 sig { override.returns(::String) } def to_s; end end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi/lib/rbi/model.rb#1232 +# source://rbi/lib/rbi/model.rb#1235 class RBI::TStructField < ::RBI::NodeWithComments abstract! - # source://rbi/lib/rbi/model.rb#1256 + # source://rbi/lib/rbi/model.rb#1259 sig do params( name: ::String, @@ -3188,45 +3203,45 @@ class RBI::TStructField < ::RBI::NodeWithComments sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi/lib/rbi/model.rb#1245 + # source://rbi/lib/rbi/model.rb#1248 sig { returns(T.nilable(::String)) } def default; end # @return [String, nil] # - # source://rbi/lib/rbi/model.rb#1245 + # source://rbi/lib/rbi/model.rb#1248 def default=(_arg0); end # @abstract # - # source://rbi/lib/rbi/model.rb#1264 + # source://rbi/lib/rbi/model.rb#1267 sig { abstract.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi/lib/rbi/model.rb#1239 + # source://rbi/lib/rbi/model.rb#1242 sig { returns(::String) } def name; end # @return [String] # - # source://rbi/lib/rbi/model.rb#1239 + # source://rbi/lib/rbi/model.rb#1242 def name=(_arg0); end - # source://rbi/lib/rbi/model.rb#1242 + # source://rbi/lib/rbi/model.rb#1245 sig { returns(T.any(::RBI::Type, ::String)) } def type; end # @return [Type, String] # - # source://rbi/lib/rbi/model.rb#1242 + # source://rbi/lib/rbi/model.rb#1245 def type=(_arg0); end end -# source://rbi/lib/rbi/model.rb#1297 +# source://rbi/lib/rbi/model.rb#1300 class RBI::TStructProp < ::RBI::TStructField include ::RBI::Indexable - # source://rbi/lib/rbi/model.rb#1310 + # source://rbi/lib/rbi/model.rb#1313 sig do params( name: ::String, @@ -3243,7 +3258,7 @@ class RBI::TStructProp < ::RBI::TStructField sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi/lib/rbi/model.rb#1316 + # source://rbi/lib/rbi/model.rb#1319 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end @@ -3251,7 +3266,7 @@ class RBI::TStructProp < ::RBI::TStructField sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi/lib/rbi/model.rb#1322 + # source://rbi/lib/rbi/model.rb#1325 sig { override.returns(::String) } def to_s; end end @@ -3280,7 +3295,7 @@ class RBI::Tree < ::RBI::NodeWithComments sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end - # source://tapioca/0.16.5lib/tapioca/rbi_ext/model.rb#38 + # source://tapioca/0.16.8lib/tapioca/rbi_ext/model.rb#38 sig do params( name: ::String, @@ -3290,19 +3305,19 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_class(name, superclass_name: T.unsafe(nil), &block); end - # source://tapioca/0.16.5lib/tapioca/rbi_ext/model.rb#45 + # source://tapioca/0.16.8lib/tapioca/rbi_ext/model.rb#45 sig { params(name: ::String, value: ::String).void } def create_constant(name, value:); end - # source://tapioca/0.16.5lib/tapioca/rbi_ext/model.rb#55 + # source://tapioca/0.16.8lib/tapioca/rbi_ext/model.rb#55 sig { params(name: ::String).void } def create_extend(name); end - # source://tapioca/0.16.5lib/tapioca/rbi_ext/model.rb#50 + # source://tapioca/0.16.8lib/tapioca/rbi_ext/model.rb#50 sig { params(name: ::String).void } def create_include(name); end - # source://tapioca/0.16.5lib/tapioca/rbi_ext/model.rb#90 + # source://tapioca/0.16.8lib/tapioca/rbi_ext/model.rb#90 sig do params( name: ::String, @@ -3316,19 +3331,19 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://tapioca/0.16.5lib/tapioca/rbi_ext/model.rb#60 + # source://tapioca/0.16.8lib/tapioca/rbi_ext/model.rb#60 sig { params(name: ::String).void } def create_mixes_in_class_methods(name); end - # source://tapioca/0.16.5lib/tapioca/rbi_ext/model.rb#25 + # source://tapioca/0.16.8lib/tapioca/rbi_ext/model.rb#25 sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } def create_module(name, &block); end - # source://tapioca/0.16.5lib/tapioca/rbi_ext/model.rb#9 + # source://tapioca/0.16.8lib/tapioca/rbi_ext/model.rb#9 sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } def create_path(constant, &block); end - # source://tapioca/0.16.5lib/tapioca/rbi_ext/model.rb#74 + # source://tapioca/0.16.8lib/tapioca/rbi_ext/model.rb#74 sig do params( name: ::String, @@ -3406,11 +3421,11 @@ class RBI::Tree < ::RBI::NodeWithComments private - # source://tapioca/0.16.5lib/tapioca/rbi_ext/model.rb#123 + # source://tapioca/0.16.8lib/tapioca/rbi_ext/model.rb#123 sig { params(node: ::RBI::Node).returns(::RBI::Node) } def create_node(node); end - # source://tapioca/0.16.5lib/tapioca/rbi_ext/model.rb#118 + # source://tapioca/0.16.8lib/tapioca/rbi_ext/model.rb#118 sig { returns(T::Hash[::String, ::RBI::Node]) } def nodes_cache; end end @@ -3476,7 +3491,7 @@ class RBI::Type sig { returns(::RBI::Type) } def non_nilable; end - # source://rbi/lib/rbi/rbs_printer.rb#1023 + # source://rbi/lib/rbi/rbs_printer.rb#1074 sig { returns(::String) } def rbs_string; end @@ -4130,11 +4145,11 @@ class RBI::Type::Void < ::RBI::Type def to_rbi; end end -# source://rbi/lib/rbi/model.rb#1400 +# source://rbi/lib/rbi/model.rb#1403 class RBI::TypeMember < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi/lib/rbi/model.rb#1415 + # source://rbi/lib/rbi/model.rb#1418 sig do params( name: ::String, @@ -4146,7 +4161,7 @@ class RBI::TypeMember < ::RBI::NodeWithComments end def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi/lib/rbi/model.rb#1423 + # source://rbi/lib/rbi/model.rb#1426 sig { returns(::String) } def fully_qualified_name; end @@ -4154,109 +4169,109 @@ class RBI::TypeMember < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi/lib/rbi/model.rb#1404 + # source://rbi/lib/rbi/model.rb#1407 sig { returns(::String) } def name; end - # source://rbi/lib/rbi/model.rb#1430 + # source://rbi/lib/rbi/model.rb#1433 sig { override.returns(::String) } def to_s; end # @return [String] # - # source://rbi/lib/rbi/model.rb#1404 + # source://rbi/lib/rbi/model.rb#1407 def value; end end -# source://rbi/lib/rbi/rbs_printer.rb#780 +# source://rbi/lib/rbi/rbs_printer.rb#809 class RBI::TypePrinter - # source://rbi/lib/rbi/rbs_printer.rb#787 + # source://rbi/lib/rbi/rbs_printer.rb#816 sig { void } def initialize; end - # source://rbi/lib/rbi/rbs_printer.rb#784 + # source://rbi/lib/rbi/rbs_printer.rb#813 sig { returns(::String) } def string; end - # source://rbi/lib/rbi/rbs_printer.rb#792 + # source://rbi/lib/rbi/rbs_printer.rb#821 sig { params(node: ::RBI::Type).void } def visit(node); end - # source://rbi/lib/rbi/rbs_printer.rb#900 + # source://rbi/lib/rbi/rbs_printer.rb#936 sig { params(type: ::RBI::Type::All).void } def visit_all(type); end - # source://rbi/lib/rbi/rbs_printer.rb#910 + # source://rbi/lib/rbi/rbs_printer.rb#946 sig { params(type: ::RBI::Type::Any).void } def visit_any(type); end - # source://rbi/lib/rbi/rbs_printer.rb#857 + # source://rbi/lib/rbi/rbs_printer.rb#886 sig { params(type: ::RBI::Type::Anything).void } def visit_anything(type); end - # source://rbi/lib/rbi/rbs_printer.rb#882 + # source://rbi/lib/rbi/rbs_printer.rb#911 sig { params(type: ::RBI::Type::AttachedClass).void } def visit_attached_class(type); end - # source://rbi/lib/rbi/rbs_printer.rb#841 + # source://rbi/lib/rbi/rbs_printer.rb#870 sig { params(type: ::RBI::Type::Boolean).void } def visit_boolean(type); end - # source://rbi/lib/rbi/rbs_printer.rb#962 + # source://rbi/lib/rbi/rbs_printer.rb#1013 sig { params(type: ::RBI::Type::Class).void } def visit_class(type); end - # source://rbi/lib/rbi/rbs_printer.rb#893 + # source://rbi/lib/rbi/rbs_printer.rb#929 sig { params(type: ::RBI::Type::ClassOf).void } def visit_class_of(type); end - # source://rbi/lib/rbi/rbs_printer.rb#846 + # source://rbi/lib/rbi/rbs_printer.rb#875 sig { params(type: ::RBI::Type::Generic).void } def visit_generic(type); end - # source://rbi/lib/rbi/rbs_printer.rb#887 + # source://rbi/lib/rbi/rbs_printer.rb#916 sig { params(type: ::RBI::Type::Nilable).void } def visit_nilable(type); end - # source://rbi/lib/rbi/rbs_printer.rb#867 + # source://rbi/lib/rbi/rbs_printer.rb#896 sig { params(type: ::RBI::Type::NoReturn).void } def visit_no_return(type); end - # source://rbi/lib/rbi/rbs_printer.rb#941 + # source://rbi/lib/rbi/rbs_printer.rb#986 sig { params(type: ::RBI::Type::Proc).void } def visit_proc(type); end - # source://rbi/lib/rbi/rbs_printer.rb#877 + # source://rbi/lib/rbi/rbs_printer.rb#906 sig { params(type: ::RBI::Type::SelfType).void } def visit_self_type(type); end - # source://rbi/lib/rbi/rbs_printer.rb#930 + # source://rbi/lib/rbi/rbs_printer.rb#966 sig { params(type: ::RBI::Type::Shape).void } def visit_shape(type); end - # source://rbi/lib/rbi/rbs_printer.rb#836 + # source://rbi/lib/rbi/rbs_printer.rb#865 sig { params(type: ::RBI::Type::Simple).void } def visit_simple(type); end - # source://rbi/lib/rbi/rbs_printer.rb#920 + # source://rbi/lib/rbi/rbs_printer.rb#956 sig { params(type: ::RBI::Type::Tuple).void } def visit_tuple(type); end - # source://rbi/lib/rbi/rbs_printer.rb#957 + # source://rbi/lib/rbi/rbs_printer.rb#1008 sig { params(type: ::RBI::Type::TypeParameter).void } def visit_type_parameter(type); end - # source://rbi/lib/rbi/rbs_printer.rb#872 + # source://rbi/lib/rbi/rbs_printer.rb#901 sig { params(type: ::RBI::Type::Untyped).void } def visit_untyped(type); end - # source://rbi/lib/rbi/rbs_printer.rb#862 + # source://rbi/lib/rbi/rbs_printer.rb#891 sig { params(type: ::RBI::Type::Void).void } def visit_void(type); end private - # source://rbi/lib/rbi/rbs_printer.rb#971 + # source://rbi/lib/rbi/rbs_printer.rb#1022 sig { params(type_name: ::String).returns(::String) } def translate_t_type(type_name); end end diff --git a/sorbet/rbi/gems/ruby-lsp@0.23.0.rbi b/sorbet/rbi/gems/ruby-lsp@0.23.6.rbi similarity index 93% rename from sorbet/rbi/gems/ruby-lsp@0.23.0.rbi rename to sorbet/rbi/gems/ruby-lsp@0.23.6.rbi index ed6996b2..e580f72f 100644 --- a/sorbet/rbi/gems/ruby-lsp@0.23.0.rbi +++ b/sorbet/rbi/gems/ruby-lsp@0.23.6.rbi @@ -5,7 +5,7 @@ # Please instead update this file by running `bin/tapioca gem ruby-lsp`. -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#4 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/visibility_scope.rb#4 module RubyIndexer; end # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#5 @@ -73,7 +73,7 @@ class RubyIndexer::DeclarationListener end def initialize(index, dispatcher, parse_result, uri, collect_comments: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#523 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#538 sig do params( name_or_nesting: T.any(::String, T::Array[::String]), @@ -85,7 +85,7 @@ class RubyIndexer::DeclarationListener end def add_class(name_or_nesting, full_location, name_location, parent_class_name: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#476 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#491 sig do params( name: ::String, @@ -97,7 +97,7 @@ class RubyIndexer::DeclarationListener end def add_method(name, node_location, signatures, visibility: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#499 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#514 sig do params( name: ::String, @@ -108,7 +108,7 @@ class RubyIndexer::DeclarationListener end def add_module(name, full_location, name_location, comments: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#555 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#570 sig { returns(T.nilable(::RubyIndexer::Entry::Namespace)) } def current_owner; end @@ -116,161 +116,161 @@ class RubyIndexer::DeclarationListener sig { returns(T::Array[::String]) } def indexing_errors; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#427 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#442 sig { params(node: ::Prism::AliasMethodNode).void } def on_alias_method_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#266 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#265 sig { params(node: ::Prism::CallNode).void } def on_call_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#305 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#303 sig { params(node: ::Prism::CallNode).void } def on_call_node_leave(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#92 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#91 sig { params(node: ::Prism::ClassNode).void } def on_class_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#124 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#123 sig { params(node: ::Prism::ClassNode).void } def on_class_node_leave(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#443 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#458 sig { params(node: ::Prism::ClassVariableAndWriteNode).void } def on_class_variable_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#448 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#463 sig { params(node: ::Prism::ClassVariableOperatorWriteNode).void } def on_class_variable_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#453 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#468 sig { params(node: ::Prism::ClassVariableOrWriteNode).void } def on_class_variable_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#458 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#473 sig { params(node: ::Prism::ClassVariableTargetNode).void } def on_class_variable_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#463 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#478 sig { params(node: ::Prism::ClassVariableWriteNode).void } def on_class_variable_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#254 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#253 sig { params(node: ::Prism::ConstantAndWriteNode).void } def on_constant_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#260 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#259 sig { params(node: ::Prism::ConstantOperatorWriteNode).void } def on_constant_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#248 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#247 sig { params(node: ::Prism::ConstantOrWriteNode).void } def on_constant_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#232 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#231 sig { params(node: ::Prism::ConstantPathAndWriteNode).void } def on_constant_path_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#222 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#221 sig { params(node: ::Prism::ConstantPathOperatorWriteNode).void } def on_constant_path_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#212 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#211 sig { params(node: ::Prism::ConstantPathOrWriteNode).void } def on_constant_path_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#202 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#201 sig { params(node: ::Prism::ConstantPathWriteNode).void } def on_constant_path_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#242 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#241 sig { params(node: ::Prism::ConstantWriteNode).void } def on_constant_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#326 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#324 sig { params(node: ::Prism::DefNode).void } def on_def_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#367 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#383 sig { params(node: ::Prism::DefNode).void } def on_def_node_leave(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#377 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#392 sig { params(node: ::Prism::GlobalVariableAndWriteNode).void } def on_global_variable_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#382 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#397 sig { params(node: ::Prism::GlobalVariableOperatorWriteNode).void } def on_global_variable_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#387 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#402 sig { params(node: ::Prism::GlobalVariableOrWriteNode).void } def on_global_variable_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#392 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#407 sig { params(node: ::Prism::GlobalVariableTargetNode).void } def on_global_variable_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#397 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#412 sig { params(node: ::Prism::GlobalVariableWriteNode).void } def on_global_variable_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#407 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#422 sig { params(node: ::Prism::InstanceVariableAndWriteNode).void } def on_instance_variable_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#412 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#427 sig { params(node: ::Prism::InstanceVariableOperatorWriteNode).void } def on_instance_variable_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#417 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#432 sig { params(node: ::Prism::InstanceVariableOrWriteNode).void } def on_instance_variable_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#422 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#437 sig { params(node: ::Prism::InstanceVariableTargetNode).void } def on_instance_variable_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#402 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#417 sig { params(node: ::Prism::InstanceVariableWriteNode).void } def on_instance_variable_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#129 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#128 sig { params(node: ::Prism::ModuleNode).void } def on_module_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#135 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#134 sig { params(node: ::Prism::ModuleNode).void } def on_module_node_leave(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#182 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#181 sig { params(node: ::Prism::MultiWriteNode).void } def on_multi_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#140 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#139 sig { params(node: ::Prism::SingletonClassNode).void } def on_singleton_class_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#177 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#176 sig { params(node: ::Prism::SingletonClassNode).void } def on_singleton_class_node_leave(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#548 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#563 sig { void } def pop_namespace_stack; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#538 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#553 sig { params(block: T.proc.params(index: ::RubyIndexer::Index, base: ::RubyIndexer::Entry::Namespace).void).void } def register_included_hook(&block); end private - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#1079 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#1108 sig { params(name: ::String).returns(T::Array[::String]) } def actual_nesting(name); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#736 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#751 sig do params( node: T.any(::Prism::ConstantAndWriteNode, ::Prism::ConstantOperatorWriteNode, ::Prism::ConstantOrWriteNode, ::Prism::ConstantPathAndWriteNode, ::Prism::ConstantPathOperatorWriteNode, ::Prism::ConstantPathOrWriteNode, ::Prism::ConstantPathTargetNode, ::Prism::ConstantPathWriteNode, ::Prism::ConstantTargetNode, ::Prism::ConstantWriteNode), @@ -280,35 +280,35 @@ class RubyIndexer::DeclarationListener end def add_constant(node, name, value = T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#1093 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#1122 sig { params(short_name: ::String, entry: ::RubyIndexer::Entry::Namespace).void } def advance_namespace_stack(short_name, entry); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#787 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#802 sig { params(node: ::Prism::Node).returns(T.nilable(::String)) } def collect_comments(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#815 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#830 sig { params(line: ::Integer).returns(T::Boolean) } def comment_exists_at?(line); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#987 - sig { returns(::RubyIndexer::Entry::Visibility) } - def current_visibility; end + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#1016 + sig { returns(::RubyIndexer::VisibilityScope) } + def current_visibility_scope; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#820 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#835 sig { params(name: ::String).returns(::String) } def fully_qualify_name(name); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#680 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#695 sig { params(node: ::Prism::CallNode).void } def handle_alias_method(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#829 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#844 sig { params(node: ::Prism::CallNode, reader: T::Boolean, writer: T::Boolean).void } def handle_attribute(node, reader:, writer:); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#597 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#612 sig do params( node: T.any(::Prism::ClassVariableAndWriteNode, ::Prism::ClassVariableOperatorWriteNode, ::Prism::ClassVariableOrWriteNode, ::Prism::ClassVariableTargetNode, ::Prism::ClassVariableWriteNode), @@ -317,7 +317,7 @@ class RubyIndexer::DeclarationListener end def handle_class_variable(node, loc); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#573 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#588 sig do params( node: T.any(::Prism::GlobalVariableAndWriteNode, ::Prism::GlobalVariableOperatorWriteNode, ::Prism::GlobalVariableOrWriteNode, ::Prism::GlobalVariableTargetNode, ::Prism::GlobalVariableWriteNode), @@ -326,7 +326,7 @@ class RubyIndexer::DeclarationListener end def handle_global_variable(node, loc); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#633 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#648 sig do params( node: T.any(::Prism::InstanceVariableAndWriteNode, ::Prism::InstanceVariableOperatorWriteNode, ::Prism::InstanceVariableOrWriteNode, ::Prism::InstanceVariableTargetNode, ::Prism::InstanceVariableWriteNode), @@ -335,23 +335,30 @@ class RubyIndexer::DeclarationListener end def handle_instance_variable(node, loc); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#906 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#923 sig { params(node: ::Prism::CallNode).void } def handle_module_function(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#872 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#889 sig { params(node: ::Prism::CallNode, operation: ::Symbol).void } def handle_module_operation(node, operation); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#948 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#974 sig { params(node: ::Prism::CallNode).void } def handle_private_class_method(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#655 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#670 sig { params(node: ::Prism::CallNode).void } def handle_private_constant(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#992 + # Returns the last name in the stack not as we found it, but in terms of declared constants. For example, if the + # last entry in the stack is a compact namespace like `Foo::Bar`, then the last name is `Bar` + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#1132 + sig { returns(T.nilable(::String)) } + def last_name_in_stack; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#1021 sig do params( parameters_node: T.nilable(::Prism::ParametersNode) @@ -359,7 +366,7 @@ class RubyIndexer::DeclarationListener end def list_params(parameters_node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#1054 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#1083 sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::Symbol)) } def parameter_name(node); end end @@ -444,7 +451,7 @@ class RubyIndexer::Entry # @return [RubyIndexer::Location] # - # source://sorbet-runtime/0.5.11635lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11761lib/types/private/methods/_methods.rb#257 def name_location(*args, **_arg1, &blk); end # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#57 @@ -817,7 +824,7 @@ class RubyIndexer::Entry::Parameter # # @return [Symbol] # - # source://sorbet-runtime/0.5.11635lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11761lib/types/private/methods/_methods.rb#257 def decorated_name(*args, **_arg1, &blk); end # Name includes just the name of the parameter, excluding symbols like splats @@ -1000,15 +1007,15 @@ class RubyIndexer::Index sig { void } def initialize; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#98 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#101 sig { params(fully_qualified_name: ::String).returns(T.nilable(T::Array[::RubyIndexer::Entry])) } def [](fully_qualified_name); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#89 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#92 sig { params(entry: ::RubyIndexer::Entry, skip_prefix_tree: T::Boolean).void } def add(entry, skip_prefix_tree: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#611 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#615 sig { params(name: ::String, owner_name: ::String).returns(T::Array[::RubyIndexer::Entry::ClassVariable]) } def class_variable_completion_candidates(name, owner_name); end @@ -1016,7 +1023,7 @@ class RubyIndexer::Index sig { returns(::RubyIndexer::Configuration) } def configuration; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#250 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#253 sig do params( name: ::String, @@ -1025,15 +1032,15 @@ class RubyIndexer::Index end def constant_completion_candidates(name, nesting); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#60 - sig { params(uri: ::URI::Generic).void } - def delete(uri); end + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#62 + sig { params(uri: ::URI::Generic, skip_require_paths_tree: T::Boolean).void } + def delete(uri, skip_require_paths_tree: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#652 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#663 sig { returns(T::Boolean) } def empty?; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#700 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#711 sig do type_parameters(:T) .params( @@ -1043,14 +1050,14 @@ class RubyIndexer::Index end def entries_for(uri, type = T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#672 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#683 sig { params(name: ::String).returns(::RubyIndexer::Entry::SingletonClass) } def existing_or_new_singleton_class(name); end # Searches for a constant based on an unqualified name and returns the first possible match regardless of whether # there are more possible matching entries # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#119 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#122 sig do params( name: ::String @@ -1069,28 +1076,36 @@ class RubyIndexer::Index # `Something::Else`, then we first discover `Something::Else::Baz`. But `Something::Else::Baz` might contain other # aliases, so we have to invoke `follow_aliased_namespace` again to check until we only return a real name # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#421 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#425 sig { params(name: ::String, seen_names: T::Array[::String]).returns(::String) } def follow_aliased_namespace(name, seen_names = T.unsafe(nil)); end # Fuzzy searches index entries based on Jaro-Winkler similarity. If no query is provided, all entries are returned # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#168 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#171 sig { params(query: T.nilable(::String)).returns(T::Array[::RubyIndexer::Entry]) } def fuzzy_search(query); end # Synchronizes a change made to the given URI. This method will ensure that new declarations are indexed, removed - # declarations removed and that the ancestor linearization cache is cleared if necessary + # declarations removed and that the ancestor linearization cache is cleared if necessary. If a block is passed, the + # consumer of this API has to handle deleting and inserting/updating entries in the index instead of passing the + # document's source (used to handle unsaved changes to files) # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#623 - sig { params(uri: ::URI::Generic, source: ::String).void } - def handle_change(uri, source); end + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#631 + sig do + params( + uri: ::URI::Generic, + source: T.nilable(::String), + block: T.nilable(T.proc.params(index: ::RubyIndexer::Index).void) + ).void + end + def handle_change(uri, source = T.unsafe(nil), &block); end # Index all files for the given URIs, which defaults to what is configured. A block can be used to track and control # indexing progress. That block is invoked with the current progress percentage and should return `true` to continue # indexing or `false` to stop indexing. # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#356 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#359 sig do params( uris: T::Array[::URI::Generic], @@ -1101,26 +1116,26 @@ class RubyIndexer::Index # Indexes a File URI by reading the contents from disk # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#403 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#407 sig { params(uri: ::URI::Generic, collect_comments: T::Boolean).void } def index_file(uri, collect_comments: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#381 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#385 sig { params(uri: ::URI::Generic, source: ::String, collect_comments: T::Boolean).void } def index_single(uri, source, collect_comments: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#662 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#673 sig { params(name: ::String).returns(T::Boolean) } def indexed?(name); end # Returns a list of possible candidates for completion of instance variables for a given owner name. The name must # include the `@` prefix # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#601 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#605 sig { params(name: ::String, owner_name: ::String).returns(T::Array[::RubyIndexer::Entry::InstanceVariable]) } def instance_variable_completion_candidates(name, owner_name); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#667 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#678 sig { returns(::Integer) } def length; end @@ -1135,11 +1150,11 @@ class RubyIndexer::Index # # @raise [NonExistingNamespaceError] # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#499 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#503 sig { params(fully_qualified_name: ::String).returns(T::Array[::String]) } def linearized_ancestors_of(fully_qualified_name); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#197 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#200 sig do params( name: T.nilable(::String), @@ -1148,7 +1163,7 @@ class RubyIndexer::Index end def method_completion_candidates(name, receiver_name); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#657 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#668 sig { returns(T::Array[::String]) } def names; end @@ -1166,7 +1181,7 @@ class RubyIndexer::Index # ] # ``` # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#149 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#152 sig do params( query: ::String, @@ -1177,7 +1192,7 @@ class RubyIndexer::Index # Register an included `hook` that will be executed when `module_name` is included into any namespace # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#55 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#57 sig do params( module_name: ::String, @@ -1194,7 +1209,7 @@ class RubyIndexer::Index # seen_names: this parameter should not be used by consumers of the api. It is used to avoid infinite recursion when # resolving circular references # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#315 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#318 sig do params( name: ::String, @@ -1204,7 +1219,7 @@ class RubyIndexer::Index end def resolve(name, nesting, seen_names = T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#588 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#592 sig do params( variable_name: ::String, @@ -1216,7 +1231,7 @@ class RubyIndexer::Index # Resolves an instance variable name for a given owner name. This method will linearize the ancestors of the owner # and find inherited instance variables as well # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#577 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#581 sig do params( variable_name: ::String, @@ -1229,7 +1244,7 @@ class RubyIndexer::Index # as it is used only internally to prevent infinite loops when resolving circular aliases # Returns `nil` if the method does not exist on that receiver # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#461 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#465 sig do params( method_name: ::String, @@ -1240,7 +1255,7 @@ class RubyIndexer::Index end def resolve_method(method_name, receiver_name, seen_names = T.unsafe(nil), inherited_only: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#103 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#106 sig { params(query: ::String).returns(T::Array[::URI::Generic]) } def search_require_paths(query); end @@ -1251,11 +1266,11 @@ class RubyIndexer::Index # with `A::B::A::B::Foo`. This method will remove any redundant parts from the final name based on the reference and # the nesting # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#1000 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#1011 sig { params(name: ::String, nesting: T::Array[::String]).returns(::String) } def build_non_redundant_full_name(name, nesting); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#1032 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#1043 sig do params( full_name: ::String, @@ -1264,7 +1279,7 @@ class RubyIndexer::Index end def direct_or_aliased_constant(full_name, seen_names); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#961 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#972 sig do params( name: T.nilable(::String), @@ -1276,7 +1291,7 @@ class RubyIndexer::Index # Linearize mixins for an array of namespace entries. This method will mutate the `ancestors` array with the # linearized ancestors of the mixins # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#746 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#757 sig do params( ancestors: T::Array[::String], @@ -1289,7 +1304,7 @@ class RubyIndexer::Index # Linearize the superclass of a given namespace (including modules with the implicit `Module` superclass). This # method will mutate the `ancestors` array with the linearized ancestors of the superclass # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#796 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#807 sig do params( ancestors: T::Array[::String], @@ -1302,7 +1317,7 @@ class RubyIndexer::Index end def linearize_superclass(ancestors, attached_class_name, fully_qualified_name, namespace_entries, nesting, singleton_levels); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#931 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#942 sig do params( name: ::String, @@ -1312,7 +1327,7 @@ class RubyIndexer::Index end def lookup_ancestor_chain(name, nesting, seen_names); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#902 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#913 sig do params( name: ::String, @@ -1325,7 +1340,7 @@ class RubyIndexer::Index # Attempts to resolve an UnresolvedAlias into a resolved Alias. If the unresolved alias is pointing to a constant # that doesn't exist, then we return the same UnresolvedAlias # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#869 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#880 sig do params( entry: ::RubyIndexer::Entry::UnresolvedConstantAlias, @@ -1337,7 +1352,7 @@ class RubyIndexer::Index # Attempt to resolve a given unresolved method alias. This method returns the resolved alias if we managed to # identify the target or the same unresolved alias entry if we couldn't # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#1054 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#1065 sig do params( entry: ::RubyIndexer::Entry::UnresolvedMethodAlias, @@ -1349,7 +1364,7 @@ class RubyIndexer::Index # Runs the registered included hooks # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#711 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#722 sig { params(fully_qualified_name: ::String, nesting: T::Array[::String]).void } def run_included_hooks(fully_qualified_name, nesting); end end @@ -1655,7 +1670,7 @@ RubyIndexer::RBSIndexer::HAS_UNTYPED_FUNCTION = T.let(T.unsafe(nil), TrueClass) # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#5 class RubyIndexer::ReferenceFinder - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#68 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#81 sig do params( target: ::RubyIndexer::ReferenceFinder::Target, @@ -1666,101 +1681,129 @@ class RubyIndexer::ReferenceFinder end def initialize(target, index, dispatcher, include_declarations: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#266 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#315 sig { params(node: ::Prism::CallNode).void } def on_call_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#109 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#128 sig { params(node: ::Prism::ClassNode).void } def on_class_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#122 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#141 sig { params(node: ::Prism::ClassNode).void } def on_class_node_leave(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#238 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#257 sig { params(node: ::Prism::ConstantAndWriteNode).void } def on_constant_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#243 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#262 sig { params(node: ::Prism::ConstantOperatorWriteNode).void } def on_constant_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#233 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#252 sig { params(node: ::Prism::ConstantOrWriteNode).void } def on_constant_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#217 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#236 sig { params(node: ::Prism::ConstantPathAndWriteNode).void } def on_constant_path_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#158 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#177 sig { params(node: ::Prism::ConstantPathNode).void } def on_constant_path_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#206 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#225 sig { params(node: ::Prism::ConstantPathOperatorWriteNode).void } def on_constant_path_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#195 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#214 sig { params(node: ::Prism::ConstantPathOrWriteNode).void } def on_constant_path_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#184 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#203 sig { params(node: ::Prism::ConstantPathWriteNode).void } def on_constant_path_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#166 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#185 sig { params(node: ::Prism::ConstantReadNode).void } def on_constant_read_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#228 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#247 sig { params(node: ::Prism::ConstantWriteNode).void } def on_constant_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#248 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#267 sig { params(node: ::Prism::DefNode).void } def on_def_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#259 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#278 sig { params(node: ::Prism::DefNode).void } def on_def_node_leave(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#127 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#295 + sig { params(node: ::Prism::InstanceVariableAndWriteNode).void } + def on_instance_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#300 + sig { params(node: ::Prism::InstanceVariableOperatorWriteNode).void } + def on_instance_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#305 + sig { params(node: ::Prism::InstanceVariableOrWriteNode).void } + def on_instance_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#285 + sig { params(node: ::Prism::InstanceVariableReadNode).void } + def on_instance_variable_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#310 + sig { params(node: ::Prism::InstanceVariableTargetNode).void } + def on_instance_variable_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#290 + sig { params(node: ::Prism::InstanceVariableWriteNode).void } + def on_instance_variable_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#146 sig { params(node: ::Prism::ModuleNode).void } def on_module_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#140 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#159 sig { params(node: ::Prism::ModuleNode).void } def on_module_node_leave(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#174 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#193 sig { params(node: ::Prism::MultiWriteNode).void } def on_multi_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#145 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#164 sig { params(node: ::Prism::SingletonClassNode).void } def on_singleton_class_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#153 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#172 sig { params(node: ::Prism::SingletonClassNode).void } def on_singleton_class_node_leave(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#102 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#121 sig { returns(T::Array[::RubyIndexer::ReferenceFinder::Reference]) } def references; end private - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#275 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#324 sig { params(name: ::String).returns(T::Array[::String]) } def actual_nesting(name); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#289 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#338 sig { params(name: ::String, location: ::Prism::Location).void } def collect_constant_references(name, location); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#317 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#358 + sig { params(name: ::String, location: ::Prism::Location, declaration: T::Boolean).void } + def collect_instance_variable_references(name, location, declaration); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#373 sig do params( node: T.any(::Prism::ConstantPathNode, ::Prism::ConstantPathTargetNode, ::Prism::ConstantReadNode) @@ -1780,6 +1823,17 @@ class RubyIndexer::ReferenceFinder::ConstTarget < ::RubyIndexer::ReferenceFinder def fully_qualified_name; end end +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#40 +class RubyIndexer::ReferenceFinder::InstanceVariableTarget < ::RubyIndexer::ReferenceFinder::Target + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#47 + sig { params(name: ::String).void } + def initialize(name); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#44 + sig { returns(::String) } + def name; end +end + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#27 class RubyIndexer::ReferenceFinder::MethodTarget < ::RubyIndexer::ReferenceFinder::Target # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#34 @@ -1791,21 +1845,21 @@ class RubyIndexer::ReferenceFinder::MethodTarget < ::RubyIndexer::ReferenceFinde def method_name; end end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#40 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#53 class RubyIndexer::ReferenceFinder::Reference - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#53 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#66 sig { params(name: ::String, location: ::Prism::Location, declaration: T::Boolean).void } def initialize(name, location, declaration:); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#50 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#63 sig { returns(T::Boolean) } def declaration; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#47 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#60 sig { returns(::Prism::Location) } def location; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#44 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#57 sig { returns(::String) } def name; end end @@ -1817,6 +1871,34 @@ class RubyIndexer::ReferenceFinder::Target abstract! end +# Represents the visibility scope in a Ruby namespace. This keeps track of whether methods are in a public, private or +# protected section, and whether they are module functions. +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/visibility_scope.rb#7 +class RubyIndexer::VisibilityScope + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/visibility_scope.rb#31 + sig { params(visibility: ::RubyIndexer::Entry::Visibility, module_func: T::Boolean).void } + def initialize(visibility: T.unsafe(nil), module_func: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/visibility_scope.rb#28 + sig { returns(T::Boolean) } + def module_func; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/visibility_scope.rb#25 + sig { returns(::RubyIndexer::Entry::Visibility) } + def visibility; end + + class << self + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/visibility_scope.rb#14 + sig { returns(T.attached_class) } + def module_function_scope; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/visibility_scope.rb#19 + sig { returns(T.attached_class) } + def public_scope; end + end +end + # source://ruby-lsp/lib/ruby-lsp.rb#4 module RubyLsp; end @@ -2085,55 +2167,55 @@ class RubyLsp::BaseServer sig { params(options: T.untyped).void } def initialize(**options); end - # source://ruby-lsp/lib/ruby_lsp/base_server.rb#148 + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#142 sig { params(id: ::Integer, message: ::String, type: ::Integer).void } def fail_request_and_notify(id, message, type: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/base_server.rb#154 + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#148 sig { returns(::Thread) } def new_worker; end # This method is only intended to be used in tests! Pops the latest response that would be sent to the client # - # source://ruby-lsp/lib/ruby_lsp/base_server.rb#131 + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#125 sig { returns(T.untyped) } def pop_response; end # @abstract # - # source://ruby-lsp/lib/ruby_lsp/base_server.rb#142 + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#136 sig { abstract.params(message: T::Hash[::Symbol, T.untyped]).void } def process_message(message); end # This method is only intended to be used in tests! Pushes a message to the incoming queue directly # - # source://ruby-lsp/lib/ruby_lsp/base_server.rb#137 + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#131 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def push_message(message); end - # source://ruby-lsp/lib/ruby_lsp/base_server.rb#117 + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#111 sig { void } def run_shutdown; end - # source://ruby-lsp/lib/ruby_lsp/base_server.rb#189 + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#179 sig { params(id: ::Integer).void } def send_empty_response(id); end - # source://ruby-lsp/lib/ruby_lsp/base_server.rb#194 + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#184 sig { params(message: ::String, type: ::Integer).void } def send_log_message(message, type: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/base_server.rb#178 + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#168 sig { params(message: T.any(::RubyLsp::Error, ::RubyLsp::Notification, ::RubyLsp::Request, ::RubyLsp::Result)).void } def send_message(message); end # @abstract # - # source://ruby-lsp/lib/ruby_lsp/base_server.rb#145 + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#139 sig { abstract.void } def shutdown; end - # source://ruby-lsp/lib/ruby_lsp/base_server.rb#46 + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#45 sig { void } def start; end end @@ -2143,20 +2225,25 @@ end # # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#7 class RubyLsp::ClientCapabilities - # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#17 + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#18 sig { void } def initialize; end - # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#38 + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#42 sig { params(capabilities: T::Hash[::Symbol, T.untyped]).void } def apply_client_capabilities(capabilities); end + # @return [Boolean] + # + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#11 + def supports_diagnostic_refresh; end + # @return [Boolean] # # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#11 def supports_progress; end - # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#63 + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#69 sig { returns(T::Boolean) } def supports_rename?; end @@ -2202,17 +2289,15 @@ class RubyLsp::Document ParseResultType = type_member - # source://ruby-lsp/lib/ruby_lsp/document.rb#47 - sig { params(source: ::String, version: ::Integer, uri: ::URI::Generic, encoding: ::Encoding).void } - def initialize(source:, version:, uri:, encoding: T.unsafe(nil)); end + # source://ruby-lsp/lib/ruby_lsp/document.rb#50 + sig { params(source: ::String, version: ::Integer, uri: ::URI::Generic, global_state: ::RubyLsp::GlobalState).void } + def initialize(source:, version:, uri:, global_state:); end - # source://ruby-lsp/lib/ruby_lsp/document.rb#60 + # source://ruby-lsp/lib/ruby_lsp/document.rb#65 sig { params(other: RubyLsp::Document[T.untyped]).returns(T::Boolean) } def ==(other); end - # TODO: remove this method once all non-positional requests have been migrated to the listener pattern - # - # source://ruby-lsp/lib/ruby_lsp/document.rb#75 + # source://ruby-lsp/lib/ruby_lsp/document.rb#79 sig do type_parameters(:T) .params( @@ -2222,33 +2307,42 @@ class RubyLsp::Document end def cache_fetch(request_name, &block); end - # source://ruby-lsp/lib/ruby_lsp/document.rb#90 + # source://ruby-lsp/lib/ruby_lsp/document.rb#94 sig { params(request_name: ::String).returns(T.untyped) } def cache_get(request_name); end - # source://ruby-lsp/lib/ruby_lsp/document.rb#85 + # source://ruby-lsp/lib/ruby_lsp/document.rb#89 sig { type_parameters(:T).params(request_name: ::String, value: T.type_parameter(:T)).returns(T.type_parameter(:T)) } def cache_set(request_name, value); end - # source://ruby-lsp/lib/ruby_lsp/document.rb#119 - sig { returns(::RubyLsp::Document::Scanner) } - def create_scanner; end - # source://ruby-lsp/lib/ruby_lsp/document.rb#41 sig { returns(::Encoding) } def encoding; end + # source://ruby-lsp/lib/ruby_lsp/document.rb#146 + sig do + params( + start_pos: T::Hash[::Symbol, T.untyped], + end_pos: T.nilable(T::Hash[::Symbol, T.untyped]) + ).returns([::Integer, T.nilable(::Integer)]) + end + def find_index_by_position(start_pos, end_pos = T.unsafe(nil)); end + # @abstract # - # source://ruby-lsp/lib/ruby_lsp/document.rb#65 + # source://ruby-lsp/lib/ruby_lsp/document.rb#70 sig { abstract.returns(::RubyLsp::Document::LanguageId) } def language_id; end + # source://ruby-lsp/lib/ruby_lsp/document.rb#44 + sig { returns(T.nilable(::RubyLsp::Document::Edit)) } + def last_edit; end + # Returns `true` if the document was parsed and `false` if nothing needed parsing # # @abstract # - # source://ruby-lsp/lib/ruby_lsp/document.rb#113 + # source://ruby-lsp/lib/ruby_lsp/document.rb#130 sig { abstract.returns(T::Boolean) } def parse!; end @@ -2256,21 +2350,21 @@ class RubyLsp::Document sig { returns(ParseResultType) } def parse_result; end - # source://ruby-lsp/lib/ruby_lsp/document.rb#124 + # source://ruby-lsp/lib/ruby_lsp/document.rb#136 sig { returns(T::Boolean) } def past_expensive_limit?; end - # source://ruby-lsp/lib/ruby_lsp/document.rb#95 + # source://ruby-lsp/lib/ruby_lsp/document.rb#99 sig { params(edits: T::Array[T::Hash[::Symbol, T.untyped]], version: ::Integer).void } def push_edits(edits, version:); end - # source://ruby-lsp/lib/ruby_lsp/document.rb#44 + # source://ruby-lsp/lib/ruby_lsp/document.rb#47 sig { returns(T.any(::LanguageServer::Protocol::Interface::SemanticTokens, ::Object)) } def semantic_tokens; end # @return [Interface::SemanticTokens, Object] # - # source://ruby-lsp/lib/ruby_lsp/document.rb#44 + # source://ruby-lsp/lib/ruby_lsp/document.rb#47 def semantic_tokens=(_arg0); end # source://ruby-lsp/lib/ruby_lsp/document.rb#32 @@ -2279,7 +2373,7 @@ class RubyLsp::Document # @abstract # - # source://ruby-lsp/lib/ruby_lsp/document.rb#116 + # source://ruby-lsp/lib/ruby_lsp/document.rb#133 sig { abstract.returns(T::Boolean) } def syntax_error?; end @@ -2290,11 +2384,38 @@ class RubyLsp::Document # source://ruby-lsp/lib/ruby_lsp/document.rb#35 sig { returns(::Integer) } def version; end + + private + + # source://ruby-lsp/lib/ruby_lsp/document.rb#158 + sig { returns(::RubyLsp::Document::Scanner) } + def create_scanner; end end +# source://ruby-lsp/lib/ruby_lsp/document.rb#179 +class RubyLsp::Document::Delete < ::RubyLsp::Document::Edit; end + # source://ruby-lsp/lib/ruby_lsp/document.rb#24 RubyLsp::Document::EMPTY_CACHE = T.let(T.unsafe(nil), Object) +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://ruby-lsp/lib/ruby_lsp/document.rb#162 +class RubyLsp::Document::Edit + abstract! + + # source://ruby-lsp/lib/ruby_lsp/document.rb#172 + sig { params(range: T::Hash[::Symbol, T.untyped]).void } + def initialize(range); end + + # source://ruby-lsp/lib/ruby_lsp/document.rb#169 + sig { returns(T::Hash[::Symbol, T.untyped]) } + def range; end +end + +# source://ruby-lsp/lib/ruby_lsp/document.rb#177 +class RubyLsp::Document::Insert < ::RubyLsp::Document::Edit; end + # source://ruby-lsp/lib/ruby_lsp/document.rb#6 class RubyLsp::Document::LanguageId < ::T::Enum enums do @@ -2313,32 +2434,35 @@ class RubyLsp::Document::LocationNotFoundError < ::StandardError; end # source://ruby-lsp/lib/ruby_lsp/document.rb#23 RubyLsp::Document::MAXIMUM_CHARACTERS_FOR_EXPENSIVE_FEATURES = T.let(T.unsafe(nil), Integer) -# source://ruby-lsp/lib/ruby_lsp/document.rb#128 +# source://ruby-lsp/lib/ruby_lsp/document.rb#178 +class RubyLsp::Document::Replace < ::RubyLsp::Document::Edit; end + +# source://ruby-lsp/lib/ruby_lsp/document.rb#181 class RubyLsp::Document::Scanner - # source://ruby-lsp/lib/ruby_lsp/document.rb#136 + # source://ruby-lsp/lib/ruby_lsp/document.rb#189 sig { params(source: ::String, encoding: ::Encoding).void } def initialize(source, encoding); end # Finds the character index inside the source string for a given line and column # - # source://ruby-lsp/lib/ruby_lsp/document.rb#145 + # source://ruby-lsp/lib/ruby_lsp/document.rb#198 sig { params(position: T::Hash[::Symbol, T.untyped]).returns(::Integer) } def find_char_position(position); end # Subtract 1 for each character after 0xFFFF in the current line from the column position, so that we hit the # right character in the UTF-8 representation # - # source://ruby-lsp/lib/ruby_lsp/document.rb#175 + # source://ruby-lsp/lib/ruby_lsp/document.rb#228 sig { params(current_position: ::Integer, requested_position: ::Integer).returns(::Integer) } def utf_16_character_position_correction(current_position, requested_position); end end -# source://ruby-lsp/lib/ruby_lsp/document.rb#131 +# source://ruby-lsp/lib/ruby_lsp/document.rb#184 RubyLsp::Document::Scanner::LINE_BREAK = T.let(T.unsafe(nil), Integer) # After character 0xFFFF, UTF-16 considers characters to have length 2 and we have to account for that # -# source://ruby-lsp/lib/ruby_lsp/document.rb#133 +# source://ruby-lsp/lib/ruby_lsp/document.rb#186 RubyLsp::Document::Scanner::SURROGATE_PAIR_START = T.let(T.unsafe(nil), Integer) # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#5 @@ -2348,8 +2472,8 @@ class RubyLsp::ERBDocument < ::RubyLsp::Document ParseResultType = type_member { { fixed: Prism::ParseResult } } # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#23 - sig { params(source: ::String, version: ::Integer, uri: ::URI::Generic, encoding: ::Encoding).void } - def initialize(source:, version:, uri:, encoding: T.unsafe(nil)); end + sig { params(source: ::String, version: ::Integer, uri: ::URI::Generic, global_state: ::RubyLsp::GlobalState).void } + def initialize(source:, version:, uri:, global_state:); end # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#20 sig { returns(T.any(::Prism::CodeUnitsCache, T.proc.params(arg0: ::Integer).returns(::Integer))) } @@ -2359,7 +2483,7 @@ class RubyLsp::ERBDocument < ::RubyLsp::Document sig { returns(::String) } def host_language_source; end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#75 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#77 sig { params(char_position: ::Integer).returns(T.nilable(T::Boolean)) } def inside_host_language?(char_position); end @@ -2385,55 +2509,55 @@ class RubyLsp::ERBDocument < ::RubyLsp::Document def syntax_error?; end end -# source://ruby-lsp/lib/ruby_lsp/erb_document.rb#80 +# source://ruby-lsp/lib/ruby_lsp/erb_document.rb#82 class RubyLsp::ERBDocument::ERBScanner - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#87 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#89 sig { params(source: ::String).void } def initialize(source); end # @return [String] # - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#84 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#86 def host_language; end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#84 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#86 sig { returns(::String) } def ruby; end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#96 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#98 sig { void } def scan; end private - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#172 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#174 sig { returns(::String) } def next_char; end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#161 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#163 sig { params(char: ::String).void } def push_char(char); end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#106 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#108 sig { void } def scan_char; end end -# source://ruby-lsp/lib/ruby_lsp/utils.rb#170 +# source://ruby-lsp/lib/ruby_lsp/utils.rb#217 class RubyLsp::Error - # source://ruby-lsp/lib/ruby_lsp/utils.rb#180 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#227 sig { params(id: ::Integer, code: ::Integer, message: ::String, data: T.nilable(T::Hash[::Symbol, T.untyped])).void } def initialize(id:, code:, message:, data: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#177 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#224 sig { returns(::Integer) } def code; end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#174 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#221 sig { returns(::String) } def message; end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#188 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#235 sig { returns(T::Hash[::Symbol, T.untyped]) } def to_hash; end end @@ -2446,21 +2570,21 @@ RubyLsp::GUESSED_TYPES_URL = T.let(T.unsafe(nil), String) # source://ruby-lsp/lib/ruby_lsp/global_state.rb#5 class RubyLsp::GlobalState - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#33 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#36 sig { void } def initialize; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#69 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#78 sig { returns(T.nilable(::RubyLsp::Requests::Support::Formatter)) } def active_formatter; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#74 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#83 sig { returns(T::Array[::RubyLsp::Requests::Support::Formatter]) } def active_linters; end # Applies the options provided by the editor and returns an array of notifications to send back to the client # - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#80 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#89 sig { params(options: T::Hash[::Symbol, T.untyped]).returns(T::Array[::RubyLsp::Notification]) } def apply_options(options); end @@ -2468,7 +2592,7 @@ class RubyLsp::GlobalState sig { returns(::RubyLsp::ClientCapabilities) } def client_capabilities; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#148 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#182 sig { params(flag: ::Symbol).returns(T.nilable(T::Boolean)) } def enabled_feature?(flag); end @@ -2476,7 +2600,7 @@ class RubyLsp::GlobalState sig { returns(::Encoding) } def encoding; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#158 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#192 sig { returns(::String) } def encoding_name; end @@ -2497,18 +2621,22 @@ class RubyLsp::GlobalState sig { returns(::RubyIndexer::Index) } def index; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#64 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#73 sig { params(identifier: ::String, instance: ::RubyLsp::Requests::Support::Formatter).void } def register_formatter(identifier, instance); end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#59 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#68 sig { params(addon_name: ::String).returns(T.nilable(T::Hash[::Symbol, T.untyped])) } def settings_for_addon(addon_name); end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#170 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#204 sig { returns(T::Boolean) } def supports_watching_files; end + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#63 + sig { type_parameters(:T).params(block: T.proc.returns(T.type_parameter(:T))).returns(T.type_parameter(:T)) } + def synchronize(&block); end + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#9 sig { returns(::String) } def test_library; end @@ -2521,48 +2649,52 @@ class RubyLsp::GlobalState sig { returns(::RubyLsp::TypeInferrer) } def type_inferrer; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#153 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#187 sig { returns(::String) } def workspace_path; end + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#33 + sig { returns(::URI::Generic) } + def workspace_uri; end + private - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#233 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#267 sig { returns(T::Boolean) } def bin_rails_present; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#177 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#211 sig { params(direct_dependencies: T::Array[::String], all_dependencies: T::Array[::String]).returns(::String) } def detect_formatter(direct_dependencies, all_dependencies); end # Try to detect if there are linters in the project's dependencies. For auto-detection, we always only consider a # single linter. To have multiple linters running, the user must configure them manually # - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#193 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#227 sig { params(dependencies: T::Array[::String], all_dependencies: T::Array[::String]).returns(T::Array[::String]) } def detect_linters(dependencies, all_dependencies); end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#204 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#238 sig { params(dependencies: T::Array[::String]).returns(::String) } def detect_test_library(dependencies); end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#224 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#258 sig { params(dependencies: T::Array[::String]).returns(T::Boolean) } def detect_typechecker(dependencies); end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#238 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#272 sig { returns(T::Boolean) } def dot_rubocop_yml_present; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#260 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#294 sig { returns(T::Array[::String]) } def gather_direct_and_indirect_dependencies; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#243 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#277 sig { returns(T::Array[::String]) } def gather_direct_dependencies; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#253 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#287 sig { returns(T::Array[::String]) } def gemspec_dependencies; end end @@ -2980,11 +3112,11 @@ class RubyLsp::Listeners::Definition private - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#392 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#393 sig { params(value: ::String).void } def find_in_index(value); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#381 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#382 sig { params(node: ::Prism::CallNode).void } def handle_autoload_definition(node); end @@ -3010,7 +3142,7 @@ class RubyLsp::Listeners::Definition end def handle_method_definition(message, receiver_type, inherited_only: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#344 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#345 sig { params(node: ::Prism::StringNode, message: ::Symbol).void } def handle_require_definition(node, message); end @@ -3264,7 +3396,7 @@ class RubyLsp::Listeners::DocumentHighlight sig { params(keyword_loc: T.nilable(::Prism::Location), end_loc: T.nilable(::Prism::Location)).void } def add_matching_end_highlights(keyword_loc, end_loc); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#631 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#632 sig { params(location: ::Prism::Location).returns(T::Boolean) } def covers_target_position?(location); end @@ -3341,7 +3473,7 @@ class RubyLsp::Listeners::DocumentLink # 2. The version in the RBI file name # 3. The version from the gemspec # - # source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#146 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#152 sig { params(uri: ::URI::Source).returns(T.nilable(::String)) } def resolve_version(uri); end @@ -4110,7 +4242,7 @@ end # source://ruby-lsp/lib/ruby_lsp/utils.rb#63 class RubyLsp::Notification < ::RubyLsp::Message - # source://ruby-lsp/lib/ruby_lsp/utils.rb#150 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#164 sig { override.returns(T::Hash[::Symbol, T.untyped]) } def to_hash; end @@ -4140,6 +4272,16 @@ class RubyLsp::Notification < ::RubyLsp::Message end def progress_report(id, percentage: T.unsafe(nil), message: T.unsafe(nil)); end + # source://ruby-lsp/lib/ruby_lsp/utils.rb#153 + sig do + params( + uri: ::String, + diagnostics: T::Array[::LanguageServer::Protocol::Interface::Diagnostic], + version: T.nilable(::Integer) + ).returns(::RubyLsp::Notification) + end + def publish_diagnostics(uri, diagnostics, version: T.unsafe(nil)); end + # source://ruby-lsp/lib/ruby_lsp/utils.rb#84 sig { params(data: T::Hash[::Symbol, T.untyped]).returns(::RubyLsp::Notification) } def telemetry(data); end @@ -4161,8 +4303,8 @@ class RubyLsp::RBSDocument < ::RubyLsp::Document ParseResultType = type_member { { fixed: T::Array[::RBS::AST::Declarations::Base] } } # source://ruby-lsp/lib/ruby_lsp/rbs_document.rb#12 - sig { params(source: ::String, version: ::Integer, uri: ::URI::Generic, encoding: ::Encoding).void } - def initialize(source:, version:, uri:, encoding: T.unsafe(nil)); end + sig { params(source: ::String, version: ::Integer, uri: ::URI::Generic, global_state: ::RubyLsp::GlobalState).void } + def initialize(source:, version:, uri:, global_state:); end # source://ruby-lsp/lib/ruby_lsp/rbs_document.rb#38 sig { override.returns(::RubyLsp::Document::LanguageId) } @@ -4179,35 +4321,47 @@ end module RubyLsp::Rails; end -# source://ruby-lsp/lib/ruby_lsp/utils.rb#155 +# source://ruby-lsp/lib/ruby_lsp/utils.rb#171 class RubyLsp::Request < ::RubyLsp::Message - # source://ruby-lsp/lib/ruby_lsp/utils.rb#159 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#204 sig { params(id: T.any(::Integer, ::String), method: ::String, params: ::Object).void } def initialize(id:, method:, params:); end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#165 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#210 sig { override.returns(T::Hash[::Symbol, T.untyped]) } def to_hash; end + + class << self + # source://ruby-lsp/lib/ruby_lsp/utils.rb#178 + sig do + params( + id: ::Integer, + pattern: T.any(::LanguageServer::Protocol::Interface::RelativePattern, ::String), + kind: ::Integer + ).returns(::RubyLsp::Request) + end + def register_watched_files(id, pattern, kind: T.unsafe(nil)); end + end end # A request configuration, to turn on/off features # -# source://ruby-lsp/lib/ruby_lsp/utils.rb#223 +# source://ruby-lsp/lib/ruby_lsp/utils.rb#270 class RubyLsp::RequestConfig - # source://ruby-lsp/lib/ruby_lsp/utils.rb#230 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#277 sig { params(configuration: T::Hash[::Symbol, T::Boolean]).void } def initialize(configuration); end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#227 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#274 sig { returns(T::Hash[::Symbol, T::Boolean]) } def configuration; end # @return [Hash{Symbol => Boolean}] # - # source://ruby-lsp/lib/ruby_lsp/utils.rb#227 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#274 def configuration=(_arg0); end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#235 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#282 sig { params(feature: ::Symbol).returns(T.nilable(T::Boolean)) } def enabled?(feature); end end @@ -4242,7 +4396,7 @@ class RubyLsp::Requests::CodeActionResolve < ::RubyLsp::Requests::Request private - # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#265 + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#261 sig do params( range: T::Hash[::Symbol, T.untyped], @@ -4251,11 +4405,11 @@ class RubyLsp::Requests::CodeActionResolve < ::RubyLsp::Requests::Request end def create_text_edit(range, new_text); end - # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#276 + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#272 sig { params(node: ::Prism::BlockNode, indentation: T.nilable(::String)).returns(::String) } def recursively_switch_nested_block_styles(node, indentation); end - # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#191 + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#189 sig do returns(T.any(::LanguageServer::Protocol::Interface::CodeAction, ::RubyLsp::Requests::CodeActionResolve::Error)) end @@ -4267,7 +4421,7 @@ class RubyLsp::Requests::CodeActionResolve < ::RubyLsp::Requests::Request end def refactor_variable; end - # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#305 + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#301 sig { params(body: ::Prism::Node, indentation: T.nilable(::String)).returns(::String) } def switch_block_body(body, indentation); end @@ -4370,7 +4524,7 @@ class RubyLsp::Requests::Completion < ::RubyLsp::Requests::Request end def initialize(document, global_state, params, sorbet_level, dispatcher); end - # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#105 + # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#106 sig { override.returns(T::Array[::LanguageServer::Protocol::Interface::CompletionItem]) } def perform; end @@ -4826,7 +4980,7 @@ class RubyLsp::Requests::References < ::RubyLsp::Requests::Request private - # source://ruby-lsp/lib/ruby_lsp/requests/references.rb#129 + # source://ruby-lsp/lib/ruby_lsp/requests/references.rb#155 sig do params( target: ::RubyIndexer::ReferenceFinder::Target, @@ -4836,10 +4990,10 @@ class RubyLsp::Requests::References < ::RubyLsp::Requests::Request end def collect_references(target, parse_result, uri); end - # source://ruby-lsp/lib/ruby_lsp/requests/references.rb#106 + # source://ruby-lsp/lib/ruby_lsp/requests/references.rb#124 sig do params( - target_node: T.any(::Prism::CallNode, ::Prism::ConstantPathNode, ::Prism::ConstantPathTargetNode, ::Prism::ConstantReadNode, ::Prism::DefNode), + target_node: T.any(::Prism::CallNode, ::Prism::ConstantPathNode, ::Prism::ConstantPathTargetNode, ::Prism::ConstantReadNode, ::Prism::DefNode, ::Prism::InstanceVariableAndWriteNode, ::Prism::InstanceVariableOperatorWriteNode, ::Prism::InstanceVariableOrWriteNode, ::Prism::InstanceVariableReadNode, ::Prism::InstanceVariableTargetNode, ::Prism::InstanceVariableWriteNode), node_context: ::RubyLsp::NodeContext ).returns(T.nilable(::RubyIndexer::ReferenceFinder::Target)) end @@ -5529,7 +5683,7 @@ class RubyLsp::ResponseBuilders::DocumentSymbol < ::RubyLsp::ResponseBuilders::R # @param symbol [Interface::DocumentSymbol] # @return [void] # - # source://sorbet-runtime/0.5.11635lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11761lib/types/private/methods/_methods.rb#257 def <<(*args, **_arg1, &blk); end # source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#47 @@ -5735,21 +5889,21 @@ end # The final result of running a request before its IO is finalized # -# source://ruby-lsp/lib/ruby_lsp/utils.rb#201 +# source://ruby-lsp/lib/ruby_lsp/utils.rb#248 class RubyLsp::Result - # source://ruby-lsp/lib/ruby_lsp/utils.rb#211 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#258 sig { params(id: ::Integer, response: T.untyped).void } def initialize(id:, response:); end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#208 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#255 sig { returns(::Integer) } def id; end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#205 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#252 sig { returns(T.untyped) } def response; end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#217 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#264 sig { returns(T::Hash[::Symbol, T.untyped]) } def to_hash; end end @@ -5760,19 +5914,23 @@ class RubyLsp::RubyDocument < ::RubyLsp::Document ParseResultType = type_member { { fixed: Prism::ParseResult } } - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#146 - sig { params(source: ::String, version: ::Integer, uri: ::URI::Generic, encoding: ::Encoding).void } - def initialize(source:, version:, uri:, encoding: T.unsafe(nil)); end + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#162 + sig { params(source: ::String, version: ::Integer, uri: ::URI::Generic, global_state: ::RubyLsp::GlobalState).void } + def initialize(source:, version:, uri:, global_state:); end - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#143 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#159 sig { returns(T.any(::Prism::CodeUnitsCache, T.proc.params(arg0: ::Integer).returns(::Integer))) } def code_units_cache; end - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#170 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#186 sig { override.returns(::RubyLsp::Document::LanguageId) } def language_id; end - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#200 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#261 + sig { returns(T::Boolean) } + def last_edit_may_change_declarations?; end + + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#216 sig do params( range: T::Hash[::Symbol, T.untyped], @@ -5781,7 +5939,7 @@ class RubyLsp::RubyDocument < ::RubyLsp::Document end def locate_first_within_range(range, node_types: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#234 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#249 sig do params( position: T::Hash[::Symbol, T.untyped], @@ -5790,20 +5948,26 @@ class RubyLsp::RubyDocument < ::RubyLsp::Document end def locate_node(position, node_types: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#155 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#171 sig { override.returns(T::Boolean) } def parse!; end - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#175 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#191 sig { returns(::RubyLsp::RubyDocument::SorbetLevel) } def sorbet_level; end - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#165 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#181 sig { override.returns(T::Boolean) } def syntax_error?; end + private + + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#281 + sig { params(position: T::Hash[::Symbol, ::Integer]).returns(T::Boolean) } + def position_may_impact_declarations?(position); end + class << self - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#35 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#51 sig do params( node: ::Prism::Node, @@ -5817,6 +5981,9 @@ class RubyLsp::RubyDocument < ::RubyLsp::Document end # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#11 +RubyLsp::RubyDocument::METHODS_THAT_CHANGE_DECLARATIONS = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#27 class RubyLsp::RubyDocument::SorbetLevel < ::T::Enum enums do False = new @@ -5888,35 +6055,43 @@ class RubyLsp::Server < ::RubyLsp::BaseServer private - # source://ruby-lsp/lib/ruby_lsp/server.rb#1162 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1186 sig { params(id: ::String, title: ::String, percentage: ::Integer).void } def begin_progress(id, title, percentage: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1192 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1216 sig { void } def check_formatter_is_available; end - # source://ruby-lsp/lib/ruby_lsp/server.rb#846 + # source://ruby-lsp/lib/ruby_lsp/server.rb#837 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def code_action_resolve(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1182 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1206 sig { params(id: ::String).void } def end_progress(id); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1130 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1039 + sig { params(uri: ::URI::Generic).void } + def handle_rubocop_config_change(uri); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#1022 + sig { params(index: ::RubyIndexer::Index, file_path: ::String, change_type: ::Integer).void } + def handle_ruby_file_change(index, file_path, change_type); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#1154 sig { void } def perform_initial_indexing; end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1211 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1234 sig { params(indexing_options: T.nilable(T::Hash[::Symbol, T.untyped])).void } def process_indexing_configuration(indexing_options); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1175 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1199 sig { params(id: ::String, percentage: ::Integer).void } def progress(id, percentage); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#471 + # source://ruby-lsp/lib/ruby_lsp/server.rb#447 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def run_combined_requests(message); end @@ -5924,159 +6099,159 @@ class RubyLsp::Server < ::RubyLsp::BaseServer sig { params(message: T::Hash[::Symbol, T.untyped]).void } def run_initialize(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#352 + # source://ruby-lsp/lib/ruby_lsp/server.rb#334 sig { void } def run_initialized; end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1125 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1149 sig { override.void } def shutdown; end - # source://ruby-lsp/lib/ruby_lsp/server.rb#782 + # source://ruby-lsp/lib/ruby_lsp/server.rb#773 sig { params(document: RubyLsp::Document[T.untyped]).returns(::RubyLsp::RubyDocument::SorbetLevel) } def sorbet_level(document); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#824 + # source://ruby-lsp/lib/ruby_lsp/server.rb#815 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_code_action(message); end # @param message [Hash{Symbol => T.untyped}] # @return [void] # - # source://sorbet-runtime/0.5.11635lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11761lib/types/private/methods/_methods.rb#257 def text_document_code_lens(*args, **_arg1, &blk); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#911 + # source://ruby-lsp/lib/ruby_lsp/server.rb#902 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_completion(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#936 + # source://ruby-lsp/lib/ruby_lsp/server.rb#927 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_completion_item_resolve(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#981 + # source://ruby-lsp/lib/ruby_lsp/server.rb#972 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_definition(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#871 + # source://ruby-lsp/lib/ruby_lsp/server.rb#862 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_diagnostic(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#435 + # source://ruby-lsp/lib/ruby_lsp/server.rb#411 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_did_change(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#419 + # source://ruby-lsp/lib/ruby_lsp/server.rb#400 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_did_close(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#379 + # source://ruby-lsp/lib/ruby_lsp/server.rb#361 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_did_open(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#662 + # source://ruby-lsp/lib/ruby_lsp/server.rb#653 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_document_highlight(message); end # @param message [Hash{Symbol => T.untyped}] # @return [void] # - # source://sorbet-runtime/0.5.11635lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11761lib/types/private/methods/_methods.rb#257 def text_document_document_link(*args, **_arg1, &blk); end # @param message [Hash{Symbol => T.untyped}] # @return [void] # - # source://sorbet-runtime/0.5.11635lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11761lib/types/private/methods/_methods.rb#257 def text_document_document_symbol(*args, **_arg1, &blk); end # @param message [Hash{Symbol => T.untyped}] # @return [void] # - # source://sorbet-runtime/0.5.11635lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11761lib/types/private/methods/_methods.rb#257 def text_document_folding_range(*args, **_arg1, &blk); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#618 + # source://ruby-lsp/lib/ruby_lsp/server.rb#609 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_formatting(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#701 + # source://ruby-lsp/lib/ruby_lsp/server.rb#692 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_hover(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#790 + # source://ruby-lsp/lib/ruby_lsp/server.rb#781 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_inlay_hint(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#678 + # source://ruby-lsp/lib/ruby_lsp/server.rb#669 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_on_type_formatting(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#746 + # source://ruby-lsp/lib/ruby_lsp/server.rb#737 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_prepare_rename(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1067 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1091 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_prepare_type_hierarchy(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#590 + # source://ruby-lsp/lib/ruby_lsp/server.rb#581 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_range_formatting(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#764 + # source://ruby-lsp/lib/ruby_lsp/server.rb#755 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_references(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#726 + # source://ruby-lsp/lib/ruby_lsp/server.rb#717 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_rename(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#445 + # source://ruby-lsp/lib/ruby_lsp/server.rb#421 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_selection_range(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#536 + # source://ruby-lsp/lib/ruby_lsp/server.rb#527 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_semantic_tokens_delta(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#515 + # source://ruby-lsp/lib/ruby_lsp/server.rb#506 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_semantic_tokens_full(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#561 + # source://ruby-lsp/lib/ruby_lsp/server.rb#552 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_semantic_tokens_range(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1048 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1072 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_show_syntax_tree(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#955 + # source://ruby-lsp/lib/ruby_lsp/server.rb#946 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_signature_help(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1095 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1119 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def type_hierarchy_subtypes(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1086 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1110 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def type_hierarchy_supertypes(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1252 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1275 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def window_show_message_request(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1102 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1126 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def workspace_dependencies(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1006 + # source://ruby-lsp/lib/ruby_lsp/server.rb#997 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def workspace_did_change_watched_files(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1035 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1059 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def workspace_symbol(message); end end @@ -6084,8 +6259,8 @@ end # source://ruby-lsp/lib/ruby_lsp/store.rb#5 class RubyLsp::Store # source://ruby-lsp/lib/ruby_lsp/store.rb#17 - sig { void } - def initialize; end + sig { params(global_state: ::RubyLsp::GlobalState).void } + def initialize(global_state); end # source://ruby-lsp/lib/ruby_lsp/store.rb#118 sig do @@ -6132,7 +6307,7 @@ class RubyLsp::Store # source://ruby-lsp/lib/ruby_lsp/store.rb#11 def features_configuration=(_arg0); end - # source://ruby-lsp/lib/ruby_lsp/store.rb#33 + # source://ruby-lsp/lib/ruby_lsp/store.rb#34 sig { params(uri: ::URI::Generic).returns(RubyLsp::Document[T.untyped]) } def get(uri); end @@ -6150,11 +6325,10 @@ class RubyLsp::Store uri: ::URI::Generic, source: ::String, version: ::Integer, - language_id: ::RubyLsp::Document::LanguageId, - encoding: ::Encoding + language_id: ::RubyLsp::Document::LanguageId ).returns(RubyLsp::Document[T.untyped]) end - def set(uri:, source:, version:, language_id:, encoding: T.unsafe(nil)); end + def set(uri:, source:, version:, language_id:); end end # source://ruby-lsp/lib/ruby_lsp/store.rb#8 @@ -6209,10 +6383,19 @@ class RubyLsp::TypeInferrer private - # source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#142 + # source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#158 sig { params(node: T.any(::Prism::ConstantPathNode, ::Prism::ConstantReadNode)).returns(T.nilable(::String)) } def constant_name(node); end + # source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#118 + sig do + params( + raw_receiver: ::String, + nesting: T::Array[::String] + ).returns(T.nilable(::RubyLsp::TypeInferrer::GuessedType)) + end + def guess_type(raw_receiver, nesting); end + # source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#35 sig do params( @@ -6222,29 +6405,35 @@ class RubyLsp::TypeInferrer end def infer_receiver_for_call_node(node, node_context); end - # source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#150 + # source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#166 sig { params(node_context: ::RubyLsp::NodeContext).returns(T.nilable(::RubyLsp::TypeInferrer::Type)) } def infer_receiver_for_class_variables(node_context); end - # source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#118 + # source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#134 sig { params(node_context: ::RubyLsp::NodeContext).returns(::RubyLsp::TypeInferrer::Type) } def self_receiver_handling(node_context); end end # A type that was guessed based on the receiver raw name # -# source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#182 +# source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#204 class RubyLsp::TypeInferrer::GuessedType < ::RubyLsp::TypeInferrer::Type; end # A known type # -# source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#169 +# source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#185 class RubyLsp::TypeInferrer::Type - # source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#176 + # source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#192 sig { params(name: ::String).void } def initialize(name); end - # source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#173 + # Returns the attached version of this type by removing the `` part from its name + # + # source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#198 + sig { returns(::RubyLsp::TypeInferrer::Type) } + def attached; end + + # source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#189 sig { returns(::String) } def name; end end @@ -6254,8 +6443,6 @@ RubyLsp::VERSION = T.let(T.unsafe(nil), String) # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/uri.rb#5 class URI::Generic - include ::URI - # @return [String, nil] # # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/uri.rb#46 @@ -6277,7 +6464,7 @@ class URI::Source < ::URI::File sig { params(v: T.nilable(::String)).returns(T::Boolean) } def check_host(v); end - # source://tapioca/0.16.5lib/tapioca/helpers/source_uri.rb#55 + # source://tapioca/0.16.8lib/tapioca/helpers/source_uri.rb#55 sig { returns(T.nilable(::String)) } def gem_name; end @@ -6285,7 +6472,7 @@ class URI::Source < ::URI::File sig { returns(T.nilable(::String)) } def gem_version; end - # source://tapioca/0.16.5lib/tapioca/helpers/source_uri.rb#60 + # source://tapioca/0.16.8lib/tapioca/helpers/source_uri.rb#60 sig { returns(T.nilable(::String)) } def line_number; end diff --git a/sorbet/rbi/gems/spoom@1.5.0.rbi b/sorbet/rbi/gems/spoom@1.5.1.rbi similarity index 97% rename from sorbet/rbi/gems/spoom@1.5.0.rbi rename to sorbet/rbi/gems/spoom@1.5.1.rbi index af3a0e1d..55477e34 100644 --- a/sorbet/rbi/gems/spoom@1.5.0.rbi +++ b/sorbet/rbi/gems/spoom@1.5.1.rbi @@ -289,7 +289,7 @@ class Spoom::Cli::Srb::LSP < ::Thor def types(file, line, col); end end -# source://spoom/lib/spoom/cli/srb.rb#12 +# source://spoom/lib/spoom/cli/srb.rb#13 class Spoom::Cli::Srb::Main < ::Thor # source://thor/1.3.2lib/thor.rb#334 def bump(*args); end @@ -302,10 +302,33 @@ class Spoom::Cli::Srb::Main < ::Thor # source://thor/1.3.2lib/thor.rb#334 def lsp(*args); end + # source://thor/1.3.2lib/thor.rb#334 + def sigs(*args); end + # source://thor/1.3.2lib/thor.rb#334 def tc(*args); end end +# source://spoom/lib/spoom/cli/srb/sigs.rb#9 +class Spoom::Cli::Srb::Sigs < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom/lib/spoom/cli/srb/sigs.rb#45 + def collect_files(paths); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://spoom/lib/spoom/cli/srb/sigs.rb#32 + def strip(*paths); end + + # source://spoom/lib/spoom/cli/srb/sigs.rb#64 + def transform_files(files, &block); end + + # source://spoom/lib/spoom/cli/srb/sigs.rb#16 + def translate(*paths); end +end + # source://spoom/lib/spoom/cli/srb/tc.rb#7 class Spoom::Cli::Srb::Tc < ::Thor include ::Spoom::Colorize @@ -1017,7 +1040,7 @@ class Spoom::Coverage::D3::ColorPalette < ::T::Struct prop :strong, ::String class << self - # source://sorbet-runtime/0.5.11635lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11761lib/types/struct.rb#13 def inherited(s); end end end @@ -1357,7 +1380,7 @@ class Spoom::Coverage::Snapshot < ::T::Struct sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) } def from_obj(obj); end - # source://sorbet-runtime/0.5.11635lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11761lib/types/struct.rb#13 def inherited(s); end end end @@ -1493,7 +1516,7 @@ class Spoom::Deadcode::Definition < ::T::Struct def to_json(*args); end class << self - # source://sorbet-runtime/0.5.11635lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11761lib/types/struct.rb#13 def inherited(s); end end end @@ -2381,7 +2404,7 @@ class Spoom::Deadcode::Send < ::T::Struct def each_arg_assoc(&block); end class << self - # source://sorbet-runtime/0.5.11635lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11761lib/types/struct.rb#13 def inherited(s); end end end @@ -2401,7 +2424,7 @@ class Spoom::ExecResult < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11635lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11761lib/types/struct.rb#13 def inherited(s); end end end @@ -2599,7 +2622,7 @@ class Spoom::FileTree::Node < ::T::Struct def path; end class << self - # source://sorbet-runtime/0.5.11635lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11761lib/types/struct.rb#13 def inherited(s); end end end @@ -2665,7 +2688,7 @@ class Spoom::Git::Commit < ::T::Struct def timestamp; end class << self - # source://sorbet-runtime/0.5.11635lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11761lib/types/struct.rb#13 def inherited(s); end # Parse a line formatted as `%h %at` into a `Commit` @@ -2777,7 +2800,7 @@ class Spoom::LSP::Diagnostic < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) } def from_json(json); end - # source://sorbet-runtime/0.5.11635lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11761lib/types/struct.rb#13 def inherited(s); end end end @@ -2810,7 +2833,7 @@ class Spoom::LSP::DocumentSymbol < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) } def from_json(json); end - # source://sorbet-runtime/0.5.11635lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11761lib/types/struct.rb#13 def inherited(s); end end end @@ -2868,7 +2891,7 @@ class Spoom::LSP::Hover < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) } def from_json(json); end - # source://sorbet-runtime/0.5.11635lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11761lib/types/struct.rb#13 def inherited(s); end end end @@ -2893,7 +2916,7 @@ class Spoom::LSP::Location < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) } def from_json(json); end - # source://sorbet-runtime/0.5.11635lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11761lib/types/struct.rb#13 def inherited(s); end end end @@ -2956,7 +2979,7 @@ class Spoom::LSP::Position < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) } def from_json(json); end - # source://sorbet-runtime/0.5.11635lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11761lib/types/struct.rb#13 def inherited(s); end end end @@ -2994,7 +3017,7 @@ class Spoom::LSP::Range < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) } def from_json(json); end - # source://sorbet-runtime/0.5.11635lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11761lib/types/struct.rb#13 def inherited(s); end end end @@ -3060,7 +3083,7 @@ class Spoom::LSP::SignatureHelp < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) } def from_json(json); end - # source://sorbet-runtime/0.5.11635lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11761lib/types/struct.rb#13 def inherited(s); end end end @@ -3486,7 +3509,7 @@ class Spoom::Model::Reference < ::T::Struct sig { params(name: ::String, location: ::Spoom::Location).returns(::Spoom::Model::Reference) } def constant(name, location); end - # source://sorbet-runtime/0.5.11635lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11761lib/types/struct.rb#13 def inherited(s); end # source://spoom/lib/spoom/model/reference.rb#29 @@ -4317,6 +4340,77 @@ Spoom::Sorbet::Sigils::STRICTNESS_TRUE = T.let(T.unsafe(nil), String) # source://spoom/lib/spoom/sorbet/sigils.rb#19 Spoom::Sorbet::Sigils::VALID_STRICTNESS = T.let(T.unsafe(nil), Array) +# source://spoom/lib/spoom/sorbet/sigs.rb#8 +class Spoom::Sorbet::Sigs + class << self + # source://spoom/lib/spoom/sorbet/sigs.rb#25 + sig { params(ruby_contents: ::String).returns(::String) } + def rbi_to_rbs(ruby_contents); end + + # source://spoom/lib/spoom/sorbet/sigs.rb#13 + sig { params(ruby_contents: ::String).returns(::String) } + def strip(ruby_contents); end + + private + + # source://spoom/lib/spoom/sorbet/sigs.rb#48 + sig { params(ruby_contents: ::String).returns(T::Array[[::RBI::Sig, T.any(::RBI::Attr, ::RBI::Method)]]) } + def collect_sigs(ruby_contents); end + end +end + +# From https://github.com/Shopify/ruby-lsp/blob/9154bfc6ef/lib/ruby_lsp/document.rb#L127 +# +# source://spoom/lib/spoom/sorbet/sigs.rb#145 +class Spoom::Sorbet::Sigs::Scanner + # source://spoom/lib/spoom/sorbet/sigs.rb#151 + sig { params(source: ::String).void } + def initialize(source); end + + # Finds the character index inside the source string for a given line and column + # + # source://spoom/lib/spoom/sorbet/sigs.rb#159 + sig { params(line: ::Integer, character: ::Integer).returns(::Integer) } + def find_char_position(line, character); end +end + +# source://spoom/lib/spoom/sorbet/sigs.rb#148 +Spoom::Sorbet::Sigs::Scanner::LINE_BREAK = T.let(T.unsafe(nil), Integer) + +# source://spoom/lib/spoom/sorbet/sigs.rb#83 +class Spoom::Sorbet::Sigs::SigTranslator + class << self + # source://spoom/lib/spoom/sorbet/sigs.rb#88 + sig { params(sig: ::RBI::Sig, node: T.any(::RBI::Attr, ::RBI::Method)).returns(::String) } + def translate(sig, node); end + + private + + # source://spoom/lib/spoom/sorbet/sigs.rb#135 + sig { params(sig: ::RBI::Sig, node: ::RBI::Attr).returns(::String) } + def translate_attr_sig(sig, node); end + + # source://spoom/lib/spoom/sorbet/sigs.rb#100 + sig { params(sig: ::RBI::Sig, node: ::RBI::Method).returns(::String) } + def translate_method_sig(sig, node); end + end +end + +# source://spoom/lib/spoom/sorbet/sigs.rb#56 +class Spoom::Sorbet::Sigs::SigsLocator < ::RBI::Visitor + # source://spoom/lib/spoom/sorbet/sigs.rb#63 + sig { void } + def initialize; end + + # source://spoom/lib/spoom/sorbet/sigs.rb#60 + sig { returns(T::Array[[::RBI::Sig, T.any(::RBI::Attr, ::RBI::Method)]]) } + def sigs; end + + # source://spoom/lib/spoom/sorbet/sigs.rb#69 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + # source://spoom/lib/spoom/timeline.rb#5 class Spoom::Timeline # source://spoom/lib/spoom/timeline.rb#9 diff --git a/sorbet/rbi/gems/tapioca@0.16.5.rbi b/sorbet/rbi/gems/tapioca@0.16.8.rbi similarity index 95% rename from sorbet/rbi/gems/tapioca@0.16.5.rbi rename to sorbet/rbi/gems/tapioca@0.16.8.rbi index 663b4c75..5e1e4573 100644 --- a/sorbet/rbi/gems/tapioca@0.16.5.rbi +++ b/sorbet/rbi/gems/tapioca@0.16.8.rbi @@ -55,7 +55,7 @@ module RBI; end # source://tapioca/lib/tapioca/rbi_ext/model.rb#5 class RBI::Tree < ::RBI::NodeWithComments - # source://rbi/0.2.2lib/rbi/model.rb#121 + # source://rbi/0.2.3lib/rbi/model.rb#121 sig do params( loc: T.nilable(::RBI::Loc), @@ -65,15 +65,15 @@ class RBI::Tree < ::RBI::NodeWithComments end def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi/0.2.2lib/rbi/model.rb#128 + # source://rbi/0.2.3lib/rbi/model.rb#128 sig { params(node: ::RBI::Node).void } def <<(node); end - # source://rbi/0.2.2lib/rbi/rewriters/add_sig_templates.rb#66 + # source://rbi/0.2.3lib/rbi/rewriters/add_sig_templates.rb#66 sig { params(with_todo_comment: T::Boolean).void } def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end - # source://rbi/0.2.2lib/rbi/rewriters/annotate.rb#49 + # source://rbi/0.2.3lib/rbi/rewriters/annotate.rb#49 sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end @@ -138,35 +138,35 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end - # source://rbi/0.2.2lib/rbi/rewriters/deannotate.rb#41 + # source://rbi/0.2.3lib/rbi/rewriters/deannotate.rb#41 sig { params(annotation: ::String).void } def deannotate!(annotation); end - # source://rbi/0.2.2lib/rbi/model.rb#134 + # source://rbi/0.2.3lib/rbi/model.rb#134 sig { returns(T::Boolean) } def empty?; end - # source://rbi/0.2.2lib/rbi/rewriters/filter_versions.rb#118 + # source://rbi/0.2.3lib/rbi/rewriters/filter_versions.rb#118 sig { params(version: ::Gem::Version).void } def filter_versions!(version); end - # source://rbi/0.2.2lib/rbi/rewriters/flatten_singleton_methods.rb#60 + # source://rbi/0.2.3lib/rbi/rewriters/flatten_singleton_methods.rb#60 sig { void } def flatten_singleton_methods!; end - # source://rbi/0.2.2lib/rbi/rewriters/flatten_visibilities.rb#60 + # source://rbi/0.2.3lib/rbi/rewriters/flatten_visibilities.rb#60 sig { void } def flatten_visibilities!; end - # source://rbi/0.2.2lib/rbi/rewriters/group_nodes.rb#81 + # source://rbi/0.2.3lib/rbi/rewriters/group_nodes.rb#81 sig { void } def group_nodes!; end - # source://rbi/0.2.2lib/rbi/index.rb#68 + # source://rbi/0.2.3lib/rbi/index.rb#68 sig { returns(::RBI::Index) } def index; end - # source://rbi/0.2.2lib/rbi/rewriters/merge_trees.rb#324 + # source://rbi/0.2.3lib/rbi/rewriters/merge_trees.rb#324 sig do params( other: ::RBI::Tree, @@ -177,27 +177,27 @@ class RBI::Tree < ::RBI::NodeWithComments end def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - # source://rbi/0.2.2lib/rbi/rewriters/nest_non_public_members.rb#46 + # source://rbi/0.2.3lib/rbi/rewriters/nest_non_public_members.rb#46 sig { void } def nest_non_public_members!; end - # source://rbi/0.2.2lib/rbi/rewriters/nest_singleton_methods.rb#36 + # source://rbi/0.2.3lib/rbi/rewriters/nest_singleton_methods.rb#36 sig { void } def nest_singleton_methods!; end - # source://rbi/0.2.2lib/rbi/rewriters/nest_top_level_members.rb#63 + # source://rbi/0.2.3lib/rbi/rewriters/nest_top_level_members.rb#63 sig { void } def nest_top_level_members!; end - # source://rbi/0.2.2lib/rbi/model.rb#112 + # source://rbi/0.2.3lib/rbi/model.rb#112 sig { returns(T::Array[::RBI::Node]) } def nodes; end - # source://rbi/0.2.2lib/rbi/rewriters/attr_to_methods.rb#53 + # source://rbi/0.2.3lib/rbi/rewriters/attr_to_methods.rb#53 sig { void } def replace_attributes_with_methods!; end - # source://rbi/0.2.2lib/rbi/rewriters/sort_nodes.rb#119 + # source://rbi/0.2.3lib/rbi/rewriters/sort_nodes.rb#119 sig { void } def sort_nodes!; end @@ -218,7 +218,7 @@ class RBI::TypedParam < ::T::Struct const :type, ::String class << self - # source://sorbet-runtime/0.5.11635lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11761lib/types/struct.rb#13 def inherited(s); end end end @@ -453,13 +453,13 @@ class Tapioca::Cli < ::Thor include ::Tapioca::ConfigHelper include ::Tapioca::EnvHelper - # source://tapioca/lib/tapioca/cli.rb#371 + # source://tapioca/lib/tapioca/cli.rb#377 def __print_version; end - # source://tapioca/lib/tapioca/cli.rb#353 + # source://tapioca/lib/tapioca/cli.rb#359 def annotations; end - # source://tapioca/lib/tapioca/cli.rb#325 + # source://tapioca/lib/tapioca/cli.rb#331 def check_shims; end # source://tapioca/lib/tapioca/cli.rb#46 @@ -470,7 +470,7 @@ class Tapioca::Cli < ::Thor # @raise [MalformattedArgumentError] # - # source://tapioca/lib/tapioca/cli.rb#269 + # source://tapioca/lib/tapioca/cli.rb#274 def gem(*gems); end # source://tapioca/lib/tapioca/cli.rb#27 @@ -484,11 +484,11 @@ class Tapioca::Cli < ::Thor private - # source://tapioca/lib/tapioca/cli.rb#385 + # source://tapioca/lib/tapioca/cli.rb#391 def print_init_next_steps; end class << self - # source://tapioca/lib/tapioca/cli.rb#377 + # source://tapioca/lib/tapioca/cli.rb#383 def exit_on_failure?; end end end @@ -556,11 +556,11 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke sig { returns(T::Array[::String]) } def all_requested_constants; end - # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#304 + # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#306 sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } def build_error_for_files(cause, files); end - # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#228 + # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#230 sig do params( constant_name: ::String, @@ -571,31 +571,31 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke end def compile_dsl_rbi(constant_name, rbi, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end - # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#163 + # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#165 sig { params(constant_names: T::Array[::String], ignore_missing: T::Boolean).returns(T::Array[::Module]) } def constantize(constant_names, ignore_missing: T.unsafe(nil)); end - # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#188 + # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#190 sig { params(compiler_names: T::Array[::String]).returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } def constantize_compilers(compiler_names); end - # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#364 + # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#366 sig { returns(T::Array[::String]) } def constants_from_requested_paths; end - # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#131 + # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#133 sig { returns(::Tapioca::Dsl::Pipeline) } def create_pipeline; end - # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#267 + # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#269 sig { params(constant_name: ::String).returns(::Pathname) } def dsl_rbi_filename(constant_name); end - # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#149 + # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#151 sig { params(requested_constants: T::Array[::String], path: ::Pathname).returns(T::Set[::Pathname]) } def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end - # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#359 + # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#361 sig { params(constant: ::String).returns(::String) } def generate_command_for(constant); end @@ -607,7 +607,7 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke sig { void } def load_application; end - # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#246 + # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#248 sig { params(dir: ::Pathname).void } def perform_dsl_verification(dir); end @@ -615,31 +615,31 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke sig { returns(::Tapioca::Dsl::Pipeline) } def pipeline; end - # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#255 + # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#257 sig { params(files: T::Set[::Pathname]).void } def purge_stale_dsl_rbi_files(files); end - # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#354 + # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#356 sig { params(constant: ::String).returns(::String) } def rbi_filename_for(constant); end - # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#335 + # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#337 sig { params(path: ::Pathname).returns(T::Array[::Pathname]) } def rbi_files_in(path); end - # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#313 + # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#315 sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } def report_diff_and_exit_if_out_of_date(diff, command); end - # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#208 + # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#210 sig { params(name: ::String).returns(T.nilable(T.class_of(Tapioca::Dsl::Compiler))) } def resolve(name); end - # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#342 + # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#344 sig { params(class_name: ::String).returns(::String) } def underscore(class_name); end - # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#272 + # source://tapioca/lib/tapioca/commands/abstract_dsl.rb#274 sig { params(tmp_dir: ::Pathname).returns(T::Hash[::String, ::Symbol]) } def verify_dsl_rbi(tmp_dir:); end end @@ -653,7 +653,7 @@ class Tapioca::Commands::AbstractGem < ::Tapioca::Commands::Command abstract! - # source://tapioca/lib/tapioca/commands/abstract_gem.rb#32 + # source://tapioca/lib/tapioca/commands/abstract_gem.rb#33 sig do params( gem_names: T::Array[::String], @@ -671,83 +671,71 @@ class Tapioca::Commands::AbstractGem < ::Tapioca::Commands::Command auto_strictness: T::Boolean, dsl_dir: ::String, rbi_formatter: ::Tapioca::RBIFormatter, - halt_upon_load_error: T::Boolean + halt_upon_load_error: T::Boolean, + lsp_addon: T.nilable(T::Boolean) ).void end - def initialize(gem_names:, exclude:, include_dependencies:, prerequire:, postrequire:, typed_overrides:, outpath:, file_header:, include_doc:, include_loc:, include_exported_rbis:, number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), dsl_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end + def initialize(gem_names:, exclude:, include_dependencies:, prerequire:, postrequire:, typed_overrides:, outpath:, file_header:, include_doc:, include_loc:, include_exported_rbis:, number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), dsl_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil), lsp_addon: T.unsafe(nil)); end private - # source://tapioca/lib/tapioca/commands/abstract_gem.rb#230 + # source://tapioca/lib/tapioca/commands/abstract_gem.rb#200 sig { returns(T::Array[::String]) } def added_rbis; end - # source://tapioca/lib/tapioca/commands/abstract_gem.rb#291 + # source://tapioca/lib/tapioca/commands/abstract_gem.rb#261 sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } def build_error_for_files(cause, files); end - # source://tapioca/lib/tapioca/commands/abstract_gem.rb#110 + # source://tapioca/lib/tapioca/commands/abstract_gem.rb#80 sig { params(gem: ::Tapioca::Gemfile::GemSpec).void } def compile_gem_rbi(gem); end - # source://tapioca/lib/tapioca/commands/abstract_gem.rb#225 + # source://tapioca/lib/tapioca/commands/abstract_gem.rb#195 sig { params(gem_name: ::String).returns(::Pathname) } def existing_rbi(gem_name); end - # source://tapioca/lib/tapioca/commands/abstract_gem.rb#273 + # source://tapioca/lib/tapioca/commands/abstract_gem.rb#243 sig { returns(T::Hash[::String, ::String]) } def existing_rbis; end - # source://tapioca/lib/tapioca/commands/abstract_gem.rb#237 + # source://tapioca/lib/tapioca/commands/abstract_gem.rb#207 sig { params(gem_name: ::String).returns(::Pathname) } def expected_rbi(gem_name); end - # source://tapioca/lib/tapioca/commands/abstract_gem.rb#279 + # source://tapioca/lib/tapioca/commands/abstract_gem.rb#249 sig { returns(T::Hash[::String, ::String]) } def expected_rbis; end - # source://tapioca/lib/tapioca/commands/abstract_gem.rb#98 - sig do - params( - gem: ::Tapioca::Gemfile::GemSpec, - dependencies: T::Array[::Tapioca::Gemfile::GemSpec] - ).returns(T::Array[::Tapioca::Gemfile::GemSpec]) - end - def gem_dependencies(gem, dependencies = T.unsafe(nil)); end - - # source://tapioca/lib/tapioca/commands/abstract_gem.rb#242 + # source://tapioca/lib/tapioca/commands/abstract_gem.rb#212 sig { params(gem_name: ::String).returns(T::Boolean) } def gem_rbi_exists?(gem_name); end - # source://tapioca/lib/tapioca/commands/abstract_gem.rb#286 + # source://tapioca/lib/tapioca/commands/abstract_gem.rb#256 sig { params(gem_name: ::String, version: ::String).returns(::Pathname) } def gem_rbi_filename(gem_name, version); end - # source://tapioca/lib/tapioca/commands/abstract_gem.rb#77 - sig { params(gem_names: T::Array[::String]).returns(T::Array[::Tapioca::Gemfile::GemSpec]) } - def gems_to_generate(gem_names); end - - # source://tapioca/lib/tapioca/commands/abstract_gem.rb#296 + # source://tapioca/lib/tapioca/commands/abstract_gem.rb#266 sig { params(gem: ::Tapioca::Gemfile::GemSpec, file: ::RBI::File).void } def merge_with_exported_rbi(gem, file); end - # source://tapioca/lib/tapioca/commands/abstract_gem.rb#267 + # source://tapioca/lib/tapioca/commands/abstract_gem.rb#237 sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void } def move(old_filename, new_filename); end - # source://tapioca/lib/tapioca/commands/abstract_gem.rb#177 + # source://tapioca/lib/tapioca/commands/abstract_gem.rb#147 sig { void } def perform_additions; end - # source://tapioca/lib/tapioca/commands/abstract_gem.rb#150 + # source://tapioca/lib/tapioca/commands/abstract_gem.rb#120 sig { void } def perform_removals; end - # source://tapioca/lib/tapioca/commands/abstract_gem.rb#220 + # source://tapioca/lib/tapioca/commands/abstract_gem.rb#190 sig { returns(T::Array[::String]) } def removed_rbis; end - # source://tapioca/lib/tapioca/commands/abstract_gem.rb#247 + # source://tapioca/lib/tapioca/commands/abstract_gem.rb#217 sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } def report_diff_and_exit_if_out_of_date(diff, command); end end @@ -1005,6 +993,19 @@ class Tapioca::Commands::GemGenerate < ::Tapioca::Commands::AbstractGem # source://tapioca/lib/tapioca/commands/gem_generate.rb#10 sig { override.void } def execute; end + + # source://tapioca/lib/tapioca/commands/gem_generate.rb#74 + sig do + params( + gem: ::Tapioca::Gemfile::GemSpec, + dependencies: T::Array[::Tapioca::Gemfile::GemSpec] + ).returns(T::Array[::Tapioca::Gemfile::GemSpec]) + end + def gem_dependencies(gem, dependencies = T.unsafe(nil)); end + + # source://tapioca/lib/tapioca/commands/gem_generate.rb#51 + sig { params(gem_names: T::Array[::String]).returns(T::Array[::Tapioca::Gemfile::GemSpec]) } + def gems_to_generate(gem_names); end end # source://tapioca/lib/tapioca/commands/gem_sync.rb#6 @@ -1142,7 +1143,7 @@ class Tapioca::ConfigHelper::ConfigError < ::T::Struct const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] class << self - # source://sorbet-runtime/0.5.11635lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11761lib/types/struct.rb#13 def inherited(s); end end end @@ -1153,7 +1154,7 @@ class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct const :colors, T::Array[::Symbol] class << self - # source://sorbet-runtime/0.5.11635lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11761lib/types/struct.rb#13 def inherited(s); end end end @@ -2227,7 +2228,7 @@ class Tapioca::GemInfo < ::T::Struct sig { params(spec: ::Bundler::LazySpecification).returns(::Tapioca::GemInfo) } def from_spec(spec); end - # source://sorbet-runtime/0.5.11635lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11761lib/types/struct.rb#13 def inherited(s); end end end @@ -2260,7 +2261,7 @@ class Tapioca::Gemfile private - # source://tapioca/lib/tapioca/gemfile.rb#92 + # source://tapioca/lib/tapioca/gemfile.rb#101 sig { returns(::String) } def dir; end @@ -2268,7 +2269,7 @@ class Tapioca::Gemfile sig { returns(::File) } def gemfile; end - # source://tapioca/lib/tapioca/gemfile.rb#87 + # source://tapioca/lib/tapioca/gemfile.rb#96 sig { returns(T::Array[::Symbol]) } def groups; end @@ -2285,114 +2286,114 @@ class Tapioca::Gemfile sig { returns([T::Enumerable[T.any(::Bundler::StubSpecification, ::Gem::Specification)], T::Array[::String]]) } def materialize_deps; end - # source://tapioca/lib/tapioca/gemfile.rb#82 + # source://tapioca/lib/tapioca/gemfile.rb#91 sig { returns(::Bundler::Runtime) } def runtime; end end -# source://tapioca/lib/tapioca/gemfile.rb#96 +# source://tapioca/lib/tapioca/gemfile.rb#105 class Tapioca::Gemfile::GemSpec include ::Tapioca::GemHelper - # source://tapioca/lib/tapioca/gemfile.rb#136 + # source://tapioca/lib/tapioca/gemfile.rb#145 sig { params(spec: T.any(::Bundler::StubSpecification, ::Gem::Specification)).void } def initialize(spec); end - # source://tapioca/lib/tapioca/gemfile.rb#146 + # source://tapioca/lib/tapioca/gemfile.rb#155 sig { params(other: ::BasicObject).returns(T::Boolean) } def ==(other); end - # source://tapioca/lib/tapioca/gemfile.rb#171 + # source://tapioca/lib/tapioca/gemfile.rb#180 sig { params(path: ::String).returns(T::Boolean) } def contains_path?(path); end - # source://tapioca/lib/tapioca/gemfile.rb#161 + # source://tapioca/lib/tapioca/gemfile.rb#170 sig { returns(T::Array[::Gem::Dependency]) } def dependencies; end - # source://tapioca/lib/tapioca/gemfile.rb#201 + # source://tapioca/lib/tapioca/gemfile.rb#210 sig { returns(T::Boolean) } def export_rbi_files?; end - # source://tapioca/lib/tapioca/gemfile.rb#196 + # source://tapioca/lib/tapioca/gemfile.rb#205 sig { returns(T::Array[::String]) } def exported_rbi_files; end - # source://tapioca/lib/tapioca/gemfile.rb#206 + # source://tapioca/lib/tapioca/gemfile.rb#215 sig { returns(::RBI::MergeTree) } def exported_rbi_tree; end - # source://tapioca/lib/tapioca/gemfile.rb#133 + # source://tapioca/lib/tapioca/gemfile.rb#142 sig { returns(T::Array[::Pathname]) } def files; end - # source://tapioca/lib/tapioca/gemfile.rb#130 + # source://tapioca/lib/tapioca/gemfile.rb#139 sig { returns(::String) } def full_gem_path; end - # source://tapioca/lib/tapioca/gemfile.rb#151 + # source://tapioca/lib/tapioca/gemfile.rb#160 sig { params(gemfile_dir: ::String).returns(T::Boolean) } def ignore?(gemfile_dir); end - # source://tapioca/lib/tapioca/gemfile.rb#156 + # source://tapioca/lib/tapioca/gemfile.rb#165 sig { returns(::String) } def name; end - # source://tapioca/lib/tapioca/gemfile.rb#180 + # source://tapioca/lib/tapioca/gemfile.rb#189 sig { void } def parse_yard_docs; end - # source://tapioca/lib/tapioca/gemfile.rb#166 + # source://tapioca/lib/tapioca/gemfile.rb#175 sig { returns(::String) } def rbi_file_name; end - # source://tapioca/lib/tapioca/gemfile.rb#218 + # source://tapioca/lib/tapioca/gemfile.rb#227 sig { params(file: ::Pathname).returns(::Pathname) } def relative_path_for(file); end # @return [String] # - # source://tapioca/lib/tapioca/gemfile.rb#130 + # source://tapioca/lib/tapioca/gemfile.rb#139 def version; end private - # source://tapioca/lib/tapioca/gemfile.rb#229 + # source://tapioca/lib/tapioca/gemfile.rb#238 sig { returns(T::Array[::Pathname]) } def collect_files; end - # source://tapioca/lib/tapioca/gemfile.rb#244 + # source://tapioca/lib/tapioca/gemfile.rb#253 sig { returns(T.nilable(T::Boolean)) } def default_gem?; end - # source://tapioca/lib/tapioca/gemfile.rb#303 + # source://tapioca/lib/tapioca/gemfile.rb#312 sig { returns(T::Boolean) } def gem_ignored?; end - # source://tapioca/lib/tapioca/gemfile.rb#282 + # source://tapioca/lib/tapioca/gemfile.rb#291 sig { params(path: ::String).returns(T::Boolean) } def has_parent_gemspec?(path); end - # source://tapioca/lib/tapioca/gemfile.rb#249 + # source://tapioca/lib/tapioca/gemfile.rb#258 sig { returns(::Regexp) } def require_paths_prefix_matcher; end - # source://tapioca/lib/tapioca/gemfile.rb#261 + # source://tapioca/lib/tapioca/gemfile.rb#270 sig { params(file: ::String).returns(::Pathname) } def resolve_to_ruby_lib_dir(file); end - # source://tapioca/lib/tapioca/gemfile.rb#275 + # source://tapioca/lib/tapioca/gemfile.rb#284 sig { returns(::String) } def version_string; end class << self - # source://tapioca/lib/tapioca/gemfile.rb#104 + # source://tapioca/lib/tapioca/gemfile.rb#113 sig { returns(T::Hash[::String, ::Tapioca::Gemfile::GemSpec]) } def spec_lookup_by_file_path; end end end -# source://tapioca/lib/tapioca/gemfile.rb#116 +# source://tapioca/lib/tapioca/gemfile.rb#125 Tapioca::Gemfile::GemSpec::IGNORED_GEMS = T.let(T.unsafe(nil), Array) # source://tapioca/lib/tapioca/gemfile.rb#10 @@ -2406,7 +2407,7 @@ module Tapioca::Loaders; end # source://tapioca/lib/tapioca/loaders/dsl.rb#6 class Tapioca::Loaders::Dsl < ::Tapioca::Loaders::Loader - # source://tapioca/lib/tapioca/loaders/dsl.rb#60 + # source://tapioca/lib/tapioca/loaders/dsl.rb#53 sig do params( tapioca_path: ::String, @@ -2417,40 +2418,39 @@ class Tapioca::Loaders::Dsl < ::Tapioca::Loaders::Loader end def initialize(tapioca_path:, eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end - # source://tapioca/lib/tapioca/loaders/dsl.rb#43 + # source://tapioca/lib/tapioca/loaders/dsl.rb#36 sig { override.void } def load; end - # source://tapioca/lib/tapioca/loaders/dsl.rb#50 + # source://tapioca/lib/tapioca/loaders/dsl.rb#43 sig { void } def load_dsl_extensions_and_compilers; end protected - # source://tapioca/lib/tapioca/loaders/dsl.rb#105 + # source://tapioca/lib/tapioca/loaders/dsl.rb#103 sig { void } def load_application; end - # source://tapioca/lib/tapioca/loaders/dsl.rb#85 + # source://tapioca/lib/tapioca/loaders/dsl.rb#78 sig { void } def load_dsl_compilers; end - # source://tapioca/lib/tapioca/loaders/dsl.rb#70 + # source://tapioca/lib/tapioca/loaders/dsl.rb#63 sig { void } def load_dsl_extensions; end class << self - # source://tapioca/lib/tapioca/loaders/dsl.rb#21 + # source://tapioca/lib/tapioca/loaders/dsl.rb#20 sig do params( tapioca_path: ::String, eager_load: T::Boolean, app_root: ::String, - halt_upon_load_error: T::Boolean, - lsp_addon: T::Boolean + halt_upon_load_error: T::Boolean ).void end - def load_application(tapioca_path:, eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil), lsp_addon: T.unsafe(nil)); end + def load_application(tapioca_path:, eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end end end @@ -3559,7 +3559,7 @@ Tapioca::VERSION = T.let(T.unsafe(nil), String) # source://tapioca/lib/tapioca/helpers/source_uri.rb#7 class URI::Source < ::URI::File - # source://ruby-lsp/0.23.0lib/ruby_lsp/requests/support/source_uri.rb#69 + # source://ruby-lsp/0.23.6lib/ruby_lsp/requests/support/source_uri.rb#69 sig { params(v: T.nilable(::String)).returns(T::Boolean) } def check_host(v); end @@ -3567,7 +3567,7 @@ class URI::Source < ::URI::File sig { returns(T.nilable(::String)) } def gem_name; end - # source://ruby-lsp/0.23.0lib/ruby_lsp/requests/support/source_uri.rb#33 + # source://ruby-lsp/0.23.6lib/ruby_lsp/requests/support/source_uri.rb#33 sig { returns(T.nilable(::String)) } def gem_version; end @@ -3575,16 +3575,16 @@ class URI::Source < ::URI::File sig { returns(T.nilable(::String)) } def line_number; end - # source://ruby-lsp/0.23.0lib/ruby_lsp/requests/support/source_uri.rb#59 + # source://ruby-lsp/0.23.6lib/ruby_lsp/requests/support/source_uri.rb#59 sig { params(v: T.nilable(::String)).void } def set_path(v); end - # source://ruby-lsp/0.23.0lib/ruby_lsp/requests/support/source_uri.rb#81 + # source://ruby-lsp/0.23.6lib/ruby_lsp/requests/support/source_uri.rb#81 sig { returns(::String) } def to_s; end class << self - # source://ruby-lsp/0.23.0lib/ruby_lsp/requests/support/source_uri.rb#46 + # source://ruby-lsp/0.23.6lib/ruby_lsp/requests/support/source_uri.rb#46 sig do params( gem_name: ::String,