woshiccm / Pecker

CodePecker is a tool to detect unused Swift code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Request: Cocoapods Support

noahsark769 opened this issue · comments

We currently install Swiftlint with Cocoapods, so it would be really nice to have Pecker support for Cocoapods as well. Currently the install process requires manually cloning the project, so it won't get installed automatically when new developers clone our repo. Another option could be to integrate the project as a Swift package - that technically might work now? I'm not sure how to integrate a Swift package for development and not build it into the app, though

commented

Will support as soon as possible

commented

Done, now you can install it by Cocoapods

Done, now you can install it by Cocoapods
你们编译可以吗
dyld: Library not loaded: @rpath/lib_InternalSwiftSyntaxParser.dylib

commented

My own test was successful

commented

@GesanTung Can you provide more details?Do you use version 0.0.11?

commented

@GesanTung What's Swift version? Lower than 5.0?

@GesanTung Can you provide more details?Do you use version 0.0.11?

Pecker pod version 0.0.11,Swift 5.0

image

commented

@GesanTung Thanks, I am working on this issue. It is a bug of SwiftSyntax, if you want to try it now, you can try the manual way temporarily.

commented

@GesanTung
https://forums.swift.org/t/swiftsyntax-with-swift-5-1/29051/13

"I think this is a bug (?) in Xcode where it's not putting one of the toolchain's library directories in the binary's rpath correctly. I don't know if there's a better way to workaround it, but I just end up putting a symlink to lib_InternalSwiftSyntaxParser.dylib in the same directory as the executable so it'll find it, and that sticks around unless I clean the build product directory."

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/lib_InternalSwiftSyntaxParser.dylib.