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
Ensure custom search path settings are included in generated projects #751
Conversation
- The previous logic was setting the `$(inherited)` and the derived search paths seperately - This caused the derrived search paths to replace any existing custom settings - To solve this, we can set the derived search paths and the `$(inherited)` setting as one setting - This allows the extend helper method to extend existing settings Test Plan: - Run `tuist generate` within `fixtures/ios_app_with_static_libraries` - Inspect the generated workspace, Module A should have a `$(SRCROOT/CustomHeader` header search path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this changes causes a project instability - will investigate it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch @kwridan
π Also don't forget about the CHANGELOG :) |
Updated the changelog! The remaining checks are failing for different reason, I wonder if its due to submitting a PR from a fork?
|
β¦#751) Resolves #750 - The previous logic was setting the `$(inherited)` and the derived search paths seperately - This caused the derrived search paths to replace any existing custom settings - To solve this, we can set the derived search paths and the `$(inherited)` setting as one setting - This allows the extend helper method to extend existing settings Test Plan: - Run `tuist generate` within `fixtures/ios_app_with_static_libraries` - Inspect the generated workspace, Module A should have a `$(SRCROOT/CustomHeader` header search path
- 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 tuist#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
- 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 tuist#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
- 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.
Resolves #750
Short description π
Specifying a custom
HEADER_SEARCH_PATHS
orFRAMEWORK_SEARCH_PATHS
build setting in manifest is ignored in the event a project has a static library dependency.Solution π¦
$(inherited)
and the derived search paths seperately$(inherited)
setting as one settingImplementation π©βπ»π¨βπ»
LinkGenerator
Test Plan π
tuist generate
withinfixtures/ios_app_with_static_libraries
$(SRCROOT/CustomHeader
header search path