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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default subspecs #128
Default subspecs #128
Conversation
# | ||
# The name of the subspec that should be used as preferred dependency. | ||
# An array of subspecs names that should be used as preferred dependency. |
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.
Line is too long. [81/80]
The singular form should continue working in a similar fashion to the other DSL attributes. |
I.e. just drop the deprecation. Ace work btw! |
@irrationalfab What should happen if you set both default_subspecs and default_subspec? Simply dropping 11445bc should be fine yes? |
The behaviour of the rest of the attributes when they are redeclared (a misuse of the DSL) is to replace the value. The patch looks really good, but it should be coherent with the rest of the attributes logic:
|
Yeah almost all of the 11445bc should be dropped. Note that I don't recall the reason why this is being done during the read instead of during the writing (which if I recall correctly used to be the case in the past). I need to recheck and change if appropriate, this might be relevant to the JSON conversion. /c @alloy |
Thanks for the pointers @irrationalfab. I'm trying to implement this now, however the boxing mechanism isn't working as I expected. My attribute looks like the following: attribute :default_subspecs, :container => Array, :singularize => true, :multi_platform => false Now, |
I don't recall if there is an exact reason for this (I refactored the Specification class so many times, consider it a strange hobby), but to get the boxing and all the rest of the logic the So to get the boxing something like |
@@ -377,7 +377,7 @@ module Pod | |||
spec.should.respond_to(attr.writer_name) | |||
end | |||
singularized.map { |attr| attr.name.to_s }.sort.should == %w( | |||
authors compiler_flags frameworks libraries preserve_paths | |||
authors compiler_flags default_subspecs frameworks libraries preserve_paths |
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.
Line is too long. [85/80]
Alright thanks for going over that. I noticed that there were no tests for the other singularised attributes in the way I was doing them. So i've removed these tests and updated the pull request. Take a look and tell me if there's anything else to add 馃憤. |
Closes CocoaPods#2099
Thanks for the support on this one @irrationalfab 馃憤. |
Ace! |
Default subspecs
馃嵒