cocoapods-podgenerate 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aba68b23582a229140c6580a31d506a3298d8389b6946f432e6429e1fbfe5edd
|
|
4
|
+
data.tar.gz: 2cd7a8c3bf26165fcc425f00bc03a9bffd566946d58cf126ff6c0ee6e47d97aa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d631266d74333c37296f116a0bedb11e31989ab3a6307d531ed4c59a2a55f7f7e8e553294c87cab2eceaa22006ceda20efaa733c123566f6cdf2314b3176e42a
|
|
7
|
+
data.tar.gz: 402636b400e0db9a80b5240730063d23215ac5c58ed87c3ac044a52839eb5a4a5d15600e48a71bf1f6363de3aa85aeae6aff9c466f512f2aa49d6de9522f5621
|
|
@@ -37,23 +37,14 @@ module Pod
|
|
|
37
37
|
|
|
38
38
|
target_by_label.each do |label, target|
|
|
39
39
|
pool.post do
|
|
40
|
-
key =
|
|
41
|
-
when PodTarget
|
|
42
|
-
local = sandbox.local?(target.pod_name)
|
|
43
|
-
checkout_options = sandbox.checkout_sources[target.pod_name]
|
|
44
|
-
TargetCacheKey.from_pod_target(sandbox, target_by_label, target,
|
|
45
|
-
:is_local_pod => local,
|
|
46
|
-
:checkout_options => checkout_options)
|
|
47
|
-
when AggregateTarget
|
|
48
|
-
TargetCacheKey.from_aggregate_target(sandbox, target_by_label, target)
|
|
49
|
-
else
|
|
50
|
-
raise "[BUG] Unknown target type #{target}"
|
|
51
|
-
end
|
|
40
|
+
key = compute_cache_key(target, target_by_label)
|
|
52
41
|
mutex.synchronize { results[label] = key }
|
|
53
42
|
rescue StandardError => e
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
43
|
+
# Bug fix v0.1.3: compute fallback key synchronously to avoid nil
|
|
44
|
+
# entries that would crash ProjectCacheAnalyzer#analyze downstream
|
|
45
|
+
Pod::UI.warn "[cocoapods-podgenerate] Cache key computation error, retrying sync: #{e.message}"
|
|
46
|
+
fallback_key = compute_cache_key(target, target_by_label)
|
|
47
|
+
mutex.synchronize { results[label] = fallback_key }
|
|
57
48
|
end
|
|
58
49
|
end
|
|
59
50
|
|
|
@@ -65,6 +56,21 @@ module Pod
|
|
|
65
56
|
|
|
66
57
|
private
|
|
67
58
|
|
|
59
|
+
def compute_cache_key(target, target_by_label)
|
|
60
|
+
case target
|
|
61
|
+
when PodTarget
|
|
62
|
+
local = sandbox.local?(target.pod_name)
|
|
63
|
+
checkout_options = sandbox.checkout_sources[target.pod_name]
|
|
64
|
+
TargetCacheKey.from_pod_target(sandbox, target_by_label, target,
|
|
65
|
+
:is_local_pod => local,
|
|
66
|
+
:checkout_options => checkout_options)
|
|
67
|
+
when AggregateTarget
|
|
68
|
+
TargetCacheKey.from_aggregate_target(sandbox, target_by_label, target)
|
|
69
|
+
else
|
|
70
|
+
raise "[BUG] Unknown target type #{target}"
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
68
74
|
def compute_pool_size
|
|
69
75
|
[[Etc.nprocessors - 1, 2].max, 16].min
|
|
70
76
|
rescue NameError
|
|
@@ -94,18 +94,26 @@ module Pod
|
|
|
94
94
|
pool_size = compute_pool_size
|
|
95
95
|
Pod::UI.message "- Cleaning up #{projects.size} projects (pool: #{pool_size})"
|
|
96
96
|
|
|
97
|
-
pool =
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
97
|
+
pool = begin
|
|
98
|
+
Concurrent::FixedThreadPool.new(pool_size)
|
|
99
|
+
rescue NameError
|
|
100
|
+
nil
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if pool
|
|
104
|
+
projects.each do |project|
|
|
105
|
+
pool.post do
|
|
106
|
+
cleanup_single_project(project)
|
|
107
|
+
rescue StandardError => e
|
|
108
|
+
Pod::UI.warn "[cocoapods-podgenerate] Cleanup error: #{e.message}"
|
|
109
|
+
end
|
|
103
110
|
end
|
|
111
|
+
pool.shutdown
|
|
112
|
+
pool.wait_for_termination
|
|
113
|
+
else
|
|
114
|
+
# Fallback: sequential (Concurrent not available)
|
|
115
|
+
projects.each { |p| cleanup_single_project(p) }
|
|
104
116
|
end
|
|
105
|
-
pool.shutdown
|
|
106
|
-
pool.wait_for_termination
|
|
107
|
-
rescue NameError
|
|
108
|
-
cleanup_projects(projects)
|
|
109
117
|
end
|
|
110
118
|
|
|
111
119
|
def cleanup_single_project(project)
|
|
@@ -126,35 +134,38 @@ module Pod
|
|
|
126
134
|
pool_size = compute_pool_size
|
|
127
135
|
Pod::UI.message "- Recreating user schemes for #{projects.size} projects (pool: #{pool_size})"
|
|
128
136
|
|
|
129
|
-
pool =
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
pool = begin
|
|
138
|
+
Concurrent::FixedThreadPool.new(pool_size)
|
|
139
|
+
rescue NameError
|
|
140
|
+
nil
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if pool
|
|
144
|
+
projects.each do |project|
|
|
145
|
+
pool.post do
|
|
146
|
+
recreate_schemes_for_project(project, library_product_types, results_by_native_target)
|
|
147
|
+
rescue StandardError => e
|
|
148
|
+
Pod::UI.warn "[cocoapods-podgenerate] Scheme recreation error: #{e.message}"
|
|
140
149
|
end
|
|
141
|
-
|
|
142
|
-
|
|
150
|
+
end
|
|
151
|
+
pool.shutdown
|
|
152
|
+
pool.wait_for_termination
|
|
153
|
+
else
|
|
154
|
+
# Fallback: sequential (Concurrent not available)
|
|
155
|
+
projects.each do |project|
|
|
156
|
+
recreate_schemes_for_project(project, library_product_types, results_by_native_target)
|
|
143
157
|
end
|
|
144
158
|
end
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
installation_result.test_native_targets.each do |test_native_target|
|
|
156
|
-
scheme.add_test_target(test_native_target)
|
|
157
|
-
end
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
def recreate_schemes_for_project(project, library_product_types, results_by_native_target)
|
|
162
|
+
project.recreate_user_schemes(false) do |scheme, target|
|
|
163
|
+
next unless target.respond_to?(:symbol_type)
|
|
164
|
+
next unless library_product_types.include?(target.symbol_type)
|
|
165
|
+
installation_result = results_by_native_target[target]
|
|
166
|
+
next unless installation_result
|
|
167
|
+
installation_result.test_native_targets.each do |test_native_target|
|
|
168
|
+
scheme.add_test_target(test_native_target)
|
|
158
169
|
end
|
|
159
170
|
end
|
|
160
171
|
end
|
|
@@ -118,6 +118,10 @@ module Pod
|
|
|
118
118
|
|
|
119
119
|
private
|
|
120
120
|
|
|
121
|
+
# Per-target xcconfig override check. Runs inside a thread pool slot.
|
|
122
|
+
# NOTE: `print_override_warning` is a private method on the original
|
|
123
|
+
# UserProjectIntegrator class. Ruby allows implicit-receiver calls to
|
|
124
|
+
# private methods from prepended modules (no explicit `self.` prefix).
|
|
121
125
|
def warn_single_target(aggregate_target)
|
|
122
126
|
aggregate_target.user_targets.each do |user_target|
|
|
123
127
|
user_target.build_configurations.each do |config|
|