From 425b693c264e6f93ffcaf7b1501836316de87ad9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fo=C5=99t?= Date: Mon, 23 Sep 2024 22:59:21 +0200 Subject: [PATCH] Embed precompiled bundles linked through a dynamic framework (#6721) * Embed precompiiled bundles linked through a dynamic framework * Trigger CI --- Sources/TuistCore/Graph/GraphTraverser.swift | 9 +++++---- Tests/TuistCoreTests/Graph/GraphTraverserTests.swift | 10 ++++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Sources/TuistCore/Graph/GraphTraverser.swift b/Sources/TuistCore/Graph/GraphTraverser.swift index 6a3605e36aa..4bfc34d6ebc 100644 --- a/Sources/TuistCore/Graph/GraphTraverser.swift +++ b/Sources/TuistCore/Graph/GraphTraverser.swift @@ -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 ) @@ -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 ) diff --git a/Tests/TuistCoreTests/Graph/GraphTraverserTests.swift b/Tests/TuistCoreTests/Graph/GraphTraverserTests.swift index 1cfbcc3b208..95ef4b89d53 100644 --- a/Tests/TuistCoreTests/Graph/GraphTraverserTests.swift +++ b/Tests/TuistCoreTests/Graph/GraphTraverserTests.swift @@ -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() {