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

Change Scheme.Build.targets spec #203

Merged
merged 2 commits into from
Dec 26, 2017
Merged

Change Scheme.Build.targets spec #203

merged 2 commits into from
Dec 26, 2017

Conversation

yonaskolb
Copy link
Owner

I've just learned that the order of targets in a Scheme's build settings has no affect, and in fact when you reorder them, nothing gets changed in the project.

Within this in mind, this tweaks the Scheme.build.targets to be a bit simpler and mirrors the changes in #54. The change can be seen in the documentation diffs.

As a dictionary wouldn't be in a stable order for diffs, the targets are sorted by name.

Technically this is a breaking change, which is the reason I didn't document Schemes until now, so the format could be locked down.

Any thoughts?

@yonaskolb
Copy link
Owner Author

@vhbit

}
self.targets = targets.sorted { $0.target < $1.target }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to sort here? I believe xcproj will sort the targets before serializing

Copy link
Owner Author

Choose a reason for hiding this comment

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

@yonaskolb
Copy link
Owner Author

yonaskolb commented Dec 26, 2017

Another benefit of this is it's impossible to duplicate targets that will be built. It also play's nice with the include feature, as you can override a single target's settings easily

@yonaskolb yonaskolb merged commit d4fc091 into master Dec 26, 2017
@yonaskolb yonaskolb deleted the scheme_build_types branch December 26, 2017 09:36
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