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

Correctly set deployment target for non library specs even if the root spec does not specify one. #9153

Conversation

dnkoutso
Copy link
Contributor

@dnkoutso dnkoutso commented Sep 10, 2019

Deployment target for non library spec is explicitly used if one is specified, otherwise the code used to use the one from the parent spec. However, is it not guaranteed that the parent spec has a deployment target specified.

The analyzer sets a default deployment target if that is the case on the PodTarget itself. This PR ensures we use that if the deployment target for a non library spec is nil.

@dnkoutso dnkoutso added this to the 1.8.0 milestone Sep 10, 2019
@dnkoutso dnkoutso force-pushed the non_library_spec_deployment_target_edge_case branch from 2454bd8 to 5eefcf2 Compare September 10, 2019 00:12
@@ -753,6 +753,14 @@ module Pod
@pod_target.deployment_target_for_non_library_spec(@watermelon_spec.test_specs.first).to_s.should == '8.0'
@pod_target.deployment_target_for_non_library_spec(@watermelon_spec.app_specs.first).to_s.should == '8.0'
end

it 'returns the determined deployment target even if the podspec does not explicitly specify one' do
Copy link
Contributor Author

Choose a reason for hiding this comment

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

verified this goes red without my change.

@dnkoutso dnkoutso changed the title Correctly set deployment target for non library specs if the root does not specify one. Correctly set deployment target for non library specs even if the root spec does not specify one. Sep 10, 2019
@dnkoutso dnkoutso force-pushed the non_library_spec_deployment_target_edge_case branch from 5eefcf2 to 4160faf Compare September 10, 2019 00:38
CHANGELOG.md Outdated Show resolved Hide resolved
@dnkoutso dnkoutso force-pushed the non_library_spec_deployment_target_edge_case branch from 4160faf to a2d748d Compare September 10, 2019 00:46
@dnkoutso dnkoutso merged commit dcc702d into CocoaPods:1-8-stable Sep 10, 2019
@dnkoutso dnkoutso deleted the non_library_spec_deployment_target_edge_case branch September 10, 2019 00:55
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

2 participants