cocoapods 1.11.2 → 1.11.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: 931de41ff6f73552f6df94fe1f181116e93e675d3ea19455ac9487916c398bb5
4
- data.tar.gz: e003ee69f4eb100152140a48685d9da44f48adb2081ff0fa1174a209efdd5d74
3
+ metadata.gz: aae7ed73ff99d6f5553364df8d34c4a26cc9825bd41ee3a59cb7b8d86f290197
4
+ data.tar.gz: a439077432771a732ad842f4d9c42c147eeebace664c6a4766bf922a91c8dd6b
5
5
  SHA512:
6
- metadata.gz: bc23958f427a0bcccdc959d7a92e3f50e6ff40fb5e4d34c8a6d25b678baa082aa300d70a2c8e0e99d32372cd1c2a87ae1d128571edd6aaa57ca76072d7baa617
7
- data.tar.gz: a5379c8993a55018a63fc95167380691f2e3c3ed5ae9ba0ca53974064cd30606ff098b5b79a2f06d3ac81bb763aa9ca9ba499756461785be1955a54a917cf421
6
+ metadata.gz: 61a5beb8911ca4a8fe200421d757187f0c70f3b30ec3b00712dd32627a9749797a6e693c385163844b78f15bee2f7a686f9faac83a5a83713d69c9c1b61574fe
7
+ data.tar.gz: a55f30e798efa79abb3f0a7bf103d30cec767661f95b9fe8ef8ff72413bc191b2a5d558f2819ebe6ef7c9f85d029d57dd9bbf1274cfdf34d171399981311b140
data/CHANGELOG.md CHANGED
@@ -4,6 +4,39 @@ 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.11.3 (2022-03-16)
8
+
9
+ ##### Enhancements
10
+
11
+ * None.
12
+
13
+ ##### Bug Fixes
14
+
15
+ * Fix script breaking when attempting to print a warning.
16
+ [Igor Makarov](https://github.com/igor-makarov)
17
+ [#11251](https://github.com/CocoaPods/CocoaPods/issues/11251)
18
+
19
+ * Do not consider podspec_repo when analying sandbox for changes.
20
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
21
+ [#10985](https://github.com/CocoaPods/CocoaPods/pull/10985)
22
+
23
+ * Rewrite XCFramework slice selection using plist metadata.
24
+ [Igor Makarov](https://github.com/igor-makarov)
25
+ [#11229](https://github.com/CocoaPods/CocoaPods/pull/11229)
26
+
27
+ * Fix setting `LD_RUNTIME_SEARCH_PATHS` for aggregate targets that include dynamic xcframeworks.
28
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
29
+ [#11158](https://github.com/CocoaPods/CocoaPods/pull/11158)
30
+
31
+ * Add catch for YAML syntax error to prevent crash in `cdn_url?` check.
32
+ [Kanstantsin Shautsou](https://github.com/KostyaSha)
33
+ [#11010](https://github.com/CocoaPods/CocoaPods/issues/11010)
34
+
35
+ * Fix static Swift XCFramework import paths.
36
+ [Igor Makarov](https://github.com/igor-makarov)
37
+ [#11058](https://github.com/CocoaPods/CocoaPods/issues/10058)
38
+ [#11093](https://github.com/CocoaPods/CocoaPods/pull/11093)
39
+
7
40
  ## 1.11.2 (2021-09-13)
8
41
 
9
42
  ##### Enhancements
@@ -17,7 +50,7 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
17
50
  [#10912](https://github.com/CocoaPods/CocoaPods/issues/10912)
18
51
 
19
52
 
20
- ## 1.11.1 (2021-09-13)
53
+ ## 1.11.1 (2021-09-12)
21
54
 
22
55
  ##### Enhancements
23
56
 
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the CocoaPods command line tool.
3
3
  #
4
- VERSION = '1.11.2'.freeze unless defined? Pod::VERSION
4
+ VERSION = '1.11.3'.freeze unless defined? Pod::VERSION
5
5
  end
@@ -64,6 +64,10 @@ module Pod
64
64
 
65
65
  #{Pod::Generator::ScriptPhaseConstants::RSYNC_PROTECT_TMP_FILES}
66
66
 
67
+ #{variant_for_slice}
68
+
69
+ #{archs_for_slice}
70
+
67
71
  copy_dir()
68
72
  {
69
73
  local source="$1"
@@ -77,7 +81,9 @@ copy_dir()
77
81
  SELECT_SLICE_RETVAL=""
78
82
 
79
83
  select_slice() {
80
- local paths=("$@")
84
+ local xcframework_name="$1"
85
+ xcframework_name="${xcframework_name##*/}"
86
+ local paths=("${@:2}")
81
87
  # Locate the correct slice of the .xcframework for the current architectures
82
88
  local target_path=""
83
89
 
@@ -93,29 +99,15 @@ select_slice() {
93
99
  fi
94
100
  for i in ${!paths[@]}; do
95
101
  local matched_all_archs="1"
96
- for target_arch in $target_archs
97
- do
98
- if ! [[ "${paths[$i]}" == *"$target_variant"* ]]; then
102
+ local slice_archs="$(archs_for_slice "${xcframework_name}/${paths[$i]}")"
103
+ local slice_variant="$(variant_for_slice "${xcframework_name}/${paths[$i]}")"
104
+ for target_arch in $target_archs; do
105
+ if ! [[ "${slice_variant}" == "$target_variant" ]]; then
99
106
  matched_all_archs="0"
100
107
  break
101
108
  fi
102
109
 
103
- # Verifies that the path contains the variant string (simulator or maccatalyst) if the variant is set.
104
- if [[ -z "$target_variant" && ("${paths[$i]}" == *"simulator"* || "${paths[$i]}" == *"maccatalyst"*) ]]; then
105
- matched_all_archs="0"
106
- break
107
- fi
108
-
109
- # This regex matches all possible variants of the arch in the folder name:
110
- # Let's say the folder name is: ios-armv7_armv7s_arm64_arm64e/CoconutLib.framework
111
- # We match the following: -armv7_, _armv7s_, _arm64_ and _arm64e/.
112
- # If we have a specific variant: ios-i386_x86_64-simulator/CoconutLib.framework
113
- # We match the following: -i386_ and _x86_64-
114
- # When the .xcframework wraps a static library, the folder name does not include
115
- # any .framework. In that case, the folder name can be: ios-arm64_armv7
116
- # We also match _armv7$ to handle that case.
117
- local target_arch_regex="[_\\-]${target_arch}([\\/_\\-]|$)"
118
- if ! [[ "${paths[$i]}" =~ $target_arch_regex ]]; then
110
+ if ! echo "${slice_archs}" | tr " " "\\n" | grep -F -q -x "$target_arch"; then
119
111
  matched_all_archs="0"
120
112
  break
121
113
  fi
@@ -137,10 +129,10 @@ install_xcframework() {
137
129
  local paths=("${@:4}")
138
130
 
139
131
  # Locate the correct slice of the .xcframework for the current architectures
140
- select_slice "${paths[@]}"
132
+ select_slice "${basepath}" "${paths[@]}"
141
133
  local target_path="$SELECT_SLICE_RETVAL"
142
134
  if [[ -z "$target_path" ]]; then
143
- echo "warning: [CP] Unable to find matching .xcframework slice in '${paths[@]}' for the current build architectures ($ARCHS)."
135
+ echo "warning: [CP] $(basename ${basepath}): Unable to find matching slice in '${paths[@]}' for the current build architectures ($ARCHS) and platform (${EFFECTIVE_PLATFORM_NAME-${PLATFORM_NAME}})."
144
136
  return
145
137
  fi
146
138
  local source="$basepath/$target_path"
@@ -183,6 +175,40 @@ install_xcframework() {
183
175
  args.join(' ')
184
176
  end
185
177
 
178
+ def variant_for_slice
179
+ script = ''
180
+ script << "variant_for_slice()\n"
181
+ script << "{\n"
182
+ script << " case \"$1\" in\n"
183
+ xcframeworks.each do |xcframework|
184
+ root = xcframework.path
185
+ xcframework.slices.each do |slice|
186
+ script << " #{shell_escape(root.basename.join(slice.path.dirname.relative_path_from(root)))})\n"
187
+ script << " echo \"#{slice.platform_variant}\"\n"
188
+ script << " ;;\n"
189
+ end
190
+ end
191
+ script << " esac\n"
192
+ script << '}'
193
+ end
194
+
195
+ def archs_for_slice
196
+ script = ''
197
+ script << "archs_for_slice()\n"
198
+ script << "{\n"
199
+ script << " case \"$1\" in\n"
200
+ xcframeworks.each do |xcframework|
201
+ root = xcframework.path
202
+ xcframework.slices.each do |slice|
203
+ script << " #{shell_escape(root.basename.join(slice.path.dirname.relative_path_from(root)))})\n"
204
+ script << " echo \"#{slice.supported_archs.sort.join(' ')}\"\n"
205
+ script << " ;;\n"
206
+ end
207
+ end
208
+ script << " esac\n"
209
+ script << '}'
210
+ end
211
+
186
212
  class << self
187
213
  # @param [Pathname] xcframework_path
188
214
  # the base path of the .xcframework bundle
@@ -145,7 +145,8 @@ module Pod
145
145
  return true if spec.version != sandbox_version(pod)
146
146
  return true if spec.checksum != sandbox_checksum(pod)
147
147
  return true if resolved_spec_names(pod) != sandbox_spec_names(pod)
148
- return true if podfile_dependency(pod) != sandbox_dependency(pod)
148
+ podfile_dep = podfile_dependency(pod)&.tap { |dep| dep.podspec_repo = nil }
149
+ return true if podfile_dep != sandbox_dependency(pod)
149
150
  return true if sandbox.predownloaded?(pod)
150
151
  return true if folder_empty?(pod)
151
152
  false
@@ -125,7 +125,7 @@ module Pod
125
125
  validate_platforms(resolver_specs_by_target)
126
126
  specifications = generate_specifications(resolver_specs_by_target)
127
127
  aggregate_targets, pod_targets = generate_targets(resolver_specs_by_target, target_inspections)
128
- sandbox_state = generate_sandbox_state(specifications)
128
+ sandbox_state = generate_sandbox_state(specifications)
129
129
  specs_by_target = resolver_specs_by_target.each_with_object({}) do |rspecs_by_target, hash|
130
130
  hash[rspecs_by_target[0]] = rspecs_by_target[1].map(&:spec)
131
131
  end
@@ -179,7 +179,7 @@ module Pod
179
179
  end
180
180
  end
181
181
 
182
- # @return [Array<Pathname>] The paths of the dynamic xcframework bundles
182
+ # @return [Array<Pathname>] The paths of the static xcframework bundles
183
183
  # that come shipped with the Pod.
184
184
  #
185
185
  def vendored_static_xcframeworks
@@ -188,6 +188,15 @@ module Pod
188
188
  end
189
189
  end
190
190
 
191
+ # @return [Array<Pathname>] The paths of the dynamic xcframework bundles
192
+ # that come shipped with the Pod.
193
+ #
194
+ def vendored_dynamic_xcframeworks
195
+ vendored_xcframeworks.select do |path|
196
+ Xcode::XCFramework.new(spec.name, path).build_type == BuildType.dynamic_framework
197
+ end
198
+ end
199
+
191
200
  # @return [Array<Pathname>] The paths of the static (fake) framework
192
201
  # bundles that come shipped with the Pod.
193
202
  #
@@ -86,7 +86,7 @@ module Pod
86
86
  response = OpenURI.open_uri(url.chomp('/') + '/CocoaPods-version.yml', uri_options)
87
87
  response_hash = YAML.load(response.read) # rubocop:disable Security/YAMLLoad
88
88
  response_hash.is_a?(Hash) && !Source::Metadata.new(response_hash).latest_cocoapods_version.nil?
89
- rescue ::OpenURI::HTTPError, SocketError
89
+ rescue Psych::SyntaxError, ::OpenURI::HTTPError, SocketError
90
90
  return false
91
91
  rescue => e
92
92
  raise Informative, "Couldn't determine repo type for URL: `#{url}`: #{e}"
@@ -938,6 +938,8 @@ module Pod
938
938
  define_build_settings_method :swift_include_paths, :build_setting => true, :memoized => true, :sorted => true, :uniqued => true do
939
939
  paths = dependent_targets.flat_map { |pt| pt.build_settings[@configuration].swift_include_paths_to_import }
940
940
  paths.concat swift_include_paths_to_import if non_library_xcconfig?
941
+ vendored_static_library_search_paths = dependent_targets.flat_map { |pt| pt.build_settings[@configuration].vendored_static_library_search_paths }
942
+ paths.concat vendored_static_library_search_paths
941
943
  paths.concat ['$(PLATFORM_DIR)/Developer/usr/lib'] if should_apply_xctunwrap_fix?
942
944
  paths
943
945
  end
@@ -1283,7 +1285,7 @@ module Pod
1283
1285
  define_build_settings_method :any_vendored_dynamic_artifacts?, :memoized => true do
1284
1286
  pod_targets.any? do |pt|
1285
1287
  pt.file_accessors.any? do |fa|
1286
- !fa.vendored_dynamic_artifacts.empty?
1288
+ !fa.vendored_dynamic_artifacts.empty? || !fa.vendored_dynamic_xcframeworks.empty?
1287
1289
  end
1288
1290
  end
1289
1291
  end
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.11.2
4
+ version: 1.11.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: 2021-09-13 00:00:00.000000000 Z
14
+ date: 2022-03-15 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.11.2
22
+ version: 1.11.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.11.2
29
+ version: 1.11.3
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: claide
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -545,7 +545,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
545
545
  - !ruby/object:Gem::Version
546
546
  version: '0'
547
547
  requirements: []
548
- rubygems_version: 3.0.9
548
+ rubygems_version: 3.1.6
549
549
  signing_key:
550
550
  specification_version: 4
551
551
  summary: The Cocoa library package manager.