CocoaPods / CocoaPods/Xcodeproj
PBXBuildFile with the same file name (at different path) generate the same tree hash
- Dominant language
- Ruby
- Stars
- 2.4k
- Forks
- 488
- PR merge metrics
- No merged PRs in 30d
Description
When `UUIDGenerator` [generate uuid ](https://github.com/CocoaPods/Xcodeproj/blob/b48b020559bfccbeb992b82350fec439fe3dc641/lib/xcodeproj/project/uuid_generator.rb#L108) for `PBXBuildFile`s, the tree hash returned does not take the real path of `PBXFileReference` into account, as a result, build file with the same name at different might have same uuid and one of the files get added to build source phase twice.
Example `to_tree_hash` of `PBXBuildFile` object:
```
=> {"displayName"=>"MNNAddBias.S", "isa"=>"PBXBuildFile", "fileRef"=>{"displayName"=>"MNNAddBias.S", "isa"=>"PBXFileReference", "path"=>"MNNAddBias.S", "sourceTree"=>"", "includeInIndex"=>"1"}}
```
Related issue: https://github.com/CocoaPods/CocoaPods/issues/8289
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.