-
Notifications
You must be signed in to change notification settings - Fork 464
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
Drop native extension #167
Comments
I don’t think this is such a big issue, but, more importantly, moving away from our own implementation would mean we can never preserve UUIDs etc. So this is a no from me. |
The only alternative I see is to implement a ASCII plist parser ourselves in pure Ruby with e.g. Ragel. |
For me it is, for example the Travis builds on the mac workers are erring out again, requiting at least 1 man/hour to fix them.
The JSON serialisation would contain the same information of the plist so there would be not problems of the UUIDs (which are just a number under the UUID key). No? @kylef comment on slack made me thing of another alternative approach. As we need ASCII plist only for reading, we could:
|
Can you do a simple benchmark of the cost of shelling out and converting twice? |
I dunno why, but for some reason I assumed that |
For this we should use the CFPropertyList gem which comes pre-installed on OS X. |
Now we are talking again 😄 Before implementing it I have only two observations:
$ time plutil -convert json project.pbxproj -o Data.json -r
plutil -convert json project.pbxproj -o Data.json -r 0.00s user 0.00s system 92% cpu 0.006 total medium size project Implementing it should be reasonable simple so if I get the green light I will do an initial pull request where a more appropriate benchmarking can be performed. |
I think it’s better to convert to a XML plist, as JSON is not a real plist format. This way we can just use the CFPropertyList gem for everything and if Xcode ever moves away from ASCII plist to XML plist then it will be simple to move over.
Ok, go for it :) One thing that should be properly tested is preserving unicode characters, for which we encoded XML entities atm. |
Also any suggestion to replace |
There’s: The latter has a dependency graph of two extra runtime dependencies (afaik), those two are by Ara T. Howard, so those will be small and good. Still, you should compare if they both guarantee to make truly unique UUIDs, the size of the code base, and possibly if it has built-in functions to format the UUIDs to Xcode’s requirement while keeping the unique requirement. |
Closed by #168 |
Ratio
The Xcodeproj native extension has some important drawbacks:
Proposal
Xcodeproj could:
reading
plutil
to convert theproject.pbxproj
file to JSON/XMLwriting
plutil
to convert it to to an XML plistBenefits
plutil
tool. However once setup this is unlikely to break and we can still test it locally during development. To me this is an acceptable trade off because it would free a considerable amount of development resources.The text was updated successfully, but these errors were encountered: