Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@brentleyjones
Copy link
Collaborator

Fixes #381 to work with the transitivelyLinkDependencies flag.

@yonaskolb
Copy link
Owner

Could you add a changelog entry

Copy link
Owner

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 {

@yonaskolb
Copy link
Owner

Good catch πŸ‘

@brentleyjones brentleyjones force-pushed the transitive-aggragate-targets branch from 6fc7f42 to 1aa3957 Compare August 22, 2018 14:00
@brentleyjones
Copy link
Collaborator Author

Done and done πŸ˜„.

Copy link
Owner

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oops. Fixed.

@brentleyjones brentleyjones force-pushed the transitive-aggragate-targets branch from 79cd59f to 7140f0d Compare August 22, 2018 14:09
@yonaskolb
Copy link
Owner

Actually, looks like getAllCarthageDependencies will need updating too...

@brentleyjones
Copy link
Collaborator Author

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.

@yonaskolb
Copy link
Owner

Awesome. Yeah those 2 could be combined and optimised by only running over the graph once πŸ‘

@brentleyjones
Copy link
Collaborator Author

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) {
Copy link
Owner

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?

Copy link
Collaborator Author

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.

Copy link
Owner

Choose a reason for hiding this comment

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

πŸ‘

@yonaskolb yonaskolb merged commit 6a0c8c8 into master Aug 22, 2018
@yonaskolb yonaskolb deleted the transitive-aggragate-targets branch August 22, 2018 14:47
@yonaskolb
Copy link
Owner

Released πŸ‘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants