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
+29-3Lines changed: 29 additions & 3 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:)
@@ -161,12 +171,24 @@ def generate
161
171
returniflockfile.gems.key?(name)
162
172
163
173
casename
174
+
when'bigdecimal-math'
175
+
# The `bigdecimal-math` is never released as a gem.
176
+
# Therefore, `assign_gem` should not be called.
177
+
RBS.logger.info{
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
168
190
source=find_source(name: name)orraise
169
-
ifsource.is_a?(Sources::Stdlib)
191
+
ifsource.is_a?(Sources::Stdlib) && version
170
192
RBS.logger.warn{
171
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."
172
194
}
@@ -180,7 +202,11 @@ def generate
180
202
else
181
203
# From `gems:` of a `rbs_collection.yaml`
182
204
RBS.logger.warn{
183
-
"`#{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