Bertrand/handlebars-objc

Lex error when including `inhibit_all_warnings!` in Podfile

mbrgm opened this issue · 3 comments

When I Include inhibit_all_warnings! in my Podfile, I get a lex error on the handlebars-objc.lm file. This issue does not appear when I do not suppress the warnings.

Lex handlebars-objc/src/handlebars-objc/parser/handlebars-objc.lm
    cd /Users/mabbl/dev/projects/fortyip-ios/Pods
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lex -w -Xanalyzer -analyzer-disable-checker -o/Users/mabbl/Library/Developer/Xcode/DerivedData/fortyip-gxpqkofbpwiavrgdrxjrswfekilx/Build/Intermediates/Pods.build/Debug-iphoneos/Pods-handlebars-objc.build/DerivedSources/handlebars-objc.yy.m /Users/mabbl/dev/projects/fortyip-ios/Pods/handlebars-objc/src/handlebars-objc/parser/handlebars-objc.lm

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/flex: Unrecognized option `a'
Try `flex --help' for more information.
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lex failed with exit code 1

Hello. Sorry for the long delay.
I'm able to reproduce your issue. So far, it looks like a bug in cocoapod. I'll try to understand it later.
In the meantime, I fear you have to disable inhibit_all_warnings

Same here. Definitely look like bug in Cocoapods.
If you take a look in the "Build Phase" of Pods-handlebars-objc, you'll see Cocoapods applied the "no-warnings" flags to the .lm and .ym files, which makes no sense.

wrong flags in build phase

It's possible to fix the bug without removing inhibit_all_warnings! from the Podfile by removing the flags on these two files. I guess cocoapods will override the modification on the next pod install/update though.

Should be fixed in 1.4.3