Resolves: https://github.com/tuist/tuist/issues/460
- Implemented depth first search to check for cycles once the graph is fully constructed
- Changed the order in which target nodes are added to the cache to prevent infinite loops in the event of cycles being present
Test Plan:
- Run `tuist generate` within `fixtures/ios_workspace_with_dependency_cycle`
- Verify a cycle error is displayed