You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/rbs/collection/config/lockfile_generator.rb
+23-4Lines changed: 23 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,17 @@ module RBS
4
4
moduleCollection
5
5
classConfig
6
6
classLockfileGenerator
7
-
ALUMNI_STDLIBS={"mutex_m"=>">= 0.3.0"}
7
+
ALUMNI_STDLIBS={
8
+
"mutex_m"=>">= 0.3.0",
9
+
"abbrev"=>nil,
10
+
"base64"=>nil,
11
+
"bigdecimal"=>nil,
12
+
"csv"=>nil,
13
+
"minitest"=>nil,
14
+
"net-smtp"=>nil,
15
+
"nkf"=>nil,
16
+
"observer"=>nil,
17
+
}
8
18
9
19
classGemfileLockMismatchError < StandardError
10
20
definitialize(expected:,actual:)
@@ -165,15 +175,20 @@ def generate
165
175
# The `bigdecimal-math` is never released as a gem.
166
176
# Therefore, `assign_gem` should not be called.
167
177
RBS.logger.info{
168
-
"`#{name}` is included in the RBS dependencies of `#{from_gem}`, but the type definition as a stdlib in rbs-gem is deprecated. Delete `#{name}` from the RBS dependencies of `#{from_gem}`."
178
+
from=from_gem || "rbs_collection.yaml"
179
+
"`#{name}` is included in the RBS dependencies of `#{from}`, but the type definition as a stdlib in rbs-gem is deprecated. Delete `#{name}` from the RBS dependencies of `#{from}`."
# From `dependencies:` of a `manifest.yaml` of a gem
175
190
source=find_source(name: name)orraise
176
-
ifsource.is_a?(Sources::Stdlib)
191
+
ifsource.is_a?(Sources::Stdlib) && version
177
192
RBS.logger.warn{
178
193
"`#{name}` is included in the RBS dependencies of `#{from_gem}`, but the type definition as a stdlib in rbs-gem is deprecated. Add `#{name}` (#{version}) to the dependency of your Ruby program to use the gem-bundled type definition."
179
194
}
@@ -187,7 +202,11 @@ def generate
187
202
else
188
203
# From `gems:` of a `rbs_collection.yaml`
189
204
RBS.logger.warn{
190
-
"`#{name}` as a stdlib in rbs-gem is deprecated. Add `#{name}` (#{version}) to the dependency of your Ruby program to use the gem-bundled type definition."
205
+
ifversion
206
+
"`#{name}` as a stdlib in rbs-gem is deprecated. Add `#{name}` (#{version}) to the dependency of your Ruby program to use the gem-bundled type definition."
207
+
else
208
+
"`#{name}` as a stdlib in rbs-gem is deprecated. Delete `#{name}` from the RBS dependencies in your rbs_collection.yaml."
0 commit comments