Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infinite with xcode 9 GM #66

Closed
bricecesarin opened this issue Sep 13, 2017 · 7 comments
Closed

infinite with xcode 9 GM #66

bricecesarin opened this issue Sep 13, 2017 · 7 comments

Comments

@bricecesarin
Copy link

bricecesarin commented Sep 13, 2017

Hello,

I tried my project with the new xcode 9 GM today, the BartyCrouch script never stops.
So I tried launching command :
bartycrouch interfaces -p [My Project Path] -v
The script is working for some files and then stops for one.
I tried launching with the source file and found that the problem comes from the file : Commander.swift , the line let outdata = outpipe.fileHandleForReading.readDataToEndOfFile() never stops.

I reproduced the same issue with a second project.

My XCode version is : 9.0 (9A235).

@mathieuedet
Copy link

Hello bricecesarin ! I've exactly the same issue with my project with the last Xcode version.

@donnellyk
Copy link

donnellyk commented Sep 13, 2017

I am also seeing this.

The bartycrouch interfaces command hangs indefinitely, but if I run /usr/bin/ibtool --export-strings-file directly, the strings are still exported, though with a bunch of warnings: 2017-09-13 13:37:43.724 ibtoold[3253:4694192] WARNING: Unhandled destination metrics: (null) (which are being read correctly in the errPipe)

xcode-select points to the GM right now (though I have the old Xcode still installed)
ibtool --version:

<key>bundle-version</key>
<string>13196</string>
<key>short-bundle-version</key>
<string>9.0</string>

The nib it hangs on does have autolayout errors and if I delete the views causing the errors, bartycrouch runs fine. (Right now, I can't figure out a way to resolve the errors, IB is being weird).

I'm trying to create a simple nib from scratch that exhibits the same problem. I'll share here if I'm successful...

@donnellyk
Copy link

donnellyk commented Sep 13, 2017

If I had to make a guess, it seems like this new version of ibtool isn't giving an end-of-file indicator to standardOutput when there are errors (in this case, warnings).

It looks like commenting out let outdata = outpipe.fileHandleForReading.readDataToEndOfFile() (so just ignoring the standard output) and the rest of the command runs fine, the string files get made.

Not that this is an actual solution or anything, just experimenting.

@bricecesarin
Copy link
Author

bricecesarin commented Sep 14, 2017

when I launch ibtool command from command line :
/usr/bin/ibtool --export-strings-file [myTmpStrings] [MyXib]
the warnings :
WARNING: Unhandled destination metrics: (null)
are appearing for all xib (event those which works).
It seems like the output are not different from the working xibs and the no-working xib.
Still, fileHandleForReading.readDataToEndOfFile() does not end for the no-working xib.

@bricecesarin
Copy link
Author

The only output difference is :
/usr/bin/ibtool --export-strings-file [myTmpStrings] [MyWorkingXib] : less than 250 warnings
and
/usr/bin/ibtool --export-strings-file [myTmpStrings] [MyNoWorkingXib] : more than 250 warnings
Same thing with my 2 projects

@bmironer
Copy link
Contributor

bmironer commented Sep 25, 2017

I got a fix.
Simply reading stderr before stdout solves it.
Pull request incoming after a few more tests.
update: pull request #70 pending...

This was referenced Sep 25, 2017
@Jeehut
Copy link
Member

Jeehut commented Sep 26, 2017

Fixed via #71.

@Jeehut Jeehut closed this as completed Sep 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants