8000 Fix incremental installation with plugins that include arguments with different ordering. by dnkoutso · Pull Request #9170 · CocoaPods/CocoaPods · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix incremental installation with plugins that include arguments with different ordering. #9170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`

##### Bug Fixes

* Fix incremental installation with plugins that include arguments with different ordering.
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#9170](https://github.com/CocoaPods/CocoaPods/pull/9170)

* Move custom `Copy Headers` script phase for header mappings before `Compile Sources`.
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#9131](https://github.com/CocoaPods/CocoaPods/pull/9131)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def analyze
# Bail out early since these properties affect all targets and their associate projects.
if cache.build_configurations != build_configurations ||
cache.project_object_version != project_object_version ||
cache.podfile_plugins != podfile_plugins
YAMLHelper.convert(cache.podfile_plugins) != YAMLHelper.convert(podfile_plugins)
UI.message 'Ignoring project cache due to project configuration changes.'
return full_install_results
end
Expand Down
12 changes: 12 additions & 0 deletions spec/unit/installer/project_cache/project_cache_analyzer_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
require 'cocoapods/installer/project_cache/target_cache_key.rb'

module Pod
class Installer
Expand Down Expand Up @@ -82,6 +83,17 @@ module ProjectCache
result.aggregate_targets_to_generate.should.equal([@main_aggregate_target])
end

it 'returns empty list when comparing plugins with different ordering of arguments' do
cache_key_by_pod_target_labels = Hash[@pod_targets.map { |pod_target| [pod_target.label, TargetCacheKey.from_pod_target(@sandbox, pod_target)] }]
cache_key_by_aggregate_target_labels = { @main_aggregate_target.label => TargetCacheKey.from_aggregate_target(@sandbox, @main_aggregate_target) }
cache_key_target_labels = cache_key_by_pod_target_labels.merge(cache_key_by_aggregate_target_labels)
cache = ProjectInstallationCache.new(cache_key_target_labels, @build_configurations, @project_object_version, 'my-plugins' => %w[B A])
analyzer = ProjectCacheAnalyzer.new(@sandbox, cache, @build_configurations, @project_object_version, { 'my-plugins' => %w[A B] }, @pod_targets, [@main_aggregate_target])
result = analyzer.analyze
result.pod_targets_to_generate.should.equal([])
result.aggregate_targets_to_generate.should.equal(nil)
end

it 'returns all pod targets and aggregate targets if the list of podfile plugins params changed' do
cache_key_by_pod_target_labels = Hash[@pod_targets.map { |pod_target| [pod_target.label, TargetCacheKey.from_pod_target(@sandbox, pod_target)] }]
cache_key_by_aggregate_target_labels = { @main_aggregate_target.label => TargetCacheKey.from_aggregate_target(@sandbox, @main_aggregate_target) }
Expand Down
0