Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add timeout on "xcodebuild -list", if XCode version 6 #58
Hei Raphael, I can't review the commit as the formatting was modified heavily. Could you please try again and check spacing / line endings configurations ? Feel free to push force on that branch to check it again.
If you have problem, I'll try to deal with it when merging manually.
I think it's better to put a default timeout , instead of parse xcode version.
I don't know the reason of hang in xcode 6, but I think Apple will keep this behaviour.
I've tried to discover the problem, using dtruss (like strace) (https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/dtruss.1m.html). it expects (i guess) the Xcode is running. If you ran xcodebuild -list with xcode opened, it shows more activity (in dtruss).
Another options, is to put an option at plugin to not run " xcodebuild -list ".
Raphael, what about the try/catch/finally ? is it really needed ? Was it to ensure that returnCode would be 0 ? Have you checked the joinWithTimeout was returning when invoking the hanging xocdebuild -list command ?
I am trying to get the code as simple as possible.
My first test, after calls to "joinWithTimeout", the build is marked as failure. Always (maybe the TaskListener?)
joinWithTimeout always returns (timeout), build always marked as fail, with no Exception.
I've use try/catch block, to try to avoid this behavior. No results. So. I changed from try/catch to try/finally, to mark returnCode = 0. But the try/finally block cannot know between an real error and a timeout. This is not good.
To keep the code to simple.
if (resultCode > 0 && resultCode != 143) return false;
added a commit
this pull request
Feb 12, 2015
You answered him to deliver it in version 1.4.8. Is there any plan, when you will release it?
I re-released it
I expect the jenkins infra to pick it up during the next 24hours.
Thanks for the tip.