Skip to content
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

Update comments/docs to indicate :skip will skip pch generation #412

Merged
merged 4 commits into from
Sep 27, 2017

Conversation

paulb777
Copy link
Member

Replacing #406 based on discussion at CocoaPods/CocoaPods#6815

The corresponding CocoaPods PR is CocoaPods/CocoaPods#7044

This PR does not change any Core functionality.

@paulb777 paulb777 changed the title Update commments/docs to indicate :skip will skip pch generation Update comments/docs to indicate :skip will skip pch generation Sep 24, 2017
#
# @example
#
# spec.prefix_header_file = 'iphone/include/prefix.pch'
# spec.prefix_header_file = ':skip'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should probably use a symbol instead of a string? Since :skip could very well be a valid file path

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or spec.prefix_header_file = false ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

false is good. Made that change. Thanks!

#
attribute :prefix_header_file,
:types => [TrueClass, FalseClass, String],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What will setting it to true do?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added true for symmetry with false. If it is set, it will behave the same as if the option is not set at all and the default CocoaPods pch file will be generated.

See this test: https://github.com/paulb777/CocoaPods/blob/68abbb06a4a2d5adf9c5ce6361fab78af60be8f5/spec/unit/installer/xcode/pods_project_generator/pod_target_installer_spec.rb#L412

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 but we should doc it

@@ -25,6 +25,12 @@ def requires_arc
attributes_hash['requires_arc']
end

# @return [Bool, String] The prefix_header_file value.
#
def prefix_header_file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this method is specified within root_attribute_accessor but within dsl.rb the declaration of of the attribute itself does not use root_attribute but rather attribute.

Is this the right place to include this method?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, but I modeled it after the requires_arc implementation which does the same thing.

@dnkoutso
Copy link
Contributor

Yea probably a mistake in #393...

I can make another PR to clean this up, but i think specification.rb is where you want to include the getter.

@dnkoutso
Copy link
Contributor

Gonna go ahead and merge this.

@dnkoutso dnkoutso merged commit 283ac03 into CocoaPods:master Sep 27, 2017
@dnkoutso
Copy link
Contributor

@paulb777 can you update the cocoapods PR? thank you!

@paulb777
Copy link
Member Author

Thanks @dnkoutso! CocoaPods/CocoaPods#7044 is now squashed, rebased and green.

@dnkoutso dnkoutso added this to the 1.4 milestone Oct 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants