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

[SR-8204] Sort targets in SwiftPM generated Xcode project #4772

Open
hartbit opened this issue Jul 8, 2018 · 7 comments
Open

[SR-8204] Sort targets in SwiftPM generated Xcode project #4772

hartbit opened this issue Jul 8, 2018 · 7 comments
Labels
good first issue Good for newcomers Edit

Comments

@hartbit
Copy link
Collaborator

hartbit commented Jul 8, 2018

Previous ID SR-8204
Radar None
Original Reporter @hartbit
Type Improvement
Status In Progress
Resolution

Attachment: Download

Additional Detail from JIRA
Votes 1
Component/s Package Manager
Labels Improvement, Screened, StarterBug
Assignee matthew_seaman (JIRA)
Priority Medium

md5: 4ee34e0c19a6d8c18d35df90f6f79007

Issue Description:

Currently, SwiftPM sorts targets in the generated Xcode project alphabetically. To be more readable, it might make sense to sort them in the same order they are defined in the Manifest:

  • Products

  • Targets

  • Test Targets

Question: should we sort them alphabetically by category or by the definition order?

@hartbit
Copy link
Collaborator Author

hartbit commented Jul 8, 2018

CC @aciidb0mb3r what do you think?

@ankitspd
Copy link
Member

ankitspd commented Jul 9, 2018

Definition order makes sense when there is a single package but not sure what to do for artifacts of the package dependencies.

@hartbit
Copy link
Collaborator Author

hartbit commented Jul 9, 2018

When there are multiple packages, I think the user is first and foremost interested about the targets of his own package. So a sensible order could be:

  • Root Products

  • Root Targets

  • Root Test Targets

  • Dependent Products

  • Dependent Targets

  • Dependent Test Targets

@ankitspd
Copy link
Member

SGTM

@swift-ci
Copy link
Contributor

swift-ci commented Apr 4, 2019

Comment by Matthew Seaman (JIRA)

CC @aciidb0mb3r Assuming this change doesn't need to go through the proposal process, should it be guarded by a specific Swift tool version? …or perhaps a --sort-targets-alphabetically flag.

@swift-ci
Copy link
Contributor

swift-ci commented Apr 5, 2019

Comment by Matthew Seaman (JIRA)

Oh I see this SR is only referring to targets, not groups representing them. Do you think sorting the groups in the same way makes sense? As a Swift PM user, I'd love to see groups sorted by definition order, but this would be a more significant change.

@swift-ci
Copy link
Contributor

Comment by Matthew Seaman (JIRA)

#2092

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
@tomerd tomerd added good first issue Good for newcomers Edit and removed Package Manager labels May 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Edit
Projects
None yet
Development

No branches or pull requests

4 participants