Skip to content

Commit 9568cb1

Browse files
authored
Merge pull request #2328 from ruby/update-steep
Update steep
2 parents 811821f + 7a0cd3f commit 9568cb1

File tree

18 files changed

+41
-43
lines changed

18 files changed

+41
-43
lines changed

core/kernel.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1729,7 +1729,7 @@ module Kernel : BasicObject
17291729
def self?.sleep: (?nil) -> bot
17301730
| (Time::_Timeout duration) -> Integer
17311731

1732-
%a{steep:deprecated}
1732+
%a{deprecated}
17331733
interface _Divmod
17341734
def divmod: (Numeric) -> [ Numeric, Numeric ]
17351735
end

core/module.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1699,6 +1699,6 @@ class Module < Object
16991699
def attr: (*interned arg0) -> Array[Symbol]
17001700

17011701
# A previous incarnation of `interned` for backward-compatibility (see #1499)
1702-
%a{steep:deprecated}
1702+
%a{deprecated: Use `interned`}
17031703
type id = interned
17041704
end

core/object.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,5 @@ class Object < BasicObject
106106
end
107107

108108
# A previous incarnation of `interned` for backward-compatibility (see #1499)
109-
%a{steep:deprecated}
109+
%a{deprecated: Use `interned` instead}
110110
type Object::name = interned

core/string.rbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3574,10 +3574,10 @@ class String
35743574
def valid_encoding?: () -> bool
35753575
end
35763576

3577-
%a{steep:deprecated}
3577+
%a{deprecated}
35783578
interface _ArefFromStringToString
35793579
def []: (String) -> String
35803580
end
35813581

3582-
%a{steep:deprecated}
3582+
%a{deprecated}
35833583
type String::encode_fallback = Hash[String, String] | Proc | Method | _ArefFromStringToString

lib/rbs/ast/type_param.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,6 @@ def to_json(state = JSON::State.new)
5656
}.to_json(state)
5757
end
5858

59-
def rename(name)
60-
TypeParam.new(
61-
name: name,
62-
variance: variance,
63-
upper_bound: upper_bound_type,
64-
location: location,
65-
default_type: default_type
66-
).unchecked!(unchecked?)
67-
end
68-
6959
def map_type(&block)
7060
if b = upper_bound_type
7161
_upper_bound_type = yield(b)

lib/rbs/prototype/rb.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,8 @@ def process(node, decls:, comments:, context:)
382382
name: const_name,
383383
type: type,
384384
location: nil,
385-
comment: comments[node.first_lineno - 1]
385+
comment: comments[node.first_lineno - 1],
386+
annotations: []
386387
)
387388

388389
when :IASGN

lib/rbs/prototype/rbi.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ def process(node, outer: [], comments:)
257257
name: name,
258258
type: type,
259259
location: nil,
260-
comment: nil
260+
comment: nil,
261+
annotations: []
261262
)
262263
end
263264
when :ALIAS

lib/rbs/prototype/runtime.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ def merge_rbs(module_name, members, instance: nil, singleton: nil)
250250
method = builder.build_singleton(module_name.absolute!).methods[singleton]
251251
method_name = singleton
252252
kind = :singleton
253+
else
254+
raise
253255
end
254256

255257
if method
@@ -462,6 +464,7 @@ def generate_constants(mod, decls)
462464
name: to_type_name(name.to_s),
463465
type: type,
464466
location: nil,
467+
annotations: [],
465468
comment: nil
466469
)
467470
end

lib/rbs/types.rb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,18 +109,14 @@ class Void < Base; end
109109
class Any < Base
110110
def initialize(location:, todo: false)
111111
super(location: location)
112-
todo! if todo
112+
if todo
113+
@string = "__todo__"
114+
end
113115
end
114116

115117
def to_s(level=0)
116118
@string || "untyped"
117119
end
118-
119-
# @deprecated: this method is now called from the constructor, do not call it from outside
120-
def todo!
121-
@string = '__todo__'
122-
self
123-
end
124120
end
125121
class Nil < Base; end
126122
class Top < Base; end

lib/rbs/unit_test/with_aliases.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ def with_range(start, stop, exclude_end = false)
127127

128128
# `Range` requires `begin <=> end` to return non-nil, but doesn't actually
129129
# end up using the return value of it. This is to add that in when needed.
130-
def lower.<=>(rhs) = :not_nil unless defined? lower.<=>
130+
unless defined? lower.<=>
131+
def lower.<=>(rhs) = :not_nil # steep:ignore MethodDefinitionInUndeclaredModule
132+
end
131133

132134
# If `lower <=> rhs` is defined but nil, then that means we're going to be constructing
133135
# an illegal range (eg `3..ToInt.new(4)`). So, we need to skip yielding an invalid range

sig/annotate/rdoc_source.rbs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ module RBS
2525
| (TypeName, singleton_method: Symbol) -> Array[RDoc::AnyMethod]?
2626

2727
def find_attribute: (TypeName, Symbol, singleton: bool) -> Array[RDoc::Attr]?
28+
29+
def class_docs: (TypeName) -> Array[::RDoc::Markup::Document | ::RDoc::Comment | ::String]?
2830
end
2931
end
3032
end

sig/cli.rbs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ module RBS
8080

8181
def run_subtract: (Array[String], top) -> void
8282

83+
def run_diff: (Array[String], LibraryOptions) -> void
84+
8385
def test_opt: (LibraryOptions) -> String?
8486

8587
def collection_options: (Array[String]) -> OptionParser

sig/namespace.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,5 +142,5 @@ end
142142

143143
module Kernel
144144
# Deprecated: Use `RBS::Namespace.parse` instead
145-
%a{steep:deprecated} def Namespace: (String) -> RBS::Namespace
145+
%a{deprecated} def Namespace: (String) -> RBS::Namespace
146146
end

sig/typename.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,5 @@ end
7575

7676
module Kernel
7777
# Deprecated: Use `RBS::TypeName.parse` instead
78-
%a{steep:deprecated} def TypeName: (String name) -> RBS::TypeName
78+
%a{deprecated: Use `RBS::TypeName.parse` instead} def TypeName: (String name) -> RBS::TypeName
7979
end

sig/types.rbs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,6 @@ module RBS
114114
@string: String?
115115

116116
def initialize: (location: Location[bot, bot]?, ?todo: bool) -> void
117-
118-
%a{steep:deprecated}
119-
def todo!: () -> self
120117
end
121118

122119
class Nil < Base

stdlib/net-http/0/net-http.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2404,7 +2404,7 @@ module Net
24042404
alias length size
24052405

24062406
# A previous incarnation of `interned` for backward-compatibility (see #1499)
2407-
%a{steep:deprecated}
2407+
%a{deprecated: Use `interned` instead}
24082408
type key = interned
24092409

24102410
# <!--

steep/Gemfile

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

3-
gem "rbs", "~> 3.8.1"
4-
gem "steep", "~> 1.9.4"
3+
gem "rbs", "~> 3.9.pre"
4+
gem "steep", "~> 1.10.pre"

steep/Gemfile.lock

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ GEM
3333
rb-inotify (~> 0.9, >= 0.9.10)
3434
logger (1.6.6)
3535
minitest (5.25.5)
36+
mutex_m (0.3.0)
3637
parser (3.3.7.1)
3738
ast (~> 2.4.1)
3839
racc
@@ -41,39 +42,42 @@ GEM
4142
rb-fsevent (0.11.2)
4243
rb-inotify (0.11.1)
4344
ffi (~> 1.0)
44-
rbs (3.8.1)
45+
rbs (3.9.0.pre.2)
4546
logger
4647
securerandom (0.4.1)
47-
steep (1.9.4)
48+
steep (1.10.0.pre.3)
4849
activesupport (>= 5.1)
4950
concurrent-ruby (>= 1.1.10)
5051
csv (>= 3.0.9)
5152
fileutils (>= 1.1.0)
5253
json (>= 2.1.0)
53-
language_server-protocol (>= 3.15, < 4.0)
54+
language_server-protocol (>= 3.17.0.4, < 4.0)
5455
listen (~> 3.0)
5556
logger (>= 1.3.0)
57+
mutex_m (>= 0.3.0)
5658
parser (>= 3.1)
5759
rainbow (>= 2.2.2, < 4.0)
58-
rbs (~> 3.8)
60+
rbs (~> 3.9.pre)
5961
securerandom (>= 0.1)
6062
strscan (>= 1.0.0)
61-
terminal-table (>= 2, < 4)
63+
terminal-table (>= 2, < 5)
6264
uri (>= 0.12.0)
6365
strscan (3.1.2)
64-
terminal-table (3.0.2)
65-
unicode-display_width (>= 1.1.1, < 3)
66+
terminal-table (4.0.0)
67+
unicode-display_width (>= 1.1.1, < 4)
6668
tzinfo (2.0.6)
6769
concurrent-ruby (~> 1.0)
68-
unicode-display_width (2.6.0)
70+
unicode-display_width (3.1.4)
71+
unicode-emoji (~> 4.0, >= 4.0.4)
72+
unicode-emoji (4.0.4)
6973
uri (1.0.3)
7074

7175
PLATFORMS
7276
ruby
7377

7478
DEPENDENCIES
75-
rbs (~> 3.8.1)
76-
steep (~> 1.9.4)
79+
rbs (~> 3.9.pre)
80+
steep (~> 1.10.pre)
7781

7882
BUNDLED WITH
7983
2.6.3

0 commit comments

Comments
 (0)