Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove duplicate HEADER_SEARCH_PATHS (#787)
- In the even two library dependencies shared the same `publicHeaders` path (e.g. `libcrypto.a` and `libssl.a` in OpenSSL) duplicate entries were added to the `HEADER_SEARCH_PATHS` build setting - This was regressed due to an earlier change #751 - previously the uniquing was happening in the settings helper when build settings were extended multiple times - To resolve this, we now ensure we unique paths being added - Additionally a test is included to ensure this doesn't regress in the future Test Plan: - Verify the unit tests pass A bit of a contrived manual test case update the fixture in `fixtures/ios_app_with_static_libraries/Modules/A/Project.swift` ```swift let project = Project(name: "A", targets: [ Target(name: "A", platform: .iOS, product: .staticLibrary, bundleId: "io.tuist.A", infoPlist: "Info.plist", sources: "Sources/**", dependencies: [ .project(target: "B", path: "../B"), .library(path: "../C/prebuilt/C/libC.a", publicHeaders: "../C/prebuilt/C", swiftModuleMap: "../C/prebuilt/C/C.swiftmodule"), // Add a duplicate .library(path: "../C/prebuilt/C/libC.a", publicHeaders: "../C/prebuilt/C", swiftModuleMap: "../C/prebuilt/C/C.swiftmodule") ]) ]) ``` This of course causes a duplicate binary (hence why it wasn't included) but can help illustrate a situation where two `.library` dependencies point to the same `publicHeaders` path.
- Loading branch information