@@ -66,7 +66,7 @@ def index pins
6666 @source_map_hash = { }
6767 implicit . clear
6868 cache . clear
69- store . update! @@core_map . pins , pins
69+ store . update @@core_map . pins , pins
7070 self
7171 end
7272
@@ -85,11 +85,9 @@ def map source
8585 # @param bench [Bench]
8686 # @return [self]
8787 def catalog bench
88- old_api_hash = @source_map_hash &.values &.map ( &:api_hash )
89- need_to_uncache = ( old_api_hash != bench . source_maps . map ( &:api_hash ) )
90- # @todo Work around #to_h problem in current Ruby head (3.5)
91- @source_map_hash = bench . source_maps . map { |s | [ s . filename , s ] } . to_h
92- pins = bench . source_maps . flat_map ( &:pins ) . flatten
88+ @source_map_hash = bench . source_map_hash
89+ iced_pins = bench . icebox . flat_map ( &:pins )
90+ live_pins = bench . live_map &.pins || [ ]
9391 implicit . clear
9492 source_map_hash . each_value do |map |
9593 implicit . merge map . environ
@@ -98,11 +96,8 @@ def catalog bench
9896 if @unresolved_requires != unresolved_requires || @doc_map &.uncached_gemspecs &.any?
9997 @doc_map = DocMap . new ( unresolved_requires , [ ] , bench . workspace . rbs_collection_path ) # @todo Implement gem preferences
10098 @unresolved_requires = unresolved_requires
101- need_to_uncache = true
10299 end
103- store . update! @@core_map . pins + @doc_map . pins , implicit . pins + pins
104- @cache . clear if need_to_uncache
105-
100+ @cache . clear if store . update ( @@core_map . pins , @doc_map . pins , implicit . pins , iced_pins , live_pins )
106101 @missing_docs = [ ] # @todo Implement missing docs
107102 self
108103 end
@@ -111,7 +106,7 @@ def catalog bench
111106 # that this overload of 'protected' will typecheck @sg-ignore
112107 # @sg-ignore
113108 protected def equality_fields
114- [ self . class , @source_map_hash , implicit , @doc_map , @unresolved_requires , @missing_docs ]
109+ [ self . class , @source_map_hash , implicit , @doc_map , @unresolved_requires ]
115110 end
116111
117112 # @return [::Array<Gem::Specification>]
0 commit comments