fix(cli): embed cached static xcframeworks with resources transitively#9419
Merged
fix(cli): embed cached static xcframeworks with resources transitively#9419
Conversation
🛠️ Tuist Run Report 🛠️Tests 🧪
Builds 🔨
|
pepicrft
commented
Feb 11, 2026
| let got = subject.embeddableFrameworks(path: project.path, name: app.name).sorted() | ||
|
|
||
| // Then | ||
| XCTAssertEqual(got, [ |
Contributor
Author
There was a problem hiding this comment.
This embeds both, the product of the static framework (direct dependency), and the transitive static XCFramework
fortmarek
approved these changes
Feb 11, 2026
The previous fix (5c3c85f) only checked direct dependencies for static xcframeworks needing embedding. When a cached static xcframework with resources was a transitive dependency through another static target, it was not embedded and its resources were inaccessible at runtime. Switch from a direct-only lookup to a recursive filterDependencies traversal that stops at dynamic targets and targets that can embed frameworks. This ensures static xcframeworks with .framework bundles are embedded regardless of their position in the dependency chain.
The staticXCFrameworksWithResources traversal was not skipping macro targets, causing their transitive xcframework dependencies (like SwiftSyntax) to be incorrectly embedded in the app bundle.
…n canary tests The canary test trait was running OrganizationCreateCommand before overwriting the fixture's Tuist.swift with the correct server URL. Fixtures like generated_project_with_caching_enabled have url: "http://localhost:8080" hardcoded, causing notAuthenticated errors in CI where no local server exists.
aec4d4d to
9f1c636
Compare
pepicrft
added a commit
that referenced
this pull request
Feb 13, 2026
This reverts the static framework resource embedding feature that was introduced across multiple PRs (#9081, #9141, #9210, #9240, #9317, #9382, #9419 and related fixes). Resources for static frameworks go back to being placed in separate .bundle targets instead of being embedded inside the framework itself. The cache version is bumped to invalidate artifacts built with the old embedding approach.
2 tasks
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
When
tuist cachereplaces a local static framework with a precompiled xcframework, the xcframework needs to be embedded in the app so its resources are accessible at runtime. The previous fix (5c3c85f) handled this for direct dependencies only. This PR extends the traversal to also find static xcframeworks that are transitive dependencies through other static targets, ensuring their resources are embedded in the host app.The change switches from a direct-only dependency lookup to a recursive
filterDependenciestraversal that stops at dynamic targets and targets that can embed frameworks.Test plan
test_embeddableFrameworks_when_transitiveStaticXCFrameworkThroughStaticTargettest_embeddableFrameworks_when_dependencyIsStaticXCFrameworkstill passes (direct case)test_embeddableFrameworks_when_dependencyIsTransitiveStaticXCFrameworkstill passes (dynamic framework blocks traversal)test_app_with_objc_static_framework_with_resources_from_cachecovers the end-to-end cache flow