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

Fix duplicate sources in groups, fixes #141 #142

Merged
merged 1 commit into from
Nov 10, 2017

Conversation

bkase
Copy link
Collaborator

@bkase bkase commented Nov 9, 2017

No description provided.

@@ -504,7 +504,7 @@ public class PBXProjGenerator {
func getSingleGroup(path: Path, mergingChildren children: [String], depth: Int = 0) -> PBXGroup {
let group: PBXGroup
if let cachedGroup = groupsByPath[path] {
cachedGroup.children += children
cachedGroup.children = Array(Set(cachedGroup.children + children))
Copy link
Owner

Choose a reason for hiding this comment

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

This means we lose ordering of files

Copy link
Owner

Choose a reason for hiding this comment

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

And if we just sort this we lose alphabetical ordering of files

Copy link
Owner

Choose a reason for hiding this comment

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

By the way, I changed things up so that all files and groups are now sorted at the end, so we don't have to worry about this sort of thing anymore

@bkase bkase force-pushed the fix-duplicate-sources branch from f274b49 to a27a25e Compare November 9, 2017 23:06
@bkase
Copy link
Collaborator Author

bkase commented Nov 9, 2017

It's less efficient now, but I think it should be okay. There shouldn't ever be too many files in a single group in practice

@yonaskolb yonaskolb merged commit 405b7b7 into yonaskolb:master Nov 10, 2017
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