CocoaPods/CocoaPods

Swift Conversion Should Be Inhibited by inhibit_all_warnings!

Aperta

#8674 aperta il 3 apr 2019

 (8 commenti) (28 reazioni) (0 assegnatari)Ruby (2685 fork)batch import
d2:moderatehelp wantedt1:enhancement

Metriche repository

Star
 (14.815 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

🌈

Report

What did you do?

I opened my existing workspace with a new version of Xcode which included a new Swift version. (Xcode 10.2, Swift 5.0)

My Podfile includes inhibit_all_warnings!.

What did you expect to happen?

I expected that all warnings I saw would apply only to my app code and not to Pods.

What happened instead?

I was given warnings that Swift 5 conversion was available for Pod projects.

Request

Manually marking those targets as "Don't Remind Me" with Xcode results in the following changes in my project file:

/* Begin PBXProject section */
		BFDFE7DC352907FC980B868725387E98 /* Project object */ = {
			isa = PBXProject;
			attributes = {
				LastSwiftUpdateCheck = 0930;
				LastUpgradeCheck = 0930;
				TargetAttributes = {
					3B89420BB3D74AD2DCF0D76DA7C98D30 = {
						LastSwiftMigration = 1020;
					};
					72AC8D674DF3E00D18AF01E060D70EBC = {
						LastSwiftMigration = 1020;
					};
					AFD3EF90CF874B6247EE8C79F6BF3B5D = {
						LastSwiftMigration = 1020;
					};
				};
			};

If you could generate the Pods project with ALL targets marked with LastSwiftMigration = 9999; then I'd never be asked to migrate the Swift version of Pods targets. And then this occasional warning would also be suppressed by inhibit_all_warnings!. 🌈

CocoaPods Environment

Stack

   CocoaPods : 1.6.1
        Ruby : ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-darwin18]
    RubyGems : 3.0.2
        Host : Mac OS X 10.14.3 (18D109)
       Xcode : 10.2 (10E125)
         Git : git version 2.20.1
Ruby lib dir : /usr/local/Cellar/ruby/2.6.1/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ c04d675f6a80a93b03a264e0811dd862bf0c8e9b

Installation Source

Executable Path: /Users/path/to/redacted/vendor/bundle/ruby/2.6.0/bin/pod

Plugins

cocoapods-acknowledgements : 1.1.3
cocoapods-deintegrate      : 1.0.3
cocoapods-plugins          : 1.0.0
cocoapods-search           : 1.0.0
cocoapods-stats            : 1.1.0
cocoapods-trunk            : 1.3.1
cocoapods-try              : 1.1.0

Podfile

# Uncomment this line to define a global platform for your project
 platform :ios, '11.2'

# ignore all warnings from all pods
inhibit_all_warnings!

target 'Redacted' do
  use_frameworks!

  # Pods for Redacted
  pod 'Crashlytics', '3.8.3'
  pod 'Fabric', '1.6.10'

  target 'RedactedTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'RedactedIntegrationTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'RedactedUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

plugin 'cocoapods-acknowledgements'

Guida contributor