We should suppress messages to stderr when checking on the installed SDK. Checking style and running webkitpy tests on a Mac without an iOS SDK demonstrates the annoyance of this logging.
<rdar://problem/35516900>
Created attachment 326812 [details] Patch
When did this start, is it new?
(In reply to Alexey Proskuryakov from comment #3) > When did this start, is it new? It's definitely not new. test-webkitpy has probably had this problem since iOS Simulator testing was added. I introduced this problem to check-webkit-style when I added checks for the TestExpectations. I mention in <https://bugs.webkit.org/show_bug.cgi?id=179534> what I think the solution to the underlying problem with check-webkit-style should be. I believe that the logging is an incidental consequence of how subprocess.popen works when passed stderr=None. I don't think the intention was for stderr to be logged, especially when running unit tests.
Quickly glancing at this patch it just seems wrong. It would be helpful if you would post the error message that you are seeing. I could try to reproduce, but I am not at a computer with a checkout.
(In reply to Jonathan Bedard from comment #0) > We should suppress messages to stderr when checking on the installed SDK. > Checking style and running webkitpy tests on a Mac without an iOS SDK > demonstrates the annoyance of this logging. This is an Apple Internal issue. It is not possible to obtain Xcode without an iOS SDK from developer.apple.com/App Store.
(In reply to Daniel Bates from comment #5) > Quickly glancing at this patch it just seems wrong. It would be helpful if > you would post the error message that you are seeing. I could try to > reproduce, but I am not at a computer with a checkout. It's definitely not helpful, for a few reasons: 1) Without this change, when we try and run a command without returning stderr, we subvert all of our output capturing, meaning tests will print to stderr even though we have code in place specifically disabling this 2) This function will be run multiple times because we don't have it memoized. We SHOULDN'T have it memoized, because it's callers always cache the value in some form, but this means that the error message will print multiple times. 3) The comment indicates that we except to receive an empty string in some cases. This is also the case that we will have stderr logging. Why should we log to stderr if the script is behaving as expected? If a caller of this function receives 'None' and expects a value, the exception will occur (and should be managed) there. It will be very obvious what the problem is. The error printed is this: xcodebuild: error: SDK "iphonesimulator" cannot be located. scrum: error: unable to lookup item 'SDKVersion' in SDK 'iphonesimulator'
Comment on attachment 326812 [details] Patch I talked with Dan about this yesterday (11/14). We're going to delay this change until work on <https://bugs.webkit.org/show_bug.cgi?id=179534> is completed, because at least some of the problems this patch is addressing will be fixed by those changes.
After applying the fix in <https://bugs.webkit.org/show_bug.cgi?id=179534>, this change is not needed.