File tree Expand file tree Collapse file tree 5 files changed +34
-8
lines changed
lib/cocoapods-binary-cache/pod-binary Expand file tree Collapse file tree 5 files changed +34
-8
lines changed Original file line number Diff line number Diff line change @@ -4,5 +4,4 @@ inherit_from:
44AllCops :
55 Exclude :
66 - ' PodBinaryCacheExample/**/*'
7- - ' lib/cocoapods-binary-cache/pod-binary/**/*'
87 - ' lib/cocoapods-binary-cache/pod-rome/**/*'
Original file line number Diff line number Diff line change 1414group :test do
1515 gem 'rspec'
1616end
17+
18+ group :lint do
19+ gem 'rubocop'
20+ end
Original file line number Diff line number Diff line change 1919 algoliasearch (1.27.1 )
2020 httpclient (~> 2.8 , >= 2.8.3 )
2121 json (>= 1.5.1 )
22+ ast (2.4.0 )
2223 atomos (0.1.3 )
2324 bacon (1.2.0 )
2425 claide (1.0.3 )
6768 httpclient (2.8.3 )
6869 i18n (0.9.5 )
6970 concurrent-ruby (~> 1.0 )
71+ jaro_winkler (1.5.4 )
7072 json (2.3.0 )
7173 lazy_priority_queue (0.1.1 )
7274 minitest (5.13.0 )
7779 nanaimo (0.2.6 )
7880 nap (1.1.0 )
7981 netrc (0.11.0 )
82+ parallel (1.19.1 )
83+ parser (2.7.1.1 )
84+ ast (~> 2.4.0 )
8085 prettybacon (0.0.2 )
8186 bacon (~> 1.2 )
87+ rainbow (3.0.0 )
8288 rake (10.5.0 )
89+ rexml (3.2.4 )
8390 rgl (0.5.6 )
8491 lazy_priority_queue (~> 0.1.0 )
8592 stream (~> 0.5.2 )
97104 diff-lcs (>= 1.2.0 , < 2.0 )
98105 rspec-support (~> 3.9.0 )
99106 rspec-support (3.9.2 )
107+ rubocop (0.82.0 )
108+ jaro_winkler (~> 1.5.1 )
109+ parallel (~> 1.10 )
110+ parser (>= 2.7.0.1 )
111+ rainbow (>= 2.2.2 , < 4.0 )
112+ rexml
113+ ruby-progressbar (~> 1.7 )
114+ unicode-display_width (>= 1.4.0 , < 2.0 )
100115 ruby-macho (1.4.0 )
116+ ruby-progressbar (1.10.1 )
101117 stream (0.5.2 )
102118 thread_safe (0.3.6 )
103119 tzinfo (1.2.5 )
104120 thread_safe (~> 0.1 )
121+ unicode-display_width (1.7.0 )
105122 xcodeproj (1.13.0 )
106123 CFPropertyList (>= 2.3.3 , < 4.0 )
107124 atomos (~> 0.1.3 )
@@ -124,6 +141,7 @@ DEPENDENCIES
124141 prettybacon
125142 rake (~> 10.0 )
126143 rspec
144+ rubocop
127145
128146BUNDLED WITH
129147 1.17.3
Original file line number Diff line number Diff line change @@ -56,9 +56,7 @@ def prebuild_output
5656 @prebuild_output
5757 end
5858
59- # check if need to prebuild
60- def have_exact_prebuild_cache?
61- # check if need build frameworks
59+ def cache_miss
6260 return false if local_manifest == nil
6361
6462 changes = prebuild_pods_changes
@@ -76,16 +74,15 @@ def have_exact_prebuild_cache?
7674 UI . puts "Changed frameworks: #{ changed . to_a } "
7775 UI . puts "Deleted frameworks: #{ deleted . to_a } "
7876 UI . puts "Missing frameworks: #{ missing . to_a } "
79- needed = ( added + changed + deleted + missing )
77+ needed = ( added + changed + missing )
8078 if Pod ::Podfile ::DSL . enable_prebuild_dev_pod && Pod ::Podfile ::DSL . is_prebuild_job
8179 needed += Pod ::Prebuild ::CacheInfo . cache_miss_dev_pods_dic . keys
8280 end
8381 needed = needed . reject { |name | blacklisted? ( name ) || cache_hit? ( name ) }
8482 UI . puts "Need to rebuild: #{ needed . count } #{ needed } "
85- return needed . empty?
83+ return needed
8684 end
8785
88-
8986 # The install method when have completed cache
9087 def install_when_cache_hit!
9188 # just print log
Original file line number Diff line number Diff line change 121121 binary_installer . install!
122122 end
123123
124+ # Currently, `binary_installer.cache_miss` depends on the output of `Pod::Podfile::DSL.unbuilt_pods`
125+ # -> indirectly depends on:
126+ # - `PodCacheValidator.verify_prebuilt_vendor_pods`
127+ # - `PodCacheValidator.verify_devpod_checksum`
128+ # TODO (thuyen): Simplify this logic
129+ cache_miss = binary_installer . cache_miss
130+ Pod ::Podfile ::DSL . add_unbuilt_pods ( cache_miss )
131+
124132 if Pod ::Podfile ::DSL . prebuild_all_vendor_pods
125133 Pod ::UI . puts "Prebuild all vendor pods"
126134 installer_exec . call
127- elsif ( binary_installer . have_exact_prebuild_cache? && ! update ) # If not in prebuild job, we never rebuild and just use cache
135+ elsif ! update && cache_miss . empty? # If not in prebuild job, we never rebuild and just use cache
128136 Pod ::UI . puts "Cache hit"
129137 binary_installer . install_when_cache_hit!
130138 else
You can’t perform that action at this time.
0 commit comments