-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The XcodeGraph library fails to parse Xcode projects that contain statically linked library targets.
Steps to reproduce
- Have a Xcode project (e.g. iOS app). Example project: Example.zip
- Add a static library target
- Link this static library target to the main project target (e.g. app)
- Run
tuist graphin the project root.
Expected result: A graph image file gets created in the project root.
Actual result: An error is thrown:
✖ Error
Missing or invalid file path for 'PBXBuildFile': Unknown.
Sorry this didn’t work. Here’s what to try next:
▸ If the error is actionable, address it
▸ If the error is not actionable, let's discuss it in the Troubleshooting & how to
▸ If you are very certain it's a bug, file an issue
▸ Check out the logs at /Users/steffen/.local/state/tuist/logs/DC67880D-FF7A-42ED-9600-18A5273B981B.log
DC67880D-FF7A-42ED-9600-18A5273B981B.log
$ tuist version
4.119.1Probable Root Cause
PBXFrameworksBuildPhaseMapper.mapFrameworkDependency(:xcodeProj:projectNativeTargets:) tries to find project targets based on framework / library names.
For this, it replaces ".framework" from file refs:
XcodeGraph/Sources/XcodeGraphMapper/Mappers/Phases/PBXFrameworksBuildPhaseMapper.swift
Line 67 in f080015
| let name = path.replacingOccurrences(of: ".framework", with: "") |
It doesn't do the same for static library product file refs (e.g.
libFoo.a). Thats why it tries to search for a target libFoo.a instead of Foo.dosubot
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working