-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add a Target::BuildType to represent how a target is built #8232
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
Conversation
Here's an example of your CHANGELOG entry: * Add a Target::BuildType to represent how a target is built
[segiddins](https://github.com/segiddins)
[#issue_number](https://github.com/CocoaPods/CocoaPods/issues/issue_number) note: There are two invisible spaces after the entry's text. Generated by 🚫 Danger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is great 👍 👍
'Pods-Sample Extensions Project/Release/matryoshka-Bar-Foo', | ||
'Pods-Sample Extensions Project/Release/monkey', | ||
'Pods-Today Extension/Release/matryoshka-Bar', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how was this passing before? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great step forward! Thanks @segiddins!
spec/unit/target/build_settings/aggregate_target_settings_spec.rb
Outdated
Show resolved
Hide resolved
@@ -713,7 +726,7 @@ def specs | |||
@target.pod_targets.each { |pt| pt.spec_consumers.each { |sc| sc.stubs(:frameworks => %w(UIKit), :libraries => %w(z c++)) } } | |||
|
|||
@xcconfig = @generator.generate | |||
@xcconfig.to_hash['OTHER_LDFLAGS'].should == '$(inherited) -ObjC -l"c++" -l"z" -framework "UIKit"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is -ObjC gone?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because there are actually no pod targets, and thus no static binaries being linked!
@@ -117,6 +117,9 @@ def search_for_exceptions(exception) | |||
inspector = GhInspector::Inspector.new 'cocoapods', 'cocoapods' | |||
message_delegate = UserInterface::InspectorReporter.new | |||
inspector.search_exception exception, message_delegate | |||
rescue => e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we merge this in a different pr?
4f47830
to
183d6b4
Compare
whoohooooo |
@@ -211,7 +211,7 @@ def wire_target_dependencies(project, target_installation_results) | |||
# First, wire up all resource bundles. | |||
pod_target_installation_result.resource_bundle_targets.each do |resource_bundle_target| | |||
native_target.add_dependency(resource_bundle_target) | |||
if pod_target.requires_frameworks? && pod_target.should_build? | |||
if pod_target.build_as_dynamic_framework? && pod_target.should_build? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not the same as it used to be before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirmed that the static_framework pod with resources still works.
@@ -205,7 +205,7 @@ def save_as(path) | |||
|
|||
# @return [String] | |||
define_build_settings_method :code_sign_identity, :build_setting => true do | |||
return unless target.requires_frameworks? | |||
return unless target.build_as_dynamic? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, I think this is not the same as it used to be before
@@ -1022,7 +1024,7 @@ def other_swift_flags_without_swift? | |||
|
|||
# @return [Array<String>] | |||
define_build_settings_method :ld_runpath_search_paths, :build_setting => true, :memoized => true, :uniqued => true do | |||
return unless target.requires_frameworks? || any_vendored_dynamic_artifacts? | |||
return unless pod_targets.any?(&:build_as_dynamic?) || any_vendored_dynamic_artifacts? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
@paulb777 I think there are some entries here that are not the semantically the same as before. |
@@ -86,7 +86,7 @@ def install! | |||
end | |||
end | |||
|
|||
if target.requires_frameworks? | |||
if target.build_as_dynamic_framework? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same for this one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the old logic, but may need to change to eliminate warnings with the new build system.
This centralizes logic for static/dynamic library/framework in a single place, and will make future per-target configuration much easier.