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

Refactor PBXProjGenerator and add tests around dependency order generation #978

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

asifmohd
Copy link
Contributor

@asifmohd asifmohd commented Oct 28, 2020

Description

This PR refactors PBXProjGenerator and adds a few tests around dependency generation of static libraries and bundles

This should provide a good harness for the changes being done in PR #863. That is, these newly added tests should still pass when I rebase my branch with the changes from this PR.

I will be working on adding a few more tests in separate PRs before we can probably have the #863 change ready to be merged.

@asifmohd asifmohd force-pushed the add_tests_for_dependency_generation_order branch from fb03d0b to 33d1765 Compare October 28, 2020 20:19

targetFileReferences[target.name] = fileReference
}
let generatedTargetResults = self.generateTargetInfo(targets: self.project.targets, aggregateTargets: self.project.aggregateTargets)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The motivation to move this logic to a different function was to break down the generate function into smaller functions.

And then the larger goal would be, to able to test out the generateTargetInfo function in isolation. But that requires marking the generateTargetInfo function as a public function so that it can be accessed in tests.
It seems we could make this a pure function, i.e. pass in the targets to this function, and then the function returns this struct, which we can assert on, but still need to explore how feasible it would be to write tests around this function.

So I wanted to raise this PR and gather feedback if this approach makes sense, before proceeding further.

specifically to add tests around the dependency order generation
@asifmohd asifmohd force-pushed the add_tests_for_dependency_generation_order branch from 33d1765 to 4e2a2a8 Compare December 20, 2020 07:50
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.

1 participant