XcodeProj icon indicating copy to clipboard operation
XcodeProj copied to clipboard

Consider UUIDs when sorting by name

Open timothycosta opened this issue 3 years ago β€’ 2 comments

Resolves https://github.com/tuist/XcodeProj/issues/683

Short description πŸ“

Ensure UUIDs are considered during sort by filename to ensure information is not lost when filenames are equal.

Solution πŸ“¦

Consider both the PBXBuildFile UUID and PBXFileElement UUID.

Implementation πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Detail in a checklist the steps that you took to implement the PR.

  • [X] Consider all UUIDs when filenames are equal
  • [X] Update documentation
  • [X] Rename sort methods differently so they can be distinguished at the call site

timothycosta avatar Jun 02 '22 02:06 timothycosta

Codecov Report

Merging #685 (bf90957) into main (65ca255) will increase coverage by 0.00%. The diff coverage is 100.00%.

:exclamation: Current head bf90957 differs from pull request most recent head 54df1b5. Consider uploading reports for the commit 54df1b5 to get more accurate results

@@           Coverage Diff           @@
##             main     #685   +/-   ##
=======================================
  Coverage   84.84%   84.84%           
=======================================
  Files         157      157           
  Lines        9044     9049    +5     
=======================================
+ Hits         7673     7678    +5     
  Misses       1371     1371           
Impacted Files Coverage Ξ”
.../XcodeProj/Objects/Project/PBXOutputSettings.swift 100.00% <100.00%> (ΓΈ)

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update 65ca255...54df1b5. Read the comment docs.

codecov-commenter avatar Jun 10 '22 01:06 codecov-commenter

@kwridan I've added tests for that, but there are now some other failing tests due to adding files to iOS/Project.xcodeproj. They seem "magic numbery". Can you advise?

Screen Shot 2022-06-10 at 11 18 25 AM

Screen Shot 2022-06-10 at 11 20 37 AM

timothycosta avatar Jun 10 '22 02:06 timothycosta

I addressed the comments on this PR in a separate one. Thanks a lot for this contribution @timothycosta πŸ™πŸΌ

pepicrft avatar Jun 26 '23 15:06 pepicrft

@all-contributors please add @timothycosta for code

pepicrft avatar Jun 26 '23 15:06 pepicrft

@pepicrft

I've put up a pull request to add @timothycosta! :tada:

allcontributors[bot] avatar Jun 26 '23 15:06 allcontributors[bot]