Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: Update rbs to 3.0 #662

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/solargraph/rbs_map/conversions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def convert_decl_to_pin decl, closure
when RBS::AST::Declarations::Interface
# STDERR.puts "Skipping interface #{decl.name.relative!}"
interface_decl_to_pin decl
when RBS::AST::Declarations::Alias
when RBS::AST::Declarations::TypeAlias
type_aliases[decl.name.to_s] = decl
when RBS::AST::Declarations::Module
module_decl_to_pin decl
Expand Down Expand Up @@ -222,12 +222,12 @@ def method_def_to_pin decl, closure
# @param decl [RBS::AST::Members::MethodDefinition]
# @param pin [Pin::Method]
def method_def_to_sigs decl, pin
decl.types.map do |type|
parameters, return_type = parts_of_function(type, pin)
block = if type.block
Pin::Signature.new(*parts_of_function(type.block, pin))
decl.overloads.map do |overload|
parameters, return_type = parts_of_function(overload.method_type, pin)
block = if overload.method_type.block
Pin::Signature.new(*parts_of_function(overload.method_type.block, pin))
end
return_type = ComplexType.try_parse(method_type_to_tag(type))
return_type = ComplexType.try_parse(method_type_to_tag(overload.method_type))
Pin::Signature.new(parameters, return_type, block)
end
end
Expand Down
2 changes: 1 addition & 1 deletion solargraph.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'kramdown', '~> 2.3'
s.add_runtime_dependency 'kramdown-parser-gfm', '~> 1.1'
s.add_runtime_dependency 'parser', '~> 3.0'
s.add_runtime_dependency 'rbs', '~> 2.0'
s.add_runtime_dependency 'rbs', '~> 3.0'
s.add_runtime_dependency 'reverse_markdown', '~> 2.0'
s.add_runtime_dependency 'rubocop', '~> 1.38'
s.add_runtime_dependency 'thor', '~> 1.0'
Expand Down
4 changes: 2 additions & 2 deletions spec/rbs_map/stdlib_map_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe Solargraph::RbsMap::StdlibMap do
it "finds stdlib require paths" do
rbs_map = Solargraph::RbsMap::StdlibMap.load('set')
pin = rbs_map.path_pin('Set#add')
rbs_map = Solargraph::RbsMap::StdlibMap.load('fileutils')
pin = rbs_map.path_pin('FileUtils#chdir')
expect(pin).to be
end

Expand Down