-
-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sort project references as xcode16 #867
base: main
Are you sure you want to change the base?
sort project references as xcode16 #867
Conversation
9459faf
to
61391f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add some tests to ensure no regressions are introduced in this area.
|
||
for project in projects { | ||
/// The project references are sorted alphabetically based on the name of the project it's being referenced. | ||
project.projectReferences = project.projectReferences.sorted(by: { lhs, rhs in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Speakus in which scenario a project contains more than one project reference. Would you mind adding a fixture under Fixtures
so that we can add some tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi. I changed company where I work and It's not so easy for me anymore to provide some example.
@mikhailmulyar may you help with Fixtures?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, will try to provide some example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here it is, I've added example with wrong ordering and some tests for checking.
mikhailmulyar@4f282f1
Short description 📝
If project saved with XcodeProj then opening it with Xcode 16 generate some changes. So we could respect Xcode 16 sorting by sorting our result with the same way.
Solution 📦
Do the same sorting as Xcode 16 do
NB! This PR based on other fix so please merge this PR first #865