Commit e87f697b authored by Samuel E. Giddins's avatar Samuel E. Giddins

Merge pull request #3769 from CocoaPods/seg-deduplicate

[Installer] Ensure no duplicate target deps are created
parents a9f5d195 cc93cc40
......@@ -14,7 +14,8 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[#2443](https://github.com/CocoaPods/CocoaPods/issues/2443)
* `Pods.xcodeproj` will now be written with deterministic UUIDs, vastly reducing
project churn and merge conflicts.
project churn and merge conflicts. This behavior can be disabled via the new
`COCOAPODS_DISABLE_DETERMINISTIC_UUIDS` environment variable.
[Samuel Giddins](https://github.com/segiddins)
* [`cocoapods-stats`](https://github.com/CocoaPods/cocoapods-stats)
......@@ -42,6 +43,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Samuel Giddins](https://github.com/segiddins)
[#3537](https://github.com/CocoaPods/CocoaPods/issues/3537)
* Ensure that no duplicate framework or target dependencies are created.
[Samuel Giddins](https://github.com/segiddins)
[#3763](https://github.com/CocoaPods/CocoaPods/issues/3763)
## 0.38.0.beta.1
......
......@@ -24,7 +24,7 @@ GIT
GIT
remote: https://github.com/CocoaPods/Xcodeproj.git
revision: e5d74992284d75e25b3a19d02a943133852f0a9f
revision: be12faf76853e46ca84767c890feda08415495db
branch: master
specs:
xcodeproj (0.26.0)
......
......@@ -20,6 +20,7 @@ module Pod
:clean => true,
:integrate_targets => true,
:deduplicate_targets => true,
:deterministic_uuids => ENV['COCOAPODS_DISABLE_DETERMINISTIC_UUIDS'].nil?,
:lock_pod_source => true,
:new_version_message => ENV['COCOAPODS_SKIP_UPDATE_MESSAGE'].nil?,
......@@ -95,6 +96,12 @@ module Pod
attr_accessor :deduplicate_targets
alias_method :deduplicate_targets?, :deduplicate_targets
# @return [Bool] Whether CocoaPods should give the pods project
# deterministic UUIDs.
#
attr_accessor :deterministic_uuids
alias_method :deterministic_uuids?, :deterministic_uuids
# @return [Bool] Whether the installer should skip the repos update.
#
attr_accessor :skip_repo_update
......
......@@ -626,7 +626,7 @@ module Pod
if pod_target.requires_frameworks?
product_ref = frameworks_group.files.find { |f| f.path == pod_dependency_target.product_name } ||
frameworks_group.new_product_ref_for_target(pod_dependency_target.product_basename, pod_dependency_target.product_type)
pod_target.native_target.frameworks_build_phase.add_file_reference(product_ref)
pod_target.native_target.frameworks_build_phase.add_file_reference(product_ref, true)
end
end
end
......@@ -644,7 +644,7 @@ module Pod
pods_project.development_pods.remove_from_project if pods_project.development_pods.empty?
pods_project.sort(:groups_position => :below)
pods_project.recreate_user_schemes(false)
pods_project.predictabilize_uuids
pods_project.predictabilize_uuids if config.deterministic_uuids?
pods_project.save
end
end
......
......@@ -126,7 +126,7 @@ module Pod
new_product_ref = frameworks.files.find { |f| f.path == target.product_name } ||
frameworks.new_product_ref_for_target(target_basename, target.product_type)
build_file = build_phase.build_file(new_product_ref) ||
build_phase.add_file_reference(new_product_ref)
build_phase.add_file_reference(new_product_ref, true)
if target.requires_frameworks?
# Weak link the aggregate target's product, because as it contains
# no symbols, it isn't copied into the app bundle. dyld will so
......
......@@ -153,9 +153,9 @@ module Pod
# depends.
#
def dependencies
spec_consumers.map do |consumer|
spec_consumers.flat_map do |consumer|
consumer.dependencies.map { |dep| Specification.root_name(dep.name) }
end.flatten
end.uniq
end
# Checks if the target should be included in the build configuration with
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment