-
Notifications
You must be signed in to change notification settings - Fork 868
Fix aggregate target dependencies with transitivelyLinkDependencies
#383
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
|
Could you add a changelog entry |
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.
Would be good if the code showed what was happening as well as the comment. For completion sake could we add a Project.getAggregateTarget(_ name: String) -> AggregateTarget function and use it here
} else if project.getAggregateTarget(dependency.reference) != nil {|
Good catch π |
6fc7f42 to
1aa3957
Compare
|
Done and done π. |
Sources/ProjectSpec/Project.swift
Outdated
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.
One missing map creation in the aggregateTargets setter
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.
Oops. Fixed.
79cd59f to
7140f0d
Compare
|
Actually, looks like |
|
I hadn't considered that. I'll fix that quick. Related, in my Static Framework work, I'll be consolidating those and doing the caching work we talked about. |
|
Awesome. Yeah those 2 could be combined and optimised by only running over the graph once π |
|
Updated for Carthage dependencies as well. |
| queue.append(target) | ||
| } else if let aggregateTarget = projectTarget as? AggregateTarget { | ||
| for dependencyName in aggregateTarget.targets { | ||
| if let projectTarget = project.getProjectTarget(dependencyName) { |
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 highlights a question. Should getAllDependenciesPlusTransitiveNeedingEmbedding be checking aggregateTarget.targets as well?
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 went down that route at first. It wouldn't since it's the same as shouldEmbedDependencies in my mind. An aggregate target will be merging it's targets, they shouldn't propagate up, at least automatically. If that's the desire, it can still be done manually.
In the new algorithm this will be expressible explicitly.
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.
π
|
Released π |
Fixes #381 to work with the
transitivelyLinkDependenciesflag.