steep 1.6.0.pre.3 → 1.6.0.pre.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +2 -2
- data/lib/steep/server/master.rb +33 -22
- data/lib/steep/version.rb +1 -1
- data/sig/steep/server/master.rbs +22 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d612ef62eb6e7c7e280b918e6cf1bfbcaac06346f4a49b18f61db5cc277798d
|
4
|
+
data.tar.gz: 04c2542f6fc1b05f6c1a36ac470b85d90cbe9a1af5eb82bda37be5a41cc93b14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48bc0af1c2ad26831d11588e2224eb6b45fe71f45faa3d030475402260e6f693b8a528d6831e2619b68e76359264a1d8445c8902efe6aaefc2adfe3c8fc8513c
|
7
|
+
data.tar.gz: c61112bbc9cc29bf805fe12cc4b21352e7603252538440952e63af19888f34219131e38726b181238c052c09b479d3a1e4d2c23adf4d70e1f004ed207dccb796
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
steep (1.6.0.pre.
|
4
|
+
steep (1.6.0.pre.4)
|
5
5
|
activesupport (>= 5.1)
|
6
6
|
concurrent-ruby (>= 1.1.10)
|
7
7
|
csv (>= 3.0.9)
|
@@ -66,7 +66,7 @@ GEM
|
|
66
66
|
racc
|
67
67
|
psych (5.1.0)
|
68
68
|
stringio
|
69
|
-
racc (1.7.
|
69
|
+
racc (1.7.2)
|
70
70
|
rainbow (3.1.1)
|
71
71
|
rake (13.1.0)
|
72
72
|
rb-fsevent (0.11.2)
|
data/lib/steep/server/master.rb
CHANGED
@@ -115,18 +115,25 @@ module Steep
|
|
115
115
|
code_paths.include?(path)
|
116
116
|
end
|
117
117
|
|
118
|
-
def add(path)
|
119
|
-
return if
|
118
|
+
def add(path, library: false)
|
119
|
+
return true if signature_path?(path) || code_path?(path) || library_path?(path)
|
120
120
|
|
121
|
-
|
122
|
-
|
123
|
-
case
|
124
|
-
when target.source_pattern =~ relative_path
|
125
|
-
code_paths << path
|
126
|
-
when target.signature_pattern =~ relative_path
|
127
|
-
signature_paths << path
|
128
|
-
else
|
121
|
+
if library
|
129
122
|
library_paths << path
|
123
|
+
true
|
124
|
+
else
|
125
|
+
relative_path = project.relative_path(path)
|
126
|
+
|
127
|
+
case
|
128
|
+
when target.source_pattern =~ relative_path
|
129
|
+
code_paths << path
|
130
|
+
true
|
131
|
+
when target.signature_pattern =~ relative_path
|
132
|
+
signature_paths << path
|
133
|
+
true
|
134
|
+
else
|
135
|
+
false
|
136
|
+
end
|
130
137
|
end
|
131
138
|
end
|
132
139
|
|
@@ -645,20 +652,22 @@ module Steep
|
|
645
652
|
|
646
653
|
path = PathHelper.to_pathname(uri) or next
|
647
654
|
|
648
|
-
controller.
|
655
|
+
unless controller.priority_paths.include?(path)
|
656
|
+
controller.push_changes(path)
|
649
657
|
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
658
|
+
case type
|
659
|
+
when 1, 2
|
660
|
+
content = path.read
|
661
|
+
when 4
|
662
|
+
# Deleted
|
663
|
+
content = ""
|
664
|
+
end
|
657
665
|
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
666
|
+
broadcast_notification({
|
667
|
+
method: "$/file/reset",
|
668
|
+
params: { uri: uri, content: content }
|
669
|
+
})
|
670
|
+
end
|
662
671
|
end
|
663
672
|
|
664
673
|
if typecheck_automatically
|
@@ -683,6 +692,8 @@ module Steep
|
|
683
692
|
start_type_checking_queue.execute do
|
684
693
|
job_queue.push(
|
685
694
|
-> do
|
695
|
+
Steep.logger.info { "Starting type check from textDocument/didChange notification..." }
|
696
|
+
|
686
697
|
last_request = current_type_check_request
|
687
698
|
if request = controller.make_request(last_request: last_request)
|
688
699
|
start_type_check(request, last_request: last_request, start_progress: request.total > 10)
|
data/lib/steep/version.rb
CHANGED
data/sig/steep/server/master.rbs
CHANGED
@@ -61,15 +61,29 @@ module Steep
|
|
61
61
|
|
62
62
|
attr_reader target_paths: Array[TargetPaths]
|
63
63
|
|
64
|
+
# TargetPaths object keeps track of the expanded absolute paths of each target
|
65
|
+
#
|
66
|
+
# 1. *Library path* is a RBS file that is loaded as a part of a library
|
67
|
+
# 2. *Signature path* is a RBS file that is loaded as a part of the application library
|
68
|
+
# 3. *Code path* is a Ruby file that is being type checked
|
69
|
+
#
|
64
70
|
class TargetPaths
|
65
71
|
attr_reader project: Project
|
66
72
|
|
67
73
|
attr_reader target: Project::Target
|
68
74
|
|
75
|
+
# Set of absolute paths of Ruby code
|
76
|
+
#
|
69
77
|
attr_reader code_paths: Set[Pathname]
|
70
78
|
|
79
|
+
# Set of absolute paths of app signatures
|
80
|
+
#
|
71
81
|
attr_reader signature_paths: Set[Pathname]
|
72
82
|
|
83
|
+
# Set of absolute paths of library signatures
|
84
|
+
#
|
85
|
+
# Unlike `code_paths` and `signature_paths`, the `library_paths` must be added explicitly not by `#add` method.
|
86
|
+
#
|
73
87
|
attr_reader library_paths: Set[Pathname]
|
74
88
|
|
75
89
|
def initialize: (project: Project, target: Project::Target) -> void
|
@@ -82,7 +96,14 @@ module Steep
|
|
82
96
|
|
83
97
|
def code_path?: (Pathname path) -> bool
|
84
98
|
|
85
|
-
|
99
|
+
# Adds `path` to the object
|
100
|
+
#
|
101
|
+
# Returns `false` if the path is not a part of the project.
|
102
|
+
#
|
103
|
+
# Whether `path` is a code path or signature path is automatically detected.
|
104
|
+
# `library: true` is required to add the path to library path.
|
105
|
+
#
|
106
|
+
def add: (Pathname path, ?library: bool) -> bool
|
86
107
|
|
87
108
|
alias << add
|
88
109
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: steep
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.0.pre.
|
4
|
+
version: 1.6.0.pre.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Soutaro Matsumoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|