cocoapods 1.9.0.beta.2 → 1.9.0.beta.3

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: af00d9cda4270d38359bb91efda3e7eeadfa605dea256f99070cf72368bf4090
4
- data.tar.gz: cb5b627c35b676ea0a587ca0abf64e13ae33957d8406e228633ecae22550412f
3
+ metadata.gz: '090f2135af901aa68538da5553e60544a3a6426353296708272dfd57717bce8d'
4
+ data.tar.gz: 9d6a6cfa64727bce678f7c66b8b985f293c78fc0e3bd7d79b8d8c9b0d2a695a8
5
5
  SHA512:
6
- metadata.gz: ad1be879990e2150bf9d6f7dcfbba749ce76b3fde68c212f0e0de5751e3a3ebdd55a51d627bac1f5efbdf008580e8440978e63ac9a8bf30022fbd4bc87ce531a
7
- data.tar.gz: f545c4630dd73698f9d95664a1ee5acfef3cf83972b012696b0468b18cc5fda2b3596d2bbe1a34d0b77b4cbba0e6602496e933dd9adc14e80de566a6fc2a5ddc
6
+ metadata.gz: 64d5011e5653537b95d7d6e32843289b93f604d36b5fefce4d2b7bb14d7ac3dd0b0cf309ba9e530e2d58f9bc7e7fbb67a31659e0afcdc66782906a00f201f165
7
+ data.tar.gz: 94242285df5c8147d52e88c3b5e72e4993955ae6546550085c0a1e457dad67ec56372a36e3790f2d302ac191d3a974b7ae11bb7dcc89b4f5a643f325f6cf2437
data/CHANGELOG.md CHANGED
@@ -4,6 +4,40 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
4
4
 
5
5
  To install release candidates run `[sudo] gem install cocoapods --pre`
6
6
 
7
+ ## 1.9.0.beta.3 (2020-02-04)
8
+
9
+ ##### Enhancements
10
+
11
+ * PathList optimizations related to file system reads.
12
+ [manuyavuz](https://github.com/manuyavuz)
13
+ [#9428](https://github.com/CocoaPods/CocoaPods/pull/9428)
14
+
15
+ ##### Bug Fixes
16
+
17
+ * Apply Xcode 11 `XCTUnwrap` fix to library and framework targets.
18
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
19
+ [#9500](https://github.com/CocoaPods/CocoaPods/pull/9500)
20
+
21
+ * Fix resources script when building a project from a symlink.
22
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
23
+ [#9423](https://github.com/CocoaPods/CocoaPods/issues/9423)
24
+
25
+ * Fix `pod install` crash on projects with atypical configuration names.
26
+ [Paul Beusterien](https://github.com/paulb777)
27
+ [#9465](https://github.com/CocoaPods/CocoaPods/pull/9465)
28
+
29
+ * Fix an issue that caused iOS archives to be invalid when including a vendored XCFramework
30
+ [Eric Amorde](https://github.com/amorde)
31
+ [#9458](https://github.com/CocoaPods/CocoaPods/issues/9458)
32
+
33
+ * Fix a bug where an incremental install missed library resources.
34
+ [Igor Makarov](https://github.com/igor-makarov)
35
+ [#9431](https://github.com/CocoaPods/CocoaPods/pull/9431)
36
+
37
+ * Fix an issue that caused an incorrect warning to be emitted for CLI targets with static libraries
38
+ [Eric Amorde](https://github.com/amorde)
39
+ [#9498](https://github.com/CocoaPods/CocoaPods/issues/9498)
40
+
7
41
  ## 1.9.0.beta.2 (2019-12-17)
8
42
 
9
43
  ##### Enhancements
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the CocoaPods command line tool.
3
3
  #
4
- VERSION = '1.9.0.beta.2'.freeze unless defined? Pod::VERSION
4
+ VERSION = '1.9.0.beta.3'.freeze unless defined? Pod::VERSION
5
5
  end
@@ -216,7 +216,7 @@ EOS
216
216
  if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ]
217
217
  then
218
218
  # Find all other xcassets (this unfortunately includes those of path pods and other targets).
219
- OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
219
+ OTHER_XCASSETS=$(find -L "$PWD" -iname "*.xcassets" -type d)
220
220
  while read line; do
221
221
  if [[ $line != "${PODS_ROOT}*" ]]; then
222
222
  XCASSET_FILES+=("$line")
@@ -117,7 +117,7 @@ module Pod
117
117
  fi
118
118
 
119
119
  local record_artifact=${2:-true}
120
- local destination="${TARGET_BUILD_DIR}"
120
+ local destination="${CONFIGURATION_BUILD_DIR}"
121
121
 
122
122
  if [ -L "${source}" ]; then
123
123
  echo "Symlinked..."
@@ -334,15 +334,16 @@ module Pod
334
334
  #
335
335
  def analyze_host_targets_in_podfile(aggregate_targets, embedded_aggregate_targets)
336
336
  target_definitions_by_uuid = {}
337
- cli_host_with_frameworks = []
337
+ cli_host_with_dynamic_linkage = []
338
338
  cli_product_type = 'com.apple.product-type.tool'
339
339
  # Collect aggregate target definitions by uuid to later lookup host target
340
340
  # definitions and verify their compatibility with their embedded targets
341
341
  aggregate_targets.each do |target|
342
342
  target.user_targets.each do |user_target|
343
- target_definitions_by_uuid[user_target.uuid] = target.target_definition
344
- if user_target.product_type == cli_product_type
345
- cli_host_with_frameworks << user_target
343
+ target_definition = target.target_definition
344
+ target_definitions_by_uuid[user_target.uuid] = target_definition
345
+ if user_target.product_type == cli_product_type && target_definition.build_type.linkage == :dynamic
346
+ cli_host_with_dynamic_linkage << user_target
346
347
  end
347
348
  end
348
349
  end
@@ -368,10 +369,10 @@ module Pod
368
369
  end
369
370
  end
370
371
 
371
- unless cli_host_with_frameworks.empty?
372
- UI.warn "The Podfile contains command line tool target(s) (#{cli_host_with_frameworks.map(&:name).to_sentence}) which are attempting to integrate dynamic frameworks." \
372
+ unless cli_host_with_dynamic_linkage.empty?
373
+ UI.warn "The Podfile contains command line tool target(s) (#{cli_host_with_dynamic_linkage.map(&:name).to_sentence}) which are attempting to integrate dynamic frameworks or libraries." \
373
374
  "\n" \
374
- 'This may not behave as expected, because command line tools are usually distributed as a single binary and cannot contain their own dynamic frameworks.'
375
+ 'This may not behave as expected, because command line tools are usually distributed as a single binary and cannot contain their own dynamic dependencies.'
375
376
  end
376
377
 
377
378
  unless embedded_targets_missing_hosts.empty?
@@ -51,10 +51,13 @@ module Pod
51
51
  return :project if (other.key_hash.keys - key_hash.keys).any?
52
52
  return :project if other.key_hash['CHECKSUM'] != key_hash['CHECKSUM']
53
53
  return :project if other.key_hash['SPECS'] != key_hash['SPECS']
54
- return :project if other.key_hash['FILES'] != key_hash['FILES']
55
54
  return :project if other.key_hash['PROJECT_NAME'] != key_hash['PROJECT_NAME']
56
55
  end
57
56
 
57
+ this_files = key_hash['FILES']
58
+ other_files = other.key_hash['FILES']
59
+ return :project if this_files != other_files
60
+
58
61
  this_build_settings = key_hash['BUILD_SETTINGS_CHECKSUM']
59
62
  other_build_settings = other.key_hash['BUILD_SETTINGS_CHECKSUM']
60
63
  return :project if this_build_settings != other_build_settings
@@ -155,7 +158,14 @@ module Pod
155
158
  build_settings[configuration] = Digest::MD5.hexdigest(aggregate_target.build_settings(configuration).xcconfig.to_s)
156
159
  end
157
160
 
158
- TargetCacheKey.new(sandbox, :aggregate, 'BUILD_SETTINGS_CHECKSUM' => build_settings)
161
+ contents = {
162
+ 'BUILD_SETTINGS_CHECKSUM' => build_settings,
163
+ }
164
+ if aggregate_target.includes_resources?
165
+ relative_file_paths = aggregate_target.resource_paths_by_config.values.flatten.uniq
166
+ contents['FILES'] = relative_file_paths.sort_by(&:downcase)
167
+ end
168
+ TargetCacheKey.new(sandbox, :aggregate, contents)
159
169
  end
160
170
  end
161
171
  end
@@ -65,7 +65,10 @@ module Pod
65
65
  # @return [void]
66
66
  #
67
67
  def refresh_file_accessors
68
- file_accessors.map(&:path_list).uniq.each(&:read_file_system)
68
+ file_accessors.reject do |file_accessor|
69
+ pod_name = file_accessor.spec.name
70
+ sandbox.local?(pod_name)
71
+ end.map(&:path_list).uniq.each(&:read_file_system)
69
72
  end
70
73
 
71
74
  # Prepares the main groups to which all files will be added for the respective target
@@ -163,8 +163,10 @@ module Pod
163
163
  def remove_pod_target_xcconfig_overrides_from_target(build_settings_by_config, native_target)
164
164
  native_target.build_configurations.each do |configuration|
165
165
  build_settings = build_settings_by_config[target.user_build_configurations[configuration.name]]
166
- build_settings.merged_pod_target_xcconfigs.each_key do |setting|
167
- configuration.build_settings.delete(setting)
166
+ unless build_settings.nil?
167
+ build_settings.merged_pod_target_xcconfigs.each_key do |setting|
168
+ configuration.build_settings.delete(setting)
169
+ end
168
170
  end
169
171
  end
170
172
  end
@@ -51,12 +51,15 @@ module Pod
51
51
  unless root.exist?
52
52
  raise Informative, "Attempt to read non existent folder `#{root}`."
53
53
  end
54
-
55
54
  dirs = []
56
55
  files = []
57
56
  root_length = root.cleanpath.to_s.length + File::SEPARATOR.length
58
- Find.find(root.to_s) do |f|
57
+ escaped_root = escape_path_for_glob(root)
58
+ Dir.glob(escaped_root + '**/*', File::FNM_DOTMATCH).each do |f|
59
59
  directory = File.directory?(f)
60
+ # Ignore `.` and `..` directories
61
+ next if directory && f =~ /\.\.?$/
62
+
60
63
  f = f.slice(root_length, f.length - root_length)
61
64
  next if f.nil?
62
65
 
@@ -214,6 +217,25 @@ module Pod
214
217
  end
215
218
  end
216
219
 
220
+ # Escapes the glob metacharacters from a given path so it can used in
221
+ # Dir#glob and similar methods.
222
+ #
223
+ # @note See CocoaPods/CocoaPods#862.
224
+ #
225
+ # @param [String, Pathname] path
226
+ # The path to escape.
227
+ #
228
+ # @return [Pathname] The escaped path.
229
+ #
230
+ def escape_path_for_glob(path)
231
+ result = path.to_s
232
+ characters_to_escape = ['[', ']', '{', '}', '?', '*']
233
+ characters_to_escape.each do |character|
234
+ result.gsub!(character, "\\#{character}")
235
+ end
236
+ Pathname.new(result)
237
+ end
238
+
217
239
  #-----------------------------------------------------------------------#
218
240
  end
219
241
  end
@@ -492,9 +492,15 @@ module Pod
492
492
  attr_reader :test_xcconfig
493
493
  alias test_xcconfig? test_xcconfig
494
494
 
495
+ # @return [Boolean]
496
+ # whether settings are being generated for an application bundle
497
+ #
495
498
  attr_reader :app_xcconfig
496
499
  alias app_xcconfig? app_xcconfig
497
500
 
501
+ # @return [Boolean]
502
+ # whether settings are being generated for an library bundle
503
+ #
498
504
  attr_reader :library_xcconfig
499
505
  alias library_xcconfig? library_xcconfig
500
506
 
@@ -683,6 +689,12 @@ module Pod
683
689
  file_accessors.flat_map(&:vendored_xcframeworks).map { |path| Xcode::XCFramework.new(path) }
684
690
  end
685
691
 
692
+ # @return [Array<String>]
693
+ define_build_settings_method :system_framework_search_paths, :build_setting => true, :memoized => true, :sorted => true, :uniqued => true do
694
+ return ['$(PLATFORM_DIR)/Developer/usr/lib'] if should_apply_xctunwrap_fix?
695
+ []
696
+ end
697
+
686
698
  #-------------------------------------------------------------------------#
687
699
 
688
700
  # @!group Libraries
@@ -737,16 +749,18 @@ module Pod
737
749
 
738
750
  # @return [Array<String>]
739
751
  define_build_settings_method :library_search_paths, :build_setting => true, :memoized => true, :sorted => true, :uniqued => true do
740
- return [] if library_xcconfig? && target.build_as_static?
752
+ library_search_paths = should_apply_xctunwrap_fix? ? ['$(PLATFORM_DIR)/Developer/usr/lib'] : []
753
+ return library_search_paths if library_xcconfig? && target.build_as_static?
741
754
 
742
- vendored = library_search_paths_to_import.dup
743
- vendored.concat dependent_targets.flat_map { |pt| pt.build_settings[@configuration].vendored_dynamic_library_search_paths }
755
+ library_search_paths.concat library_search_paths_to_import.dup
756
+ library_search_paths.concat dependent_targets.flat_map { |pt| pt.build_settings[@configuration].vendored_dynamic_library_search_paths }
744
757
  if library_xcconfig?
745
- vendored.delete(target.configuration_build_dir(CONFIGURATION_BUILD_DIR_VARIABLE))
758
+ library_search_paths.delete(target.configuration_build_dir(CONFIGURATION_BUILD_DIR_VARIABLE))
746
759
  else
747
- vendored.concat(dependent_targets.flat_map { |pt| pt.build_settings[@configuration].library_search_paths_to_import })
760
+ library_search_paths.concat(dependent_targets.flat_map { |pt| pt.build_settings[@configuration].library_search_paths_to_import })
748
761
  end
749
- vendored
762
+
763
+ library_search_paths
750
764
  end
751
765
 
752
766
  # @return [Array<String>]
@@ -837,6 +851,7 @@ module Pod
837
851
  define_build_settings_method :swift_include_paths, :build_setting => true, :memoized => true, :sorted => true, :uniqued => true do
838
852
  paths = dependent_targets.flat_map { |pt| pt.build_settings[@configuration].swift_include_paths_to_import }
839
853
  paths.concat swift_include_paths_to_import if non_library_xcconfig?
854
+ paths.concat ['$(PLATFORM_DIR)/Developer/usr/lib'] if should_apply_xctunwrap_fix?
840
855
  paths
841
856
  end
842
857
 
@@ -966,6 +981,20 @@ module Pod
966
981
  end
967
982
  end
968
983
 
984
+ # Xcode 11 causes an issue with frameworks or libraries before 12.2 deployment target that link or are part of
985
+ # test bundles that use XCTUnwrap. Apple has provided an official work around for this.
986
+ #
987
+ # @see https://developer.apple.com/documentation/xcode_release_notes/xcode_11_release_notes
988
+ #
989
+ # @return [Boolean] Whether to apply the fix or not.
990
+ #
991
+ define_build_settings_method :should_apply_xctunwrap_fix?, :memoized => true do
992
+ library_xcconfig? &&
993
+ target.platform.name == :ios &&
994
+ Version.new(target.platform.deployment_target) < Version.new('12.2') &&
995
+ frameworks_to_import.include?('XCTest')
996
+ end
997
+
969
998
  #-------------------------------------------------------------------------#
970
999
  end
971
1000
 
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.9.0.beta.2
4
+ version: 1.9.0.beta.3
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: 2019-12-17 00:00:00.000000000 Z
14
+ date: 2020-02-04 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.9.0.beta.2
22
+ version: 1.9.0.beta.3
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.9.0.beta.2
29
+ version: 1.9.0.beta.3
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: claide
32
32
  requirement: !ruby/object:Gem::Requirement