Skip to content

Conversation

@Speakus
Copy link
Contributor

@Speakus Speakus commented Oct 10, 2024

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

@Speakus Speakus changed the title M.kholyavkin/iosc 12423 sort project references as xcode16 sort project references as xcode16 Oct 10, 2024
@pepicrft pepicrft force-pushed the m.kholyavkin/IOSC-12423-sort-projectReferences-as-xcode16 branch from 9459faf to 61391f4 Compare December 3, 2024 16:15
Copy link
Contributor

@pepicrft pepicrft left a 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
Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikhailmulyar would you mind completing this PR? It'll require closing this one and opening a new one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pepicrft Hi. Sorry for delay. Here is update PR with test added #937

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants