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

Fix regression resulting in projects existing product refs being altered #429

Merged
merged 4 commits into from
Oct 14, 2016
Merged

Fix regression resulting in projects existing product refs being altered #429

merged 4 commits into from
Oct 14, 2016

Conversation

rasharab
Copy link
Contributor

@rasharab rasharab commented Oct 13, 2016

Buddybuild uses xcodeproj against thousands of xcode projects, and there are a few we’ve noticed issues with as a result of this commit:

36ad554 Fixes issue #409

The problem is that xcodeproj was actually significantly altering the structure of a project if it already has a product_ref_group defined and it wasn’t a “Products” main group.

This would resultantly lead to fatal failures when we attempt to build the project.

Buddybuild uses xcodeproj against thousands of xcode projects, and there are a few we’ve noticed issues with as a result of this commit:

36ad554 Fixes issue #409

The problem is that xcodeproj was actually significantly altering the structure of a project if it already has a product_ref_group defined and it wasn’t part of the “Products” main group.

This would resultantly lead to fatal failures when we attempt to build the project.
@alloy
Copy link
Member

alloy commented Oct 13, 2016

Thanks! Could you please add a test and a CHANGELOG entry?

@orta
Copy link
Member

orta commented Oct 13, 2016

Ah, nice one - I've seen a few error reports around this CocoaPods/CocoaPods#5847 I think is one still open - thanks!

@rasharab
Copy link
Contributor Author

Will do guys. :)
-Rashin

@rasharab
Copy link
Contributor Author

I've pushed the tests.
Waiting an interminable amount of time for the checks to go through...
Also, when this goes through, can we get a quick release. Our customers are being affected by this?


# Projects can have product_ref_groups that are not listed in the main_groups["Products"]
if root_object.product_ref_group.nil?
root_object.product_ref_group = root_object.main_group['Products'] || root_object.main_group.new_group('Products')
Copy link
Member

Choose a reason for hiding this comment

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

maybe root_object.product_ref_group ||= root_object.main_group['Products'] || root_object.main_group.new_group('Products') ?

Copy link
Contributor Author

@rasharab rasharab Oct 13, 2016

Choose a reason for hiding this comment

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

That works as well. I don't really have ties to either way.
I'll push a change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. :)
-Rashin

Copy link
Member

@endocrimes endocrimes left a comment

Choose a reason for hiding this comment

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

LGTM with CHANGELOG.md update

@@ -8,8 +8,9 @@

##### Bug Fixes

* None.

* Fix regression resulting in projecs existing product ref groups being altered
Copy link
Member

Choose a reason for hiding this comment

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

Please add two spaces to the end of the changelog entry (i.e * Fix regression resulting in projecs existing product ref groups being altered)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@segiddins
Copy link
Member

Thanks!

@segiddins segiddins merged commit d21b7d0 into CocoaPods:master Oct 14, 2016
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.

5 participants