Skip to content

Commit

Permalink
Add missing graph from tuist xcodebuild run metadata (tuist#7298)
Browse files Browse the repository at this point in the history
  • Loading branch information
fortmarek authored Feb 11, 2025
1 parent 7c27a3a commit 536dc45
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions Sources/TuistKit/Services/XcodeBuildService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ struct XcodeBuildService {
throw XcodeBuildServiceError.schemeNotPassed
}
let graph = try await xcodeGraphMapper.map(at: path)
try await ServiceContext.current?.runMetadataStorage?.update(graph: graph)
let graphTraverser = GraphTraverser(graph: graph)
guard let scheme = graphTraverser.schemes().first(where: {
$0.name == schemeName
Expand Down
17 changes: 10 additions & 7 deletions Tests/TuistKitTests/Services/XcodeBuildServiceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -264,15 +264,15 @@ struct XcodeBuildServiceTests {
]
)

let graph: Graph = .test(
projects: [
temporaryPath: project,
]
)

given(xcodeGraphMapper)
.map(at: .any)
.willReturn(
.test(
projects: [
temporaryPath: project,
]
)
)
.willReturn(graph)

given(selectiveTestingGraphHasher)
.hash(
Expand Down Expand Up @@ -367,6 +367,9 @@ struct XcodeBuildServiceTests {
],
]
)
await #expect(
runMetadataStorage.graph == graph
)
}
}
}
Expand Down

0 comments on commit 536dc45

Please sign in to comment.