-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add support for preventing pch file generation #7044
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
The corresponding Core PR (docs only) is CocoaPods/Core#412 |
# @return [Boolean] Whether the target should build a pch file. | ||
# | ||
def skip_pch? | ||
target.file_accessors.any? { |file_accessor| file_accessor.prefix_header == ':skip' } |
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.
any reason to query each file accessor? I believe that method asks the spec itself which i think you have this information here.
I am only saying this because file accessors tend to be slow generally...
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.
You're right. Changed. Thanks!
Now requires CocoaPods/Core#412 to go green |
@@ -476,6 +503,19 @@ class PodsProjectGenerator | |||
] | |||
end | |||
|
|||
it 'verifies disabling prefix header generation' do |
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.
nit: same test name as the one above, unless this is a pattern across this file?
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.
yes, there's the same test name for within and without a scoped target
CHANGELOG.md
Outdated
@@ -45,6 +45,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` | |||
[paulb777](https://github.com/paulb777) | |||
[#6988](https://github.com/CocoaPods/CocoaPods/pull/6988) | |||
|
|||
* Add support for preventing pch file generation with the skip_pch podspec attribute |
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.
probably want to move up to the master section since 1.4.0.beta.1 shipped!
'BananaLib 8000 -Pods-SampleProject-prefix.pch', | ||
'BananaLib-Pods-SampleProject.xcconfig', | ||
] | ||
group.children.map(&:display_name).sort.should.not == [ |
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.
what does assertion actually check for in this specific test? I would imagine that there should be a .pch
file if the value is set to true
which is verified right above.
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.
The should
test should be sufficient since it is testing for an exact match of the list. Deleting the not
's
'BananaLib-Pods-SampleProject-dummy.m', | ||
'BananaLib-Pods-SampleProject.xcconfig', | ||
] | ||
group.children.map(&:display_name).sort.should.not == [ |
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.
maybe use should.not.include
?
'BananaLib-dummy.m', | ||
'BananaLib.xcconfig', | ||
] | ||
group.children.map(&:display_name).sort.should.not == [ |
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 should.not.include
?
|
Issue: #6815
See also CocoaPods/Core#406.
Prevent pch file generation with the skip_pch podspec attribute.
Address #1691 and #1746. More context at https://stackoverflow.com/questions/44401464/is-there-a-way-to-disable-the-default-pch-file-in-cocoapods