Cocoapods: inhibit_all_warnings! breaks with Swift files in Xcode11 beta 4

Created on 18 Jul 2019  Â·  13Comments  Â·  Source: CocoaPods/CocoaPods

Report

What did you do?

Run pod install, tried to compile my project with Xcode 11 beta 4

What did you expect to happen?

The project compiles successfully

What happened instead?

I got a swift compilation error

<unknown>:0: error: unknown argument: '-w'
<unknown>:0: error: unknown argument: '-Xanalyzer'
<unknown>:0: error: unknown argument: '-analyzer-disable-all-checks'
Command CompileSwiftSources failed with a nonzero exit code

CocoaPods Environment

Podfile option inhibit_all_warnings! seems to be causing this, when applied to Swift files.

Project that demonstrates the issue

TODO: Create sample project. Should be easy: include pod Pulley with inhibit_all_warnings!
and try to build.

Note about a potential fix

Search for "-w -Xanalyzer -analyzer-disable-all-checks" (currently showing up in pod_target_installer.rb in my code base, but it could be outdated) for a clue as to where a fix needs to be worked in. These need to be skipped for Swift files. Potentially another solution for ignoring warnings in Swift code will need to be applied.

confirmed defect

Most helpful comment

Shipped with 1.7.5.

All 13 comments

Whats the way to inhibit warnings for Swift files? Definitely something we can fix.

Set this on the target:

SWIFT_SUPPRESS_WARNINGS = YES;

Has this been the case for Xcode 10? Sorry I do not know from the top of my head.

Was reading it wrong. We do not remove .swift files there.

PR is out.

Cool, thanks for the quick turnaround!

Shipped with 1.7.5.

:0: error: unknown argument: '-w' still exist

Please upload sample app that demonstrates the issue.

Shipped with 1.7.5.

Thank u. It works! Just use Cocoapods 1.7.5, then run pod install.

Same thing here with XCode11 beta 4. I'm sure is fairly replicable. Offending pods in my case are alamofire, kingfisher and hero.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spencerkohan picture spencerkohan  Â·  3Comments

sonu5 picture sonu5  Â·  3Comments

iosdev-republicofapps picture iosdev-republicofapps  Â·  3Comments

marzapower picture marzapower  Â·  3Comments

soleares picture soleares  Â·  3Comments