sord 5.1.0 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/sord/resolver.rb +14 -5
- data/lib/sord/version.rb +1 -1
- data/sord.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54bd59da2188e5392c6946e2cbd77ce55e1113abc40a2cf880671afe3c22efac
|
4
|
+
data.tar.gz: 9671e16277cba3b800d8dc4dcae525384064efd1138575eef441719624ebf45d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9c0ca7bc3d427367fe069cc415e37a0250ad7c3010ebbfa119dbdd97f98b474da0a7092277f2f45810d376654545b930b3c59a7a537f4132a23ad68352f913d
|
7
|
+
data.tar.gz: 8b6ced8d20985ee9faaae5b672ebd90bd4ef00d396938e7db1e6fecf350d817b143db55eca1231782bf2c0bd5605394eac825d8fa612ff7e093fc0f3ce27e14c
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
|
|
3
3
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
5
5
|
|
6
|
+
## [6.0.0] - 2023-05-02
|
7
|
+
### Changed
|
8
|
+
- **Breaking change**: Now targets RBS 3.0
|
9
|
+
|
6
10
|
## [5.1.0] - 2023-05-22
|
7
11
|
### Added
|
8
12
|
- Add support for a single `@overload` tag, typically used to describe methods defined outside of
|
data/lib/sord/resolver.rb
CHANGED
@@ -22,13 +22,13 @@ module Sord
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def self.load_gem_objects(hash)
|
25
|
-
|
25
|
+
env = RBS::Environment.new
|
26
26
|
begin
|
27
|
-
RBS::CLI::LibraryOptions.new.loader.load(env:
|
27
|
+
RBS::CLI::LibraryOptions.new.loader.load(env: env)
|
28
28
|
rescue RBS::Collection::Config::CollectionNotAvailable
|
29
29
|
Sord::Logging.warn("Could not load RBS collection - run rbs collection install for dependencies")
|
30
30
|
end
|
31
|
-
add_rbs_objects_to_paths(
|
31
|
+
add_rbs_objects_to_paths(env, hash)
|
32
32
|
|
33
33
|
gem_paths = Bundler.load.specs.map(&:full_gem_path)
|
34
34
|
gem_paths.each do |path|
|
@@ -41,13 +41,22 @@ module Sord
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
-
def self.add_rbs_objects_to_paths(
|
44
|
+
def self.add_rbs_objects_to_paths(env, names_to_paths, path=[])
|
45
|
+
case env
|
46
|
+
when RBS::Environment
|
47
|
+
declarations = env.declarations
|
48
|
+
when Array
|
49
|
+
declarations = env
|
50
|
+
else
|
51
|
+
raise TypeError, "env"
|
52
|
+
end
|
53
|
+
|
45
54
|
klasses = [
|
46
55
|
RBS::AST::Declarations::Module,
|
47
56
|
RBS::AST::Declarations::Class,
|
48
57
|
RBS::AST::Declarations::Constant
|
49
58
|
]
|
50
|
-
|
59
|
+
declarations.each do |decl|
|
51
60
|
next unless klasses.include?(decl.class)
|
52
61
|
name = decl.name.to_s
|
53
62
|
new_path = path + [name]
|
data/lib/sord/version.rb
CHANGED
data/sord.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.add_dependency 'sorbet-runtime'
|
27
27
|
spec.add_dependency 'commander', '~> 4.5'
|
28
28
|
spec.add_dependency 'parlour', '~> 5.0'
|
29
|
-
spec.add_dependency 'rbs', '~>
|
29
|
+
spec.add_dependency 'rbs', '~> 3.0'
|
30
30
|
|
31
31
|
spec.add_development_dependency "bundler", "~> 2.0"
|
32
32
|
spec.add_development_dependency "rake", "~> 13.0"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Christiansen
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '3.0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '3.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: bundler
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|