levyhoo / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

dead code path in mac_tool #398

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
there is a dead code path mac_tool that REQUIRES the build use the apple 
installed python (because of CoreFoundation dependency).

in mac_tool.py

def _CopyStringsFile(self, source, dest):
   ...
    # Xcode's CpyCopyStringsFile / builtin-copyStrings seems to call
    # CFPropertyListCreateFromXMLData() behind the scenes; at least it prints
    #     CFPropertyListCreateFromXMLData(): Old-style plist parser: missing
    #     semicolon in dictionary.
    # on invalid files. Do the same kind of validation.
   import CoreFoundation
    s = open(source).read()
    d = CoreFoundation.CFDataCreate(None, s, len(s))
    _, error = CoreFoundation.CFPropertyListCreateFromXMLData(None, d, 0, None)
    if error:
      return

Original issue reported on code.google.com by sitk...@gmail.com on 29 Dec 2013 at 8:02

GoogleCodeExporter commented 9 years ago
I instrumented gyp-mac-tool to echo usage to syslog during a full build of 
node-webkit

it looks like it is only called once during the entire build.

12/29/13 11:49:22.821 AM syslog[61264]: CopyStringsFile called from 
['./gyp-mac-tool', 'copy-bundle-resource', 
'../../breakpad/src/client/mac/sender/English.lproj/Localizable.strings', 
'crash_report_sender.app/Contents/Resources/English.lproj/Localizable.strings']

Original comment by sitk...@gmail.com on 30 Dec 2013 at 12:15