cocoapods 1.14.2 → 1.15.0

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: aebce0b6acfeff9509f8e7e4459bbc2d3a7f461f3d45b12625a2e28ca7da92ec
4
- data.tar.gz: 86160ae72acea2cd1bef9ea375b2d51626aee2f2ed52f2b1b6f0c28e376ddcf9
3
+ metadata.gz: 6e3dfaffc21d7b35657891ab5aa80c7ca89e1ebb09b551812262036d6969c4a0
4
+ data.tar.gz: ba969734f50b628ba4905eb8835288731cd6d8a5558534199e7d6d2418a5eebb
5
5
  SHA512:
6
- metadata.gz: 28c1f495bc99763dda3a09a0dac5060f3fc27811fb711c6476f5500f8ad460ed5f76c7c7ebf6a2815270979c9cb4557db3f41fc636c88f32463f31c63943802c
7
- data.tar.gz: 5e4392a61e2521846fd53cfdacc6080b1397b900c3fc20ef0ddc78a945528b4f2f51f26f3c3ba36bcc50f10bbfa70b4343750334c52d651c12559d2d98dc21f0
6
+ metadata.gz: 33a8b9e9815c9210a2e57eb19cb782aef7d4319e20a0fe0f3f69b697adb81cec51502f98b70aed3ae7eb2220d75a85eb15db0d1bd8828e9c4ba7e2d0452a10c1
7
+ data.tar.gz: 757db13273be7d182ad1e44e478c19386cc6c7b83ad0fcb04b76889a5761fd0709069359bceacddc9d8dde00942a6432257f311586e1c6cf0f394347e2544376
data/CHANGELOG.md CHANGED
@@ -4,6 +4,40 @@ 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
+
29
+ ## 1.14.3 (2023-11-19)
30
+
31
+ ##### Enhancements
32
+
33
+ * None.
34
+
35
+ ##### Bug Fixes
36
+
37
+ * Revert minimum required Ruby version to 2.6 to support macOS system Ruby
38
+ [Eric Amorde](https://github.com/amorde)
39
+ [#12122](https://github.com/CocoaPods/CocoaPods/issues/12122)
40
+
7
41
  ## 1.14.2 (2023-10-27)
8
42
 
9
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.2'.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.2
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-10-26 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.2
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.2
29
+ version: 1.15.0
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: claide
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -73,14 +73,20 @@ dependencies:
73
73
  requirements:
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: '2.0'
76
+ version: '2.1'
77
+ - - "<"
78
+ - !ruby/object:Gem::Version
79
+ version: '3.0'
77
80
  type: :runtime
78
81
  prerelease: false
79
82
  version_requirements: !ruby/object:Gem::Requirement
80
83
  requirements:
81
84
  - - ">="
82
85
  - !ruby/object:Gem::Version
83
- version: '2.0'
86
+ version: '2.1'
87
+ - - "<"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.0'
84
90
  - !ruby/object:Gem::Dependency
85
91
  name: cocoapods-plugins
86
92
  requirement: !ruby/object:Gem::Requirement
@@ -533,14 +539,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
533
539
  requirements:
534
540
  - - ">="
535
541
  - !ruby/object:Gem::Version
536
- version: '2.7'
542
+ version: '2.6'
537
543
  required_rubygems_version: !ruby/object:Gem::Requirement
538
544
  requirements:
539
545
  - - ">="
540
546
  - !ruby/object:Gem::Version
541
547
  version: '0'
542
548
  requirements: []
543
- rubygems_version: 3.1.6
549
+ rubygems_version: 3.2.3
544
550
  signing_key:
545
551
  specification_version: 4
546
552
  summary: The Cocoa library package manager.