woshiccm / Pecker

CodePecker is a tool to detect unused Swift code.
MIT License
1.46k stars 63 forks source link

dyld: Library not loaded: @rpath/lib_InternalSwiftSyntaxParser.dylib #32

Closed funzin closed 4 years ago

funzin commented 4 years ago

Environment

When I was trying to debug pecker with xcode, the following error log was output, so it couldn't be executed

dyld: Library not loaded: @rpath/lib_InternalSwiftSyntaxParser.dylib
woshiccm commented 4 years ago

Install throw Cocopods?, I am working on this issue, maybe you can try install in the Manually way

funzin commented 4 years ago

Not install via cocoapods. I am interested in developing pecker and so I wanted to debug pecker on Xcode. I confirmed with the following procedure.

  1. git clone
  2. Open Pecker Folder on Xcode
  3. Run after fetching Swfit Package Dependencies
  4. console log is dyld: Library not loaded: @rpath/lib_InternalSwiftSyntaxParser.dylib
woshiccm commented 4 years ago

https://forums.swift.org/t/swiftsyntax-with-swift-5-1/29051
I have not encountered this problem, can you try this?

woshiccm commented 4 years ago

dyld: Library not loaded: @rpath/lib_InternalSwiftSyntaxParser.dylib Referenced from: /Users/ming/Library/Developer/Xcode/DerivedData/Pecker-cxxmigqparnqcoenqtjlhztablvl/Build/Products/Debug/pecker Reason: image not found

When I build I have the same issue, but still build success, So you can ignore it

funzin commented 4 years ago

but still build success, So you can ignore it

Certainly, I checked binary at .build/debug/pecker.

However, there is no change in the fact that Debugging cannot be done on Xcode. How do you develop pecker?(LLDB? or print debug?)

woshiccm commented 4 years ago

public func emit(message: String) { let filePath = "/Users/ming/Desktop/Testttt/Testttt/ViewController.swift" let line = 16 let column = 6 print("(filePath):(line):(column): warning: (message)") } You can set filePath you want, even don't set, add this to pecker for debug, print anything you want then

  1. make install
  2. create TestDemo and create Run Script Phase
  3. add /usr/local/bin/pecker, then build, will show the message as warning in Xcode
woshiccm commented 4 years ago

I don't know is this useful for you 😄

funzin commented 4 years ago

I see. I wanted to check with breakpoint on Xcode if possible😓 I will try it in the way of your suggestion.

junaid4058 commented 4 years ago

Could not integrate pecker in XCode 11.3 i did just like below https://github.com/woshiccm/Pecker#usage but i can't see any warnings as https://github.com/woshiccm/Pecker#pecker

woshiccm commented 4 years ago

@junaid4058 How do you install pecker? Cocopods?

MrRochito commented 4 years ago

this issue is still happening.