-
Notifications
You must be signed in to change notification settings - Fork 352
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
[TargetDefinition] Allow specifying multiple subspec dependencies inline #234
Conversation
I am really glad about this, ARAnalytics ( and my upcoming NSURLRequests pod ) will be much nicer. |
I think we might need to document this in the |
##### Enhancements | ||
|
||
* Allow specifying multiple subspec pod dependencies inline in the Podfile, | ||
via `pod 'Pod', subspecs: ['Subspec1', 'Subspec2']`. |
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'd rather we use the hash rocket syntax in this CHANGELOG entry, we should stick to a consistent way of doing things in guides/examples etc as to not confuse our users who are not familiar with Ruby.
It might lead to people trying things like this:
pod 'Pod', subspecs: ['Subspec1', 'Subspec2'], :git => 'foo'
Nice work 👍, looks great. |
@@ -468,6 +468,7 @@ def set_platform(name, target = nil) | |||
# @return [void] | |||
# | |||
def store_pod(name, *requirements) | |||
parse_subspecs(name, requirements) # This parse method must be called first |
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.
Is that comment really needed? Won’t the tests indicate that this is needed?
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.
It's not 100% needed, but I feel it's better to write it down than make someone chase thru the tests next time around. The tests describe the desired end effect, the comment addresses the why.
Nice 👍 |
@@ -44,6 +44,33 @@ module Pod | |||
target.pod_whitelisted_for_configuration?('PonyDebugger', 'Debug').should.be.false | |||
end | |||
|
|||
it 'allows specifying multiple additional subspecs' do | |||
podfile = Podfile.new do | |||
pod 'RestKit', '~> 0.24.0', :subspecs => %w(CoreData Networking), :configurations => %w(Release) |
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.
With this implementation, this example shows that the root spec is also included.
pod 'RestKit', :subspecs => %w(CoreData Networking)
Expands into:
- RestKit
- RestKit/CoreData
- RestKit/Networking
I'm not sure if it makes sense to include the root spec when using :subspecs
since by default, the root spec should make the full library available unless their is alternative incompatible subspecs.
This means that this actually has no benefits for pods such as ARAnalytics since:
pod 'ARAnaytics', :subspecs => ['Crashlytics', 'Mixpanel']
Would actually install all the subspecs since all the default_subspecs from ARAnalytics is included (which is all of them if i'm not mistaken).
I've created a PR #236 to change it's behaviour.
[TargetDefinition] Don't include current dependency when using subspecs
[Podfile DSL] Document how subspecs can be included
Let's 🚢 ? |
[TargetDefinition] Allow specifying multiple subspec dependencies inline
🚢-ed |
…pendencies [TargetDefinition] Allow specifying multiple subspec dependencies inline
Closes #221.
\c @kylef @orta @alloy