-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Move external dependencies to Dependencies group in Xcode project #186
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
Conversation
0d6c64c
to
e7623f6
Compare
let rootGroupReference = "_____RootGroup_" | ||
let productsGroupReference = "______Products_" | ||
let sourcesGroupReference = "_______Sources_" | ||
let dependenciesGroupReference = "__Dependencies_" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is not a requirement to have a _
prefix, so this diff can probably be less.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed and minimized the diff.
@mxcl how are we planning to test the generated As @modocache mentioned in #174 (comment), are we going to build the targets to check whether everything is working? or do you have any thing in mind? |
I'm not sure there is anything really good we can do for testing here (within a reasonable amount of development time), keeping in mind that Xcode itself tests for a great many configurations. So I think what we will do is run an |
9c570f1
to
d56f343
Compare
Squashed and rebased. Please review. |
public var dependencies: [Package] = [] | ||
public let manifest: Manifest | ||
|
||
public init(manifest: Manifest, url: String) { | ||
public init(manifest: Manifest, url: String, isSourcePackage: Bool = false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe rootPackage
makes more sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're standardizing on the name “root package”.
Aside: I think there is a better name that can be found.
But we can correct this later.
d56f343
to
5e10280
Compare
I don't want the notion of Modules do not know these details about themselves. Instead this information should be passed to |
I felt this information, ie., whether it is external package or root package, would be useful not only during Xcode project generation, but also in other places in future. That's why I've added the properties Without these properties, we have to filter through the list of packages based on path to identify whether it is root package or dependency package. I can remove these properties and use package paths for root/dependency package identification, but I feel these properties are not violating the responsibility boundaries of these modules. |
This would also be bad, I'm not suggesting we infer the information, I'm suggesting that this information be passed differently, specifically my idea is that a |
Alternatively, the Anyway, do which ever you like, if you have the time, otherwise I'll get around to amending this PR eventually. |
Sorry, I didn't get you. Could you please explain? As of now |
to
But this might not be the best way to do it, certainly it is ugly, but it will suffice for now until I get round to refactoring it. |
5e10280
to
5cd0b68
Compare
@mxcl Made the changes as per your previous comment. Please review. |
var set = Set<Module>() | ||
var stack = packages.flatMap{ map[$0] ?? [] } | ||
var modules = [Module]() | ||
let depPackages = packages.filter{ $0.path != rootdir } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes me a little uncomfortable with this, it seems fragile. We should explicitly pass in the root package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Refactored get()
to return source package and dependency packages separately.
Great, better even than I suggested. Thanks. |
Could you please run CI on this? |
@swift-ci Please test |
@mxcl, All the tests've passed. Could you please review and merge this? |
@bhargavg Conflicts |
e3dafed
to
9d56b9a
Compare
Rebased and resolved the conflicts. |
@swift-ci Please test |
All tests passed, Could someone please merge this. |
Sorry, I wanted to try it out on a few packages first. Looks good, code-wise and result-wise. |
[Xcode] Add an easy way to enable code signing.
Dependencies
group in projectSource
toDependencies
group