pvjohnson / gyp

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

xcode-ninja can generate ID collisions in certain cases #461

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Copy test/same-target-name-different-directory/src to a temp location and cd 
to it.
2. Run gyp -f xcode-ninja -G xcode_ninja_target_pattern='^.*$' --depth=. 
subdirs.gyp 

Expected Results:
gyp succeeds in generating an xcode workspace.

Actual Results:
A duplicate ID check is violated, raising an exception:
Traceback (most recent call last):
  File "gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
  File "pylib/gyp/__init__.py", line 544, in script_main
    return main(sys.argv[1:])
  File "pylib/gyp/__init__.py", line 537, in main
    return gyp_main(args)
  File "pylib/gyp/__init__.py", line 522, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "pylib/gyp/generator/xcode.py", line 1240, in GenerateOutput
    xcode_target_to_target_dict)
  File "pylib/gyp/generator/xcode.py", line 418, in Finalize2
    self.project_file.EnsureNoIDCollisions()
  File "pylib/gyp/xcodeproj_file.py", line 472, in EnsureNoIDCollisions
    str(other._properties), self._properties['rootObject'].Name())
KeyError: 'Duplicate ID CF480814BDE293986C7CAB3B, objects "{\'target\': 
<PBXAggregateTarget \'target\' at 0x10fdf4dd0>, \'targetProxy\': 
<PBXContainerItemProxy \'subdirs.ninja.gyp:target\' at 0x10fdf7a10>}" and 
"{\'target\': <PBXAggregateTarget \'target\' at 0x10fdf4dd0>, \'targetProxy\': 
<PBXContainerItemProxy \'subdirs.ninja.gyp:target\' at 0x10fdf7b50>}" in 
"subdirs.ninja"'

What version of the product are you using? On what operating system?
gyp@master on Mac OS X 10.9.4

Original issue reported on code.google.com by tobias.h...@ableton.com on 2 Oct 2014 at 2:52