fix(cli): restore SRCROOT path resolution for cached target settings#9531
Merged
fix(cli): restore SRCROOT path resolution for cached target settings#9531
Conversation
PR #9446 (revert static framework resource embedding) accidentally removed the resolvingSrcRootPaths logic from PR #9203 that corrects $(SRCROOT)-relative paths when propagating settings from cached targets at different project paths. Without this fix, FRAMEWORK_SEARCH_PATHS and HEADER_SEARCH_PATHS for external static xcframeworks are computed relative to the cached target's location (.cache/tuist/Binaries/HASH/) instead of the consuming app's project directory, producing broken paths. Co-Authored-By: Claude Opus 4.6 <[email protected]>
🛠️ Tuist Run Report 🛠️Tests 🧪
Builds 🔨
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
resolvingSrcRootPathslogic from PR fix(cli): correct static xcframework paths when depending on cached targets #9203 that was accidentally removed by PR revert(cli): revert static framework resource embedding #9446 ("revert static framework resource embedding")FRAMEWORK_SEARCH_PATHSandHEADER_SEARCH_PATHSfor external static xcframeworks when some targets are cachedRoot cause
PR #9446 was a large revert (45 files) that intended to revert PRs #9081, #9141, #9210, #9240, #9317, #9382, #9419. However, because changes from those PRs and the unrelated PR #9203 overlapped in
StaticXCFrameworkModuleMapGraphMapper.swift, the revert accidentally swept up the #9203 fix as well.What was lost
Three pieces of code from PR #9203:
resolvingSrcRootPaths(from:to:)onSettingsDictionary— transforms all$(SRCROOT)-relative paths when propagating settings between targets at different project pathsresolvingSrcRootPath(from:to:)onString— resolves a$(SRCROOT)/relative/pathfrom one project directory to anothermapGraph— when combining settings from a dependency at a different project path, callsresolvingSrcRootPathsto correct the pathsImpact
Without this fix, when targets are cached to
.cache/tuist/Binaries/HASH/, any$(SRCROOT)-relative paths in their settings are propagated as-is to consuming targets. Since the cached target's project is at a different path than the consuming app, the resulting paths are incorrect:Test plan
🤖 Generated with Claude Code