XcodeGen
XcodeGen copied to clipboard
Stack Overflow with createIntermediateGroups: true and source with path in /usr/bin
Hey, thanks for working on this project, it really saved me some headaches when trying to generate xcode project files! I just ran into a weird issue. I am generating the project.json from the various json files created by my build system. That is how /usr/bin/xcrun wound up in "sources". For now I can just exclude all paths in /usr/bin but I thought it would be good to make an issue for it!
minimal project.json:
{
"name": "Test",
"options": {
"createIntermediateGroups": true
},
"targets": {
"Sources": {
"platform": "auto",
"sources": [
{
"path": "/usr/bin/xcrun"
}
]
}
}
}
Trace:
(lldb) r
Process 32067 launched: '/Users/lattis/src/XcodeGen/.build/apple/Products/Debug/xcodegen' (arm64)
⚙️ Generating plists...
⚙️ Generating project...
No "auto" settings found
Process 32067 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x16f603f70)
frame #0: 0x00000001000cbfc0 xcodegen`PBXFileElement.sourceTree.getter at <compiler-generated>:0
Note: this address is compiler-generated code in function XcodeProj.PBXFileElement.sourceTree.getter : Swift.Optional<XcodeProj.PBXSourceTree> that has no source code associated with it.
Target 0: (xcodegen) stopped.
(lldb) bt
^C* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x16f603f70)
* frame #0: 0x00000001000cbfc0 xcodegen`PBXFileElement.sourceTree.getter at <compiler-generated>:0
frame #1: 0x00000001001193f0 xcodegen`PBXFileElement.isEqual(rhs=0x00006000016f8320) at Equality.generated.swift:86:12
frame #2: 0x000000010011ab08 xcodegen`PBXGroup.isEqual(rhs=0x00006000016f8320) at Equality.generated.swift:124:22
frame #3: 0x00000001000d7864 xcodegen`PBXGroup.isEqual(object=0x00006000016f8320) at PBXGroup.swift:86:16
frame #4: 0x00000001000e0e30 xcodegen`static PBXObject.== infix(lhs=0x00006000016f8320, rhs=0x00006000016f8320) at PBXObject.swift:60:13
frame #5: 0x00000001000e1344 xcodegen`protocol witness for static Equatable.== infix(_:_:) in conformance PBXObject at <compiler-generated>:0
frame #6: 0x0000000100119d28 xcodegen`PBXFileElement.isEqual(rhs=0x00006000016f8320) at Equality.generated.swift:94:19
frame #7: 0x000000010011ab08 xcodegen`PBXGroup.isEqual(rhs=0x00006000016f8320) at Equality.generated.swift:124:22
frame #8: 0x00000001000d7864 xcodegen`PBXGroup.isEqual(object=0x00006000016f8320) at PBXGroup.swift:86:16
frame #9: 0x00000001000e0e30 xcodegen`static PBXObject.== infix(lhs=0x00006000016f8320, rhs=0x00006000016f8320) at PBXObject.swift:60:13
frame #10: 0x00000001000e1344 xcodegen`protocol witness for static Equatable.== infix(_:_:) in conformance PBXObject at <compiler-generated>:0
frame #11: 0x0000000100119d28 xcodegen`PBXFileElement.isEqual(rhs=0x00006000016f8320) at Equality.generated.swift:94:19
frame #12: 0x000000010011ab08 xcodegen`PBXGroup.isEqual(rhs=0x00006000016f8320) at Equality.generated.swift:124:22
frame #13: 0x00000001000d7864 xcodegen`PBXGroup.isEqual(object=0x00006000016f8320) at PBXGroup.swift:86:16
frame #14: 0x00000001000e0e30 xcodegen`static PBXObject.== infix(lhs=0x00006000016f8320, rhs=0x00006000016f8320) at PBXObject.swift:60:13