Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transitively Link Static Dependency's Dynamic Dependencies Correctly (#…
…484) Resolves #455 ### Short description 📝 > When a static dependency has a dynamic dependencies, those dynamic dependencies need to be linked at the point the static dependency is linked. This PR fixes the issue where a static dependency's dynamic libraries were linking incorrectly. ### Solution 📦 As we already traverse the graph for static dependencies, we can add a step to this process to check each static dependency's `targetDependencies` for dynamic libraries and add them as a reference adjacent to where the original static dependency is referenced. ### Implementation 👩💻👨💻 - [X] Update `linkableDependencies` in `Graph.swift` to reference a static dependency's dynamic libraries - [X] Update `GraphTests` to check the test case: - A (App) -> B (Static) -> C (Dynamic) - Expected: A -> C - [X] Update `GraphTests` to check the test case: - A (App) -> B (Dynamic) -> C (Static) -> D (Static) -> E (Dynamic) - Expected: A -> B - Expected: B -> (C, D, E) - [X] Update `GraphTests` to check the test case: - A (App) -> B (Dynamic) -> C (Dynamic) -> D (Static) -> E (Static) -> F (Dynamic) - Expected: B -> C ### Test Plan - Run `tuist generate` inside `fixtures/ios_app_with_static_frameworks` - Check that the `App` target has `D` inside `Build Phases -> Link Binary With Libraries`
- Loading branch information
Showing
3 changed files
with
121 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters