Skip to content

Comments

fix(cli): restore SRCROOT path resolution for cached target settings#9531

Merged
fortmarek merged 1 commit intomainfrom
fix/framework-search-paths
Feb 19, 2026
Merged

fix(cli): restore SRCROOT path resolution for cached target settings#9531
fortmarek merged 1 commit intomainfrom
fix/framework-search-paths

Conversation

@fortmarek
Copy link
Member

Summary

Root 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:

  1. resolvingSrcRootPaths(from:to:) on SettingsDictionary — transforms all $(SRCROOT)-relative paths when propagating settings between targets at different project paths
  2. resolvingSrcRootPath(from:to:) on String — resolves a $(SRCROOT)/relative/path from one project directory to another
  3. Path resolution guard in mapGraph — when combining settings from a dependency at a different project path, calls resolvingSrcRootPaths to correct the paths

Impact

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:

"$(SRCROOT)/../BuiltFrameworks/GoogleMaps.xcframework    (correct)
"$(SRCROOT)/../../../BuiltFrameworks/GoogleMaps.xcframework  (incorrect — relative to cache path)

Test plan

🤖 Generated with Claude Code

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]>
@fortmarek fortmarek marked this pull request as ready for review February 19, 2026 11:39
@fortmarek fortmarek requested a review from pepicrft February 19, 2026 11:39
@dosubot dosubot bot added the size:M For issues that take a handful of hours to implement label Feb 19, 2026
@dosubot dosubot bot added the type:bug Something isn't working label Feb 19, 2026
@dosubot
Copy link

dosubot bot commented Feb 19, 2026

Related Documentation

Checked 1 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@tuist
Copy link

tuist bot commented Feb 19, 2026

🛠️ Tuist Run Report 🛠️

Tests 🧪

Scheme Status Cache hit rate Tests Skipped Ran Commit
TuistUnitTests 98 % 454 29 425 31d46606f

Builds 🔨

Scheme Status Duration Commit
TuistAutomationAcceptanceTests 42.5s 31d46606f
TuistCacheEEAcceptanceTests 28.0s 31d46606f
TuistDependenciesAcceptanceTests 1m 7s 31d46606f
TuistGeneratorAcceptanceTests 1m 13s 31d46606f
TuistUnitTests 39.8s 31d46606f

@fortmarek fortmarek merged commit 63c69f9 into main Feb 19, 2026
36 of 38 checks passed
@fortmarek fortmarek deleted the fix/framework-search-paths branch February 19, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M For issues that take a handful of hours to implement type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant