Pods fail to push when `code_coverage` is in test_spec scheme
paulb777 opened this issue · comments
Add unit_tests.scheme = { :code_coverage => true }
to a test_spec. Example at https://github.com/firebase/firebase-ios-sdk/blob/release-7.4/GoogleUtilities.podspec#L119
Then
[!] The Pod Specification did not pass validation.
The following validation failed:
- Warnings: Unrecognized `code_coverage` key for `scheme` attribute.
Here is a smaller example that reproduces it for me:
Pod::Spec.new do |s|
s.name = 'PaulTest'
s.version = '7.2.0'
s.summary = 'Google Utilities for iOS (plus community support for macOS and tvOS)'
s.description = <<-DESC
Internal Google Utilities including Network, Reachability Environment, Logger and Swizzling for
other Google CocoaPods. They're not intended for direct public usage.
DESC
s.homepage = 'https://github.com/firebase/firebase-ios-sdk/tree/master/GoogleUtilities'
s.license = { :type => 'Apache', :file => 'GoogleUtilities/LICENSE' }
s.authors = 'Google, Inc.'
s.source = {
:git => 'https://github.com/firebase/firebase-ios-sdk.git',
:tag => 'Utilities-' + s.version.to_s
}
s.ios.deployment_target = '9.0'
s.cocoapods_version = '>= 1.4.0'
s.prefix_header_file = false
s.pod_target_xcconfig = {
'GCC_C_LANGUAGE_STANDARD' => 'c99',
'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}"',
}
s.subspec 'Environment' do |es|
es.source_files = 'GoogleUtilities/Environment/**/*.[mh]'
es.public_header_files = 'GoogleUtilities/Environment/Public/GoogleUtilities/*.h'
es.dependency 'PromisesObjC', '~> 1.2'
end
s.test_spec 'unit' do |unit_tests|
unit_tests.scheme = { :code_coverage => true }
# All tests require arc except Tests/Network/third_party/GTMHTTPServer.m
unit_tests.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
unit_tests.source_files = [
'GoogleUtilities/Tests/Unit/**/*.[mh]',
'SharedTestUtilities/URLSession/*.[mh]',
]
unit_tests.requires_arc = 'GoogleUtilities/Tests/Unit/*/*.[mh]'
unit_tests.requires_app_host = true
unit_tests.dependency 'OCMock'
end
end
What's the output of pod env
from the CocoaPods you're pushing from?
$ bundle exec pod env
Stack
CocoaPods : 1.10.1
Ruby : ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin18]
RubyGems : 3.0.3
Host : macOS 11.0.1 (20B50)
Xcode : 12.0 (12A7209)
Git : git version 2.30.0.284.gd98b1dd5eaa7-goog
Ruby lib dir : /Users/paulbeusterien/.rbenv/versions/2.6.5/lib
Repositories : cocoapods - git - https://github.com/CocoaPods/Specs.git @ 4575cb90543a2c668da7d155cc575ce6547e6706
cpdc-internal-firebase - git - sso://cpdc-internal/firebase @ 9d12ce6e717ef4424ac85dbc16f5b5bc713ee86e
firebase - git - https://github.com/firebase/SpecsStaging.git @ ccd6d0c0d3a51cf0d3a9dc7dce25ac4da1a9d606
internal - git - sso://cpdc-internal/spec @ 1c0f276af8cb1b5badf2ae60d75208f0cd817ec9
staging - git - git@github.com:firebase/SpecsStaging.git @ ccd6d0c0d3a51cf0d3a9dc7dce25ac4da1a9d606
trunk - CDN - https://cdn.cocoapods.org/
Installation Source
Executable Path: /Users/paulbeusterien/gh8/firebase-ios-sdk/ruby/2.6.0/bin/pod
Plugins
claide-plugins : 0.9.2
cocoapods-deintegrate : 1.0.4
cocoapods-disable-podfile-validations : 0.1.1
cocoapods-generate : 2.0.1
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-trunk : 1.5.0
cocoapods-try : 1.2.0
From debugging, I discovered that the cocoapods-trunk
validation succeeds, but the response from https://trunk.cocoapods.org/api/v1/pods?allow_warnings=false
has the error.
How do I check that the version running at https://trunk.cocoapods.org
is the updated version with the 1.10.0 cocoapods-core dependency?
I have merged it here #295 back in Oct 2020, i wonder if its not deployed?
Fixed by deploying the latest trunk from #295 today