Skip to content

Commit

Permalink
Embed precompiled bundles linked through a dynamic framework (tuist#6721
Browse files Browse the repository at this point in the history
)

* Embed precompiiled bundles linked through a dynamic framework

* Trigger CI
  • Loading branch information
fortmarek authored Sep 23, 2024
1 parent 16682e2 commit 425b693
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
9 changes: 5 additions & 4 deletions Sources/TuistCore/Graph/GraphTraverser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ public class GraphTraverser: GraphTraversing {
let bundles = filterDependencies(
from: .target(name: name, path: path),
test: { dependency in
isDependencyResourceBundle(dependency: dependency)
&& !isDependencyExternal(dependency)
isDependencyResourceBundle(dependency: dependency) &&
!(isDependencyExternal(dependency) || dependency.isPrecompiled)
},
skip: canHostResources
)
Expand All @@ -231,8 +231,9 @@ public class GraphTraverser: GraphTraversing {
let externalBundles = filterDependencies(
from: .target(name: name, path: path),
test: { dependency in
isDependencyResourceBundle(dependency: dependency)
&& isDependencyExternal(dependency) && canEmbedBundles(target: target)
isDependencyResourceBundle(dependency: dependency) &&
(isDependencyExternal(dependency) || dependency.isPrecompiled) &&
canEmbedBundles(target: target)
},
skip: canDependencyEmbedBundles
)
Expand Down
10 changes: 6 additions & 4 deletions Tests/TuistCoreTests/Graph/GraphTraverserTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -805,10 +805,12 @@ final class GraphTraverserTests: TuistUnitTestCase {
).sorted()

// Then
XCTAssertEqual(appResults, [])
XCTAssertEqual(frameworkResults, [
.bundle(path: bundlePath),
])
XCTAssertEqual(
appResults, [
.bundle(path: bundlePath),
]
)
XCTAssertEqual(frameworkResults, [])
}

func test_target_from_dependency() {
Expand Down

0 comments on commit 425b693

Please sign in to comment.