Pecker icon indicating copy to clipboard operation
Pecker copied to clipboard

Could not see any warning in Xcode 11.3

Open junaid4058 opened this issue 4 years ago • 24 comments

I can't see any warning what https://github.com/woshiccm/Pecker#pecker is showing. I did as below: https://github.com/woshiccm/Pecker#pecker

junaid4058 avatar Dec 19 '19 05:12 junaid4058

How do you install pecker? CocoPods?

woshiccm avatar Dec 19 '19 05:12 woshiccm

I have the same issue. I used brew.

hodovani avatar Dec 20 '19 11:12 hodovani

I will improve log, maybe find index failed

woshiccm avatar Dec 20 '19 11:12 woshiccm

@hodovani can you open the follow path? ~/Library/Developer/Xcode/DerivedData/{your project}/Index/DataStore

woshiccm avatar Dec 20 '19 11:12 woshiccm

Have you ever execute defaults write com.apple.dt.Xcode IDEIndexDisable 1?

woshiccm avatar Dec 20 '19 11:12 woshiccm

@junaid4058 @hodovani Add make sure you are using the right method If you Install through CocoaPods, add the following script

${PODS_ROOT}/Pecker/bin/pecker

Other way install, add the following script

if which pecker >/dev/null; then
  pecker
else
  echo "warning: Pecker not installed, download from https://github.com/woshiccm/Pecker"
fi

woshiccm avatar Dec 20 '19 11:12 woshiccm

@hodovani can you open the follow path? ~/Library/Developer/Xcode/DerivedData/{your project}/Index/DataStore

Yes, I can. I added your script to my main target as you described in Readme

hodovani avatar Dec 20 '19 12:12 hodovani

I tried to run it terminal in project folder, but it didn't give me any warn.

hodovani avatar Dec 20 '19 12:12 hodovani

If you want run in terminal, pls do as follow pecker -i , and you need set report as json and set output_file in pecker.result.json, it's complex.

Suggest integrate Pecker into an Xcode, because this way will automatically found your project index path

woshiccm avatar Dec 20 '19 14:12 woshiccm

@hodovani Could you show me a screenshot of the script you added to your project?

woshiccm avatar Dec 20 '19 14:12 woshiccm

You can also connect me on Twitter, Twitter is more convenient for communication

woshiccm avatar Dec 20 '19 15:12 woshiccm

I had the same issue and think this PR should fix it: https://github.com/woshiccm/Pecker/pull/38

rastersize avatar Dec 20 '19 21:12 rastersize

@rastersize Good job

woshiccm avatar Dec 21 '19 03:12 woshiccm

@hodovani I had added Terminal usage to README, and I test successed, you can try again, the version is 0.0.12

woshiccm avatar Dec 21 '19 09:12 woshiccm

@woshiccm I am just curious, cannot Xcode detect unused code? Why we need Pecker? In Android Studio, IntelliJ IDEA they detect unused code.

kaushalyap avatar Dec 26 '19 05:12 kaushalyap

@kaushalyap Xcode did, but only same case, such as variables defined in the function body, more often it is difficult to judge, so pecker have so many configurations to prevent judgment false.

woshiccm avatar Dec 26 '19 06:12 woshiccm

@kaushalyap Xcode did, but only same case, such as variables defined in the function body, more often it is difficult to judge, so pecker have so many configurations to prevent judgment false.

It seems to me that XCode is not doing a good job like Android Studio, IntelliJ IDEA.

kaushalyap avatar Dec 26 '19 10:12 kaushalyap

I'm on macOS 10.15.3, Xcode 11.4 Beta 3 and I don't see anything output on neither Xcode nor Terminal but that seems to be because of the SwiftSyntax error mentioned right at the beginning of the README file. Unfortunately pecker doesn't output any errors (per #19) so one thing I can suggest here to folks having no results is to prefix the pecker command with DYLD_PRINT_RPATHS=1, it made clear to me what's going on:

RPATH failed expanding     @rpath/lib_InternalSwiftSyntaxParser.dylib to: /usr/lib/swift/lib_InternalSwiftSyntaxParser.dylib
RPATH failed expanding     @rpath/lib_InternalSwiftSyntaxParser.dylib to: /usr/local/Cellar/pecker/0.1.0/bin/lib_InternalSwiftSyntaxParser.dylib

Before doing that, I've also tried to run the Pecker project straight from Xcode, which printed the lib_InternalSwiftSyntaxParser.dylib error to the console, but I don't know which build flags SPM uses when running from Xcode, the Makefile ones are explicit so I could try a couple different things there iterating on make installs and running with DYLD_PRINT_RPATHS=1. No solution yet, unfortunately.

By the way, SwiftLint is trying to solve the same issue on their repo, I'd suggest to follow their PR as they may find a solution any time soon: https://github.com/realm/SwiftLint/pull/3108

gobetti avatar Mar 08 '20 05:03 gobetti

Any news?

macOS 10.15.4 Xcode 11.4 method: brew

Stops right after run, with no output

Edit: was fine 1 month ago, on 10.14.3, xcode 11.3

cpd avatar Apr 04 '20 19:04 cpd

Hello,

For me Pecker is failing with a Command PhaseScriptExecution failed with a nonzero exit code / dyld: Library not loaded: @rpath/lib_InternalSwiftSyntaxParser.dylib error.

I'm on Xcode 12 (12A7209) and Swift 5.3. Pecker version is 0.4.0 (installed via brew). I'm also on BigSur 11.0 Beta (20A5374g) (but I'm not sure if that plays a role tho).

👋🏻

backslash-f avatar Sep 18 '20 09:09 backslash-f

anyone could fix this?

santi-d avatar Feb 04 '21 03:02 santi-d

Any news?

I am using CocoaPods and added a build script

${PODS_ROOT}/Pecker/bin/pecker

but I got no warning.

Zedd0202 avatar Feb 09 '21 04:02 Zedd0202

I'm having the same issue.

  • Installed using CocoaPods
  • Using build script "${PODS_ROOT}/Pecker/bin/pecker"

Xcode 12.4 (12D4e)

.pecker.yml configuration file includes reporter: "xcode"

No warning shown

AllioNicholas avatar Feb 10 '21 12:02 AllioNicholas

Any updates on this ?

c128128 avatar Sep 10 '21 07:09 c128128