Conversation
fortmarek
added a commit
to tuist/tuist
that referenced
this pull request
Feb 10, 2026
Add `.foreignBuild()` dependency type that wraps binary dependencies with build instructions and cache inputs, enabling Tuist's module caching and selective testing to work with artifacts from external build systems (KMP, Rust, CMake, etc.). - Add `CacheInput` type to ProjectDescription - Add `foreignBuild` case to TargetDependency across all layers - Add `ForeignBuildCacheInputHasher` for content hashing of cache inputs - Add `ForeignBuildGraphMapper` that transforms foreign builds into synthetic script targets + binary dependencies - Wire mapper into GraphMapperFactory pipeline - Update all exhaustive switches to handle the new case Depends on: tuist/XcodeGraph#495 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5 tasks
Member
Author
|
Closing this PR — it's no longer needed. The tuist PR (#9400) was refactored from the dependency-based approach (
This PR is a leftover from the dependency-based approach that was abandoned in favor of the cleaner target-based design. |
pepicrft
reviewed
Feb 13, 2026
| public var isPrecompiled: Bool { | ||
| switch self { | ||
| case .macro: return true | ||
| case .foreignBuildOutput: return true |
Contributor
There was a problem hiding this comment.
Isn't the output of a foreign-built one of the existing types? (i.e. .xcframework, .library, or .library). If so, but we need to know it's from a foreignBuildOutput, can't we adjust the existing cases?
Member
Author
There was a problem hiding this comment.
Same as here: tuist/tuist#9400 (comment)
For the foreign build, we don't know everything about the .xcframework in advance.
Add support for foreign build system dependencies (KMP, Rust, CMake, etc.) by introducing a new `foreignBuild` case on `TargetDependency` and a `ForeignBuildCacheInput` model for content hashing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…dInput, and ForeignBuildArtifact Replace TargetDependency.foreignBuild case with Target.foreignBuild property using dedicated ForeignBuildInfo, ForeignBuildInput, and ForeignBuildArtifact types. Add GraphDependency.foreignBuildOutput for linking resolution. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…fact Rename `ForeignBuildInfo` to `ForeignBuild` to match the ProjectDescription naming convention. Nest `ForeignBuildInput` and `ForeignBuildArtifact` as `ForeignBuild.Input` and `ForeignBuild.Artifact` for cleaner namespacing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove .framework and .library cases from ForeignBuild.Artifact. XCFramework is the only supported output format for foreign builds as it provides multi-architecture support and cache compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The foreignBuild case was removed from TargetDependency (it moved to the Target model), but the test file still referenced it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
024fde1 to
7c8db3f
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Add graph model support for foreign build system dependencies (KMP, Rust, CMake, etc.):
ForeignBuildInfomodel with script, inputs, and output artifactForeignBuildInputenum (.file,.folder,.script) for cache inputsForeignBuildArtifactenum (.xcframework,.framework,.library) for build outputsTarget.foreignBuildproperty andTarget.isAggregatecomputed propertyGraphDependency.foreignBuildOutputcase for linking resolutionTargetDependency.foreignBuildindirect case in favor of the new modelCompanion PR
Test plan
test_codable_foreignBuildverifies Codable round-triptest_filteringverifiesconditionandwithCondition🤖 Generated with Claude Code