@@ -156,14 +156,19 @@ def self.load directory
156
156
# Create an ApiMap with a workspace in the specified directory and cache
157
157
# any missing gems.
158
158
#
159
+ #
160
+ # @todo IO::NULL is incorrectly inferred to be a String.
161
+ # @sg-ignore
162
+ #
159
163
# @param directory [String]
164
+ # @param out [IO] The output stream for messages
160
165
# @return [ApiMap]
161
- def self . load_with_cache directory
166
+ def self . load_with_cache directory , out = IO :: NULL
162
167
api_map = load ( directory )
163
168
return api_map if api_map . uncached_gemspecs . empty?
164
169
165
170
api_map . uncached_gemspecs . each do |gemspec |
166
- Solargraph . logger . info "Caching #{ gemspec . name } #{ gemspec . version } ... "
171
+ out . puts "Caching gem #{ gemspec . name } #{ gemspec . version } "
167
172
pins = GemPins . build ( gemspec )
168
173
Solargraph ::Cache . save ( 'gems' , "#{ gemspec . name } -#{ gemspec . version } .ser" , pins )
169
174
end
@@ -598,7 +603,7 @@ def inner_get_methods rooted_tag, scope, visibility, deep, skip, no_core = false
598
603
# namespaces; resolving the generics in the method pins is this
599
604
# class' responsibility
600
605
raw_methods = store . get_methods ( fqns , scope : scope , visibility : visibility ) . sort { |a , b | a . name <=> b . name }
601
- namespace_pin = store . get_path_pins ( fqns ) . select { |p | p . is_a? ( Pin ::Namespace ) } . first
606
+ namespace_pin = store . get_path_pins ( fqns ) . select { |p | p . is_a? ( Pin ::Namespace ) } . first
602
607
methods = if rooted_tag != fqns
603
608
methods = raw_methods . map do |method_pin |
604
609
method_pin . resolve_generics ( namespace_pin , rooted_type )
0 commit comments