Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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?

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.

2 participants