Skip to content

Commit f53fe76

Browse files
committed
Update Steep to 2.1 and drop the version constraints
`bin/steep` and the type check workflow run out of `steep/Gemfile`, whose `~>` constraints kept the weekly `bundle lock --update` on Steep 1.10 and RBS 3.9. Drop them so that the bundle follows the releases, which takes it to Steep 2.1 and RBS 4.2, and fix what the newer type checker reports: * `steep/patch.rbs` declares `Module#ruby2_keywords` and `Proc#ruby2_keywords`, which RBS 4.2 declares in `core`. The duplicated definitions abort the check, and the file itself says to remove them once they are declared, so drop it and its `signature` line. * The `steep:ignore` comments on the `with_nonreturn_void?` calls and on `Prism.parse_comments(version:)` do not suppress anything any more, and Steep 2.0 reports them as `RedundantIgnoreComment`. * `::float` is deprecated in favour of `_ToF`, which is what `with_float` yields anyway. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent e96867d commit f53fe76

8 files changed

Lines changed: 27 additions & 62 deletions

File tree

‎Steepfile‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ target :lib do
2424
signature "stdlib/rdoc/0/"
2525
signature "stdlib/ripper/0"
2626
signature "stdlib/pp/0"
27-
signature "steep/patch.rbs"
2827

2928
# configure_code_diagnostics do |config|
3029
# config[D::Ruby::MethodDefinitionMissing] = :hint

‎lib/rbs/method_type.rb‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ def has_classish_type?
129129
end
130130

131131
def with_nonreturn_void?
132-
if type.with_nonreturn_void? # steep:ignore DeprecatedReference
132+
if type.with_nonreturn_void?
133133
true
134134
else
135135
if block = block()
136-
block.type.with_nonreturn_void? || # steep:ignore DeprecatedReference
137-
block.self_type&.with_nonreturn_void? || # steep:ignore DeprecatedReference
136+
block.type.with_nonreturn_void? ||
137+
block.self_type&.with_nonreturn_void? ||
138138
false
139139
else
140140
false

‎lib/rbs/prototype/helpers.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module Helpers
66
private
77

88
def parse_comments(string, include_trailing:)
9-
Prism.parse_comments(string, version: "current").yield_self do |prism_comments| # steep:ignore UnexpectedKeywordArgument
9+
Prism.parse_comments(string, version: "current").yield_self do |prism_comments|
1010
prism_comments.each_with_object({}) do |comment, hash| #$ Hash[Integer, AST::Comment]
1111
# Skip EmbDoc comments
1212
next unless comment.is_a?(Prism::InlineComment)

‎lib/rbs/types.rb‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def with_nonreturn_void?
251251
# `void` in immediate generics parameter is allowed
252252
false
253253
else
254-
type.with_nonreturn_void? # steep:ignore DeprecatedReference
254+
type.with_nonreturn_void?
255255
end
256256
end
257257
end
@@ -530,7 +530,7 @@ def has_classish_type?
530530
end
531531

532532
def with_nonreturn_void?
533-
each_type.any? {|type| type.with_nonreturn_void? } # steep:ignore DeprecatedReference
533+
each_type.any? {|type| type.with_nonreturn_void? }
534534
end
535535
end
536536

@@ -648,7 +648,7 @@ def has_classish_type?
648648
end
649649

650650
def with_nonreturn_void?
651-
each_type.any? {|type| type.with_nonreturn_void? } # steep:ignore DeprecatedReference
651+
each_type.any? {|type| type.with_nonreturn_void? }
652652
end
653653
end
654654

@@ -734,7 +734,7 @@ def has_classish_type?
734734
end
735735

736736
def with_nonreturn_void?
737-
each_type.any? {|type| type.with_nonreturn_void? } # steep:ignore DeprecatedReference
737+
each_type.any? {|type| type.with_nonreturn_void? }
738738
end
739739
end
740740

@@ -825,7 +825,7 @@ def has_classish_type?
825825
end
826826

827827
def with_nonreturn_void?
828-
each_type.any? {|type| type.with_nonreturn_void? } # steep:ignore DeprecatedReference
828+
each_type.any? {|type| type.with_nonreturn_void? }
829829
end
830830
end
831831

@@ -908,7 +908,7 @@ def has_classish_type?
908908
end
909909

910910
def with_nonreturn_void?
911-
each_type.any? {|type| type.with_nonreturn_void? } # steep:ignore DeprecatedReference
911+
each_type.any? {|type| type.with_nonreturn_void? }
912912
end
913913
end
914914

@@ -1278,13 +1278,13 @@ def has_classish_type?
12781278
end
12791279

12801280
def with_nonreturn_void?
1281-
if each_param.any? {|param| param.type.with_nonreturn_void? } # steep:ignore DeprecatedReference
1281+
if each_param.any? {|param| param.type.with_nonreturn_void? }
12821282
true
12831283
else
12841284
if return_type.is_a?(Bases::Void)
12851285
false
12861286
else
1287-
return_type.with_nonreturn_void? # steep:ignore DeprecatedReference
1287+
return_type.with_nonreturn_void?
12881288
end
12891289
end
12901290
end
@@ -1557,11 +1557,11 @@ def has_classish_type?
15571557
end
15581558

15591559
def with_nonreturn_void?
1560-
if type.with_nonreturn_void? || self_type&.with_nonreturn_void? # steep:ignore DeprecatedReference
1560+
if type.with_nonreturn_void? || self_type&.with_nonreturn_void?
15611561
true
15621562
else
15631563
if block = block()
1564-
block.type.with_nonreturn_void? || block.self_type&.with_nonreturn_void? || false # steep:ignore DeprecatedReference
1564+
block.type.with_nonreturn_void? || block.self_type&.with_nonreturn_void? || false
15651565
else
15661566
false
15671567
end

‎sig/unit_test/with_aliases.rbs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ module RBS
7373
def with_int: (?Integer value) { (int) -> void } -> void
7474
| (?Integer value) -> WithEnum[int]
7575

76-
# Yields `::float` objects
76+
# Yields `::_ToF` objects
7777
#
78-
def with_float: (?Float value) { (float) -> void } -> void
79-
| (?Float value) -> WithEnum[float]
78+
def with_float: (?Float value) { (_ToF) -> void } -> void
79+
| (?Float value) -> WithEnum[_ToF]
8080

8181
# Yields `::string` objects
8282
#

‎steep/Gemfile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source "https://rubygems.org"
22

3-
gem "rbs", "~> 3.9"
4-
gem "steep", "~> 1.10"
3+
gem "rbs"
4+
gem "steep"
55
gem "ruby-lsp"
66
gem "test-unit"

‎steep/Gemfile.lock‎

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,18 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (8.1.3.1)
5-
base64
6-
bigdecimal
7-
concurrent-ruby (~> 1.0, >= 1.3.1)
8-
connection_pool (>= 2.2.5)
9-
drb
10-
i18n (>= 1.6, < 2)
11-
json
12-
logger (>= 1.4.2)
13-
minitest (>= 5.1)
14-
securerandom (>= 0.3)
15-
tzinfo (~> 2.0, >= 2.0.5)
16-
uri (>= 0.13.1)
174
ast (2.4.3)
18-
base64 (0.3.0)
19-
bigdecimal (4.1.2)
205
concurrent-ruby (1.3.8)
21-
connection_pool (3.0.2)
226
csv (3.3.6)
23-
drb (2.2.3)
247
ffi (1.17.4)
258
fileutils (1.8.0)
26-
i18n (1.15.2)
27-
concurrent-ruby (~> 1.0)
289
json (2.21.2)
2910
language_server-protocol (3.17.0.6)
3011
listen (3.10.0)
3112
logger
3213
rb-fsevent (~> 0.10, >= 0.10.3)
3314
rb-inotify (~> 0.9, >= 0.9.10)
3415
logger (1.7.0)
35-
minitest (6.0.6)
36-
drb (~> 2.0)
37-
prism (~> 1.5)
38-
mutex_m (0.3.0)
3916
parser (3.3.12.0)
4017
ast (~> 2.4.1)
4118
racc
@@ -46,27 +23,27 @@ GEM
4623
rb-fsevent (0.11.2)
4724
rb-inotify (0.11.1)
4825
ffi (~> 1.0)
49-
rbs (3.10.4)
26+
rbs (4.2.0)
5027
logger
28+
prism (>= 1.6.0)
5129
tsort
5230
ruby-lsp (0.26.11)
5331
language_server-protocol (~> 3.17.0)
5432
prism (>= 1.2, < 2.0)
5533
rbs (>= 3, < 5)
5634
securerandom (0.4.1)
57-
steep (1.10.0)
58-
activesupport (>= 5.1)
35+
steep (2.1.0)
5936
concurrent-ruby (>= 1.1.10)
6037
csv (>= 3.0.9)
6138
fileutils (>= 1.1.0)
6239
json (>= 2.1.0)
6340
language_server-protocol (>= 3.17.0.4, < 4.0)
6441
listen (~> 3.0)
6542
logger (>= 1.3.0)
66-
mutex_m (>= 0.3.0)
67-
parser (>= 3.1)
43+
parser (>= 3.2)
44+
prism (>= 0.25.0)
6845
rainbow (>= 2.2.2, < 4.0)
69-
rbs (~> 3.9)
46+
rbs (~> 4.2)
7047
securerandom (>= 0.1)
7148
strscan (>= 1.0.0)
7249
terminal-table (>= 2, < 5)
@@ -77,8 +54,6 @@ GEM
7754
test-unit (3.7.8)
7855
power_assert
7956
tsort (0.2.0)
80-
tzinfo (2.0.6)
81-
concurrent-ruby (~> 1.0)
8257
unicode-display_width (3.2.0)
8358
unicode-emoji (~> 4.1)
8459
unicode-emoji (4.2.0)
@@ -88,9 +63,9 @@ PLATFORMS
8863
ruby
8964

9065
DEPENDENCIES
91-
rbs (~> 3.9)
66+
rbs
9267
ruby-lsp
93-
steep (~> 1.10)
68+
steep
9469
test-unit
9570

9671
BUNDLED WITH

‎steep/patch.rbs‎

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)