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 targets from list to map #53

Closed
yonaskolb opened this issue Sep 14, 2017 · 4 comments
Closed

Change targets from list to map #53

yonaskolb opened this issue Sep 14, 2017 · 4 comments

Comments

@yonaskolb
Copy link
Owner

At the moment targets is list. That was done to preserve the order of generated targets in the xcode project.
There would be some upsides to making it a map of names to targets however:

  • the include feature could edit and merge targets by name
  • more natural yaml styl
  • enforce the target name
  • better visual seperation

The points are very minor other than the first one which is a real consideration.
Is having the order of targets in the project worth it? Thoughts anyone?

Here is a visual difference

list - Array

targets:
  - name: MyTarget
    platform: iOS
    type: application
  - name: MyFramework
    platform: iOS
    type: framework

map - Dictionary

targets:
  MyTarget:
    platform: iOS
    type: application
  MyFramework:
    platform: iOS
    type: framework 

In either case targets in the ProjectSpec struct would still be an array, this just affects yaml

@yonaskolb
Copy link
Owner Author

Thoughts @pepibumur?

@yonaskolb
Copy link
Owner Author

In comparison the Swift Package Manager seems to generate the target list randomly also, even though they are defined as an array in Package.swift
screen shot 2017-09-14 at 7 14 08 pm

@ImLaufderZeit
Copy link

ImLaufderZeit commented Sep 15, 2017

map - Dictionary seems more natural and better visually, personally.
If you could control structure of group targets in File Navigator in Xcode, even better. Off-topic in this issue though...

@pepicrft
Copy link

@yonaskolb in my experience working with multiple projects I don't think the order of the targets doesn't matter a lot. I see more value in making it more readable and more yaml-natural

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

No branches or pull requests

3 participants