bignerdranch / Freddy

A reusable framework for parsing JSON in Swift.
MIT License
1.09k stars 119 forks source link

Unable to use Freddy inside Objective-C project #153

Closed riskpp closed 8 years ago

riskpp commented 8 years ago

Receiving error in compilation time

XCode Version 7.2.1

PodFile :

`source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' use_frameworks!

target 'Frtest' do pod 'Freddy' end`

While emitting SIL for 'decodeNumberPreDecimalDigits' at /Users/userName/Documents/Frtest/Pods/Freddy/Sources/JSONParser.swift:473:22

0 swift 0x000000010e881fbb llvm::sys::PrintStackTrace(__sFILE*) + 43 1 swift 0x000000010e8826fb SignalHandler(int) + 379 2 libsystem_platform.dylib 0x00007fff8b394eaa _sigtramp + 26 3 libsystem_platform.dylib 0x00007f9c54b3b380 _sigtramp + 3380241648 4 swift 0x000000010cb45835 swift::ASTVisitor<(anonymous namespace)::InitializationForPattern, void, void, void, std::__1::unique_ptr<swift::Lowering::Initialization, std::__1::default_delete<swift::Lowering::Initialization> >, void, void>::visit(swift::Pattern*) + 53 5 swift 0x000000010cb45835 swift::ASTVisitor<(anonymous namespace)::InitializationForPattern, void, void, void, std::__1::unique_ptr<swift::Lowering::Initialization, std::__1::default_delete<swift::Lowering::Initialization> >, void, void>::visit(swift::Pattern*) + 53 6 swift 0x000000010cb458df swift::ASTVisitor<(anonymous namespace)::InitializationForPattern, void, void, void, std::__1::unique_ptr<swift::Lowering::Initialization, std::__1::default_delete<swift::Lowering::Initialization> >, void, void>::visit(swift::Pattern*) + 223 7 swift 0x000000010cb45835 swift::ASTVisitor<(anonymous namespace)::InitializationForPattern, void, void, void, std::__1::unique_ptr<swift::Lowering::Initialization, std::__1::default_delete<swift::Lowering::Initialization> >, void, void>::visit(swift::Pattern*) + 53 8 swift 0x000000010cb45431 swift::Lowering::SILGenFunction::emitStmtCondition(llvm::MutableArrayRef<swift::StmtConditionElement>, swift::Lowering::JumpDest, swift::SILLocation) + 209 9 swift 0x000000010cb90f9f swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 1487 10 swift 0x000000010cb90b2b swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 347 11 swift 0x000000010cb909c5 swift::Lowering::SILGenFunction::emitStmt(swift::Stmt*) + 21 12 swift 0x000000010cb77ec9 swift::Lowering::SILGenFunction::emitSwitchStmt(swift::SwitchStmt*) + 2313 13 swift 0x000000010cb90b2b swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 347 14 swift 0x000000010cb91a82 swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 4274 15 swift 0x000000010cb90b2b swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 347 16 swift 0x000000010cb909c5 swift::Lowering::SILGenFunction::emitStmt(swift::Stmt*) + 21 17 swift 0x000000010cb6250b swift::Lowering::SILGenFunction::emitFunction(swift::FuncDecl*) + 331 18 swift 0x000000010cb1a45a swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*) + 474 19 swift 0x000000010cb95427 (anonymous namespace)::SILGenType::emitType() + 871 20 swift 0x000000010cb9504e swift::Lowering::SILGenModule::visitNominalTypeDecl(swift::NominalTypeDecl*) + 30 21 swift 0x000000010cb1dbdb swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*, unsigned int) + 779 22 swift 0x000000010cb1e790 swift::SILModule::constructSIL(swift::ModuleDecl*, swift::SILOptions&, swift::FileUnit*, llvm::Optional<unsigned int>, bool, bool) + 928 23 swift 0x000000010cb1eb3d swift::performSILGeneration(swift::FileUnit&, swift::SILOptions&, llvm::Optional<unsigned int>, bool) + 109 24 swift 0x000000010c972992 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 11442 25 swift 0x000000010c96fad3 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2691 26 swift 0x000000010c96c154 main + 2324 27 libdyld.dylib 0x00007fff945735ad start + 1

fabiomassimo commented 8 years ago

This PR #155 might fix the issue.

I'd suggest to create a local Podfile for Freddy (feel free to use the same of the PR) and point to it in your Podfile when including Freddy by using :podspec => annotation.

zwaldowski commented 8 years ago

I haven't been able to reproduce this. If you have the time, please check from master with #155 merged - we'll cut a release with that soon, likely.

riskpp commented 8 years ago

it is not reproducible for now. I suppose the reason was connected with not cleaned DerivedData