woshiccm / Pecker

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

Pecker seems to be broken in Xcode 11.4 #49

Closed backslash-f closed 4 years ago

backslash-f commented 4 years ago

I'm integrating Pecker via Run Script Phase. It stopped working as soon as I upgraded Xcode to version 11.4.

Pecker version: 0.1.0

Error: Command PhaseScriptExecution failed with a nonzero exit code

There isn't much info besides this:

bash PhaseScriptExecution Run\ Pecker /Users/fernando.fernandes/Library/Developer/Xcode/DerivedData/TEST-awvaoxeibgfjlqccvsjwuqsmgoij/Build/Intermediates.noindex/TEST.build/Debug-iphoneos/TEST.build/Script-0765326C23FF1DBB00BB6B45.sh (in target 'TEST' from project 'TEST') cd /Users/fernando.fernandes/Downloads/source/backslash-f/TEST/Xcode/TEST /bin/sh -c /Users/fernando.fernandes/Library/Developer/Xcode/DerivedData/TEST-awvaoxeibgfjlqccvsjwuqsmgoij/Build/Intermediates.noindex/TEST.build/Debug-iphoneos/TEST.build/Script-0765326C23FF1DBB00BB6B45.sh

Please advise, thanks.

darecki commented 4 years ago

I have the same issue

woshiccm commented 4 years ago

My Xcode is still 11.3, thank you for your feedback, will try to solve it as soon as possible

erenozkul commented 4 years ago

I had same issue. Then i did delete "Run Scripts Phase" from "Build Phases" and i did created new "Build Phase" . My project is successfully build now but not show the warnings of pecker.

I tried two script on the "Run Scripts"

  1. /usr/local/bin/pecker

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

manishSan commented 4 years ago

We had the same issue with our setup.

mthole commented 4 years ago

+1, but worth noting I was able to downgrade to Xcode 11.3.1 and have things work well. One gotcha I ran into: The 11.3.1 version of Xcode needed to live at /Application/Xcode.app (i.e. no version number in the name).

manishSan commented 4 years ago

This issue still persists with Xcode 11.4.1 (11E503a) update.

woshiccm commented 4 years ago

New version 0.2.0 support Swift 5.2 now

woshiccm commented 4 years ago

@backslash-f @manishSan @mthole @darecki @erenozkul

backslash-f commented 4 years ago

@woshiccm With Pecker 0.2.0, the project now builds (no errors) -- but also it seems that no warnings are being generated.

(I'm on Xcode 11.4.1, not sure if that makes any difference.)

I created a simple project to test: Test.zip

(Look for the enum GenderType in ContentView.swift.)

erenozkul commented 4 years ago

Worked for me last release of Pecker on XCode 11.4.1.

@backslash-f can u try after recreate same build phase for Pecker?

backslash-f commented 4 years ago

Worked for me last release of Pecker on XCode 11.4.1.

@backslash-f can u try after recreate same build phase for Pecker?

That's weird, I may be missing something then. It's a fresh project and the build phase goes like:

Screenshot 2020-04-27 at 15 27 05

So yeah... ¯_(ツ)_/¯

erenozkul commented 4 years ago

That's weird, I may be missing something then. It's a fresh project and the build phase goes like:

@backslash-f Seems like no problem. Are you sure update the Pecker? Sometimes homebrew getting error on update the package. Like this:

Ekran Resmi 2020-04-27 17 11 12

First run this rm '/usr/local/bin/pecker' and re install pecker with: brew install woshiccm/homebrew-tap/pecker

backslash-f commented 4 years ago

That's weird, I may be missing something then. It's a fresh project and the build phase goes like:

@backslash-f Seems like no problem. Are you sure update the Pecker? Sometimes homebrew getting error on update the package. Like this:

Ekran Resmi 2020-04-27 17 11 12

First run this rm '/usr/local/bin/pecker' and re install pecker with: brew install woshiccm/homebrew-tap/pecker

Yeah, I'm pretty sure it's on the latest version:

$ pecker --version
0.2.0
oleghnidets commented 4 years ago

Hi @backslash-f , Is the issue reproducible using CocoaPods?

backslash-f commented 4 years ago

Hi @backslash-f ,

Is the issue reproducible using CocoaPods?

I couldn’t tell as I don’t use CocoaPods.

backslash-f commented 4 years ago

@woshiccm Would there be any sort of verbose mode or a detailed log output somewhere so I could identify what's going on in my environment? Thanks.

woshiccm commented 4 years ago

@backslash-f I have tested and worked well, maybe you can try delete DerivedData and build again.

截屏2020-04-28 下午3 49 51 截屏2020-04-28 下午3 49 40
backslash-f commented 4 years ago

@backslash-f I have tested and worked well, maybe you can try delete DerivedData and build again.

截屏2020-04-28 下午3 49 51 截屏2020-04-28 下午3 49 40

Will do, thanks.

I think you could close this issue, since the original problem seems to be fixed and now it's just my machine behaving...

👍🏻