cocoapods 1.14.3 → 1.15.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 372730283427bdac2346d3cffe08336a98f10197e2c231bcad1cab2b071e4990
4
- data.tar.gz: c323b662e31bc4aeebe0039ade710f688cf3f5b12a047ea156f56bf6e7b77bb3
3
+ metadata.gz: 6e3dfaffc21d7b35657891ab5aa80c7ca89e1ebb09b551812262036d6969c4a0
4
+ data.tar.gz: ba969734f50b628ba4905eb8835288731cd6d8a5558534199e7d6d2418a5eebb
5
5
  SHA512:
6
- metadata.gz: b75e64450f7b1418fc89ce421bbbee52c70359ad347e2a87f4308c7e7fe72a4fa67e8d9d31f5b565b786ecfbd54040f770f44a16baa6641d8e7d4163eda5f1b2
7
- data.tar.gz: 50fdd316deea657b15ec3efb0955ddb0d22799d636ee55f7623be0e591e9442aa95d9f146b7545b599db80179111827d0344bcf16bbfaf504ad1e5dea2d24bbd
6
+ metadata.gz: 33a8b9e9815c9210a2e57eb19cb782aef7d4319e20a0fe0f3f69b697adb81cec51502f98b70aed3ae7eb2220d75a85eb15db0d1bd8828e9c4ba7e2d0452a10c1
7
+ data.tar.gz: 757db13273be7d182ad1e44e478c19386cc6c7b83ad0fcb04b76889a5761fd0709069359bceacddc9d8dde00942a6432257f311586e1c6cf0f394347e2544376
data/CHANGELOG.md CHANGED
@@ -4,6 +4,28 @@ To install or update CocoaPods see this [guide](https://guides.cocoapods.org/usi
4
4
 
5
5
  To install release candidates run `[sudo] gem install cocoapods --pre`
6
6
 
7
+ ## 1.15.0 (2024-01-28)
8
+
9
+ ##### Enhancements
10
+
11
+ * Optimize performance during uncached pod installation.
12
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
13
+ [#12154](https://github.com/CocoaPods/CocoaPods/pull/12154)
14
+
15
+ ##### Bug Fixes
16
+
17
+ * Fix pod install issue when git's `core.fsmonitor` feature is enabled
18
+ [Justin Martin](https://github.com/justinseanmartin)
19
+ [#11640](https://github.com/CocoaPods/CocoaPods/issues/11640)
20
+
21
+ * Don't use the `remove_destination` parameter in FileUtils.cp_r
22
+ [Justin Martin](https://github.com/justinseanmartin)
23
+ [#12165](https://github.com/CocoaPods/CocoaPods/pull/12165)
24
+
25
+ * Support `visionos` in `pod lib lint --platforms=` and use `xros` for `Fourflusher`
26
+ [MagnificentMiles](https://github.com/MagnificentMiles)
27
+ [#12159](https://github.com/CocoaPods/CocoaPods/pull/12159)
28
+
7
29
  ## 1.14.3 (2023-11-19)
8
30
 
9
31
  ##### Enhancements
@@ -16,7 +38,6 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
16
38
  [Eric Amorde](https://github.com/amorde)
17
39
  [#12122](https://github.com/CocoaPods/CocoaPods/issues/12122)
18
40
 
19
-
20
41
  ## 1.14.2 (2023-10-27)
21
42
 
22
43
  ##### Enhancements
@@ -25,7 +25,7 @@ module Pod
25
25
  ['--use-static-frameworks', 'Lint uses static frameworks during installation'],
26
26
  ["--sources=#{Pod::TrunkSource::TRUNK_REPO_URL}", 'The sources from which to pull dependent pods ' \
27
27
  "(defaults to #{Pod::TrunkSource::TRUNK_REPO_URL}). Multiple sources must be comma-delimited"],
28
- ['--platforms=ios,macos', 'Lint against specific platforms (defaults to all platforms supported by the ' \
28
+ ['--platforms=ios,macos,visionos', 'Lint against specific platforms (defaults to all platforms supported by the ' \
29
29
  'podspec). Multiple platforms must be comma-delimited'],
30
30
  ['--private', 'Lint skips checks that apply only to public specs'],
31
31
  ['--swift-version=VERSION', 'The `SWIFT_VERSION` that should be used to lint the spec. ' \
@@ -235,13 +235,38 @@ module Pod
235
235
  # was not found in the download cache.
236
236
  #
237
237
  def uncached_pod(request)
238
- in_tmpdir do |target|
239
- result, podspecs = download(request, target)
238
+ in_tmpdir do |tmp_dir|
239
+ result, podspecs = download(request, tmp_dir)
240
240
  result.location = nil
241
241
 
242
- podspecs.each do |name, spec|
242
+ # Split by pods that require a prepare command or not to speed up installation.
243
+ no_prep_cmd_specs, prep_cmd_specs = podspecs.partition { |_, spec| spec.prepare_command.nil? }.map(&:to_h)
244
+
245
+ # Pods with a prepare command currently copy the entire repo, run the prepare command against the whole
246
+ # repo and then clean it up. We configure those first to ensure the repo is pristine.
247
+ prep_cmd_specs.each do |name, spec|
243
248
  destination = path_for_pod(request, :name => name, :params => result.checkout_options)
244
- copy_and_clean(target, destination, spec)
249
+ copy_source_and_clean(tmp_dir, destination, spec)
250
+ write_spec(spec, path_for_spec(request, :name => name, :params => result.checkout_options))
251
+ if request.name == name
252
+ result.location = destination
253
+ end
254
+ end
255
+
256
+ specs_by_platform = group_subspecs_by_platform(no_prep_cmd_specs.values)
257
+
258
+ # Remaining pods without a prepare command can be optimized by cleaning the repo first
259
+ # and then copying only the files needed.
260
+ pod_dir_cleaner = Sandbox::PodDirCleaner.new(tmp_dir, specs_by_platform)
261
+ Cache.write_lock(tmp_dir) do
262
+ pod_dir_cleaner.clean!
263
+ end
264
+
265
+ no_prep_cmd_specs.each do |name, spec|
266
+ destination = path_for_pod(request, :name => name, :params => result.checkout_options)
267
+ file_accessors = pod_dir_cleaner.file_accessors.select { |fa| fa.spec.root.name == spec.name }
268
+ files = Pod::Sandbox::FileAccessor.all_files(file_accessors).map(&:to_s)
269
+ copy_files(files, tmp_dir, destination)
245
270
  write_spec(spec, path_for_spec(request, :name => name, :params => result.checkout_options))
246
271
  if request.name == name
247
272
  result.location = destination
@@ -279,23 +304,55 @@ module Pod
279
304
  #
280
305
  # @return [Void]
281
306
  #
282
- def copy_and_clean(source, destination, spec)
283
- specs_by_platform = group_subspecs_by_platform(spec)
307
+ def copy_source_and_clean(source, destination, spec)
308
+ specs_by_platform = group_subspecs_by_platform([spec])
284
309
  destination.parent.mkpath
285
310
  Cache.write_lock(destination) do
286
- FileUtils.rm_rf(destination)
287
- FileUtils.cp_r(source, destination)
311
+ Pod::Executable.execute_command('rsync', ['-a', '--exclude=.git/fsmonitor--daemon.ipc', '--delete', "#{source}/", destination])
288
312
  Pod::Installer::PodSourcePreparer.new(spec, destination).prepare!
289
313
  Sandbox::PodDirCleaner.new(destination, specs_by_platform).clean!
290
314
  end
291
315
  end
292
316
 
293
- def group_subspecs_by_platform(spec)
317
+ # Copies the `files` from the `source` directory to `destination` _without_ cleaning the
318
+ # `destination` directory of any files unused by `spec`. This is a faster version used when
319
+ # installing pods without a prepare command which has already happened prior.
320
+ #
321
+ # @param [Array<Pathname>] files
322
+ #
323
+ # @param [Pathname] source
324
+ #
325
+ # @param [Pathname] destination
326
+ #
327
+ # @return [Void]
328
+ #
329
+ def copy_files(files, source, destination)
330
+ files = files.select { |f| File.exist?(f) }
331
+ destination.parent.mkpath
332
+ Cache.write_lock(destination) do
333
+ FileUtils.rm_rf(destination)
334
+ destination.mkpath
335
+ files_by_dir = files.group_by do |file|
336
+ relative_path = Pathname(file).relative_path_from(Pathname(source)).to_s
337
+ destination_path = File.join(destination, relative_path)
338
+ File.dirname(destination_path)
339
+ end
340
+
341
+ files_by_dir.each do |dir, files_to_copy|
342
+ FileUtils.mkdir_p(dir)
343
+ FileUtils.cp_r(files_to_copy, dir)
344
+ end
345
+ end
346
+ end
347
+
348
+ def group_subspecs_by_platform(specs)
294
349
  specs_by_platform = {}
295
- [spec, *spec.recursive_subspecs].each do |ss|
296
- ss.available_platforms.each do |platform|
297
- specs_by_platform[platform] ||= []
298
- specs_by_platform[platform] << ss
350
+ specs.each do |spec|
351
+ [spec, *spec.recursive_subspecs].each do |ss|
352
+ ss.available_platforms.each do |platform|
353
+ specs_by_platform[platform] ||= []
354
+ specs_by_platform[platform] << ss
355
+ end
299
356
  end
300
357
  end
301
358
  specs_by_platform
@@ -51,7 +51,7 @@ module Pod
51
51
  if target && result.location && target != result.location
52
52
  UI.message "Copying #{request.name} from `#{result.location}` to #{UI.path target}", '> ' do
53
53
  Cache.read_lock(result.location) do
54
- FileUtils.rm_rf target
54
+ FileUtils.rm_rf(target)
55
55
  FileUtils.cp_r(result.location, target)
56
56
  end
57
57
  end
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the CocoaPods command line tool.
3
3
  #
4
- VERSION = '1.14.3'.freeze unless defined? Pod::VERSION
4
+ VERSION = '1.15.0'.freeze unless defined? Pod::VERSION
5
5
  end
@@ -245,7 +245,7 @@ module Pod
245
245
  @plist_bundle_id = target.info_plist_entries['CFBundleIdentifier']
246
246
  unless @plist_bundle_id.nil?
247
247
  message = "The `#{target.name}` target " \
248
- "sets a Bundle Identifier of `#{@plist_bundle_id}` in it's info.plist file. " \
248
+ "sets a Bundle Identifier of `#{@plist_bundle_id}` in its info.plist file. " \
249
249
  'The Bundle Identifier should be set using pod_target_xcconfig: ' \
250
250
  "s.pod_target_xcconfig = { 'PRODUCT_BUNDLE_IDENTIFIER': '#{@plist_bundle_id}' }`."
251
251
  UI.warn message
@@ -15,11 +15,9 @@ module Pod
15
15
  # @return [void]
16
16
  #
17
17
  def clean!
18
- clean_paths.each { |path| FileUtils.rm_rf(path) } if root.exist?
18
+ FileUtils.rm_rf(clean_paths) if root.exist?
19
19
  end
20
20
 
21
- private
22
-
23
21
  # @return [Array<Sandbox::FileAccessor>] the file accessors for all the
24
22
  # specifications on their respective platform.
25
23
  #
@@ -29,6 +27,8 @@ module Pod
29
27
  end
30
28
  end
31
29
 
30
+ private
31
+
32
32
  # @return [Sandbox::PathList] The path list for this Pod.
33
33
  #
34
34
  def path_list
@@ -1108,7 +1108,7 @@ module Pod
1108
1108
  command += Fourflusher::SimControl.new.destination(:oldest, 'tvOS', deployment_target)
1109
1109
  when :visionos
1110
1110
  command += %w(CODE_SIGN_IDENTITY=- -sdk xrsimulator)
1111
- command += Fourflusher::SimControl.new.destination(:oldest, 'visionOS', deployment_target)
1111
+ command += Fourflusher::SimControl.new.destination(:oldest, 'xrOS', deployment_target)
1112
1112
  end
1113
1113
 
1114
1114
  if analyze
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.3
4
+ version: 1.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Duran
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2023-11-19 00:00:00.000000000 Z
14
+ date: 2024-01-28 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: cocoapods-core
@@ -19,14 +19,14 @@ dependencies:
19
19
  requirements:
20
20
  - - '='
21
21
  - !ruby/object:Gem::Version
22
- version: 1.14.3
22
+ version: 1.15.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 1.14.3
29
+ version: 1.15.0
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: claide
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -546,7 +546,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
546
546
  - !ruby/object:Gem::Version
547
547
  version: '0'
548
548
  requirements: []
549
- rubygems_version: 3.1.6
549
+ rubygems_version: 3.2.3
550
550
  signing_key:
551
551
  specification_version: 4
552
552
  summary: The Cocoa library package manager.