Skip to content

Commit 881f0f5

Browse files
authored
Merge pull request swiftlang#1873 from ahoppen/swiftpm-child-scopes
Create child scopes for SwiftPM operations
2 parents 87af5b0 + 3887894 commit 881f0f5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/BuildSystemIntegration/SwiftPMBuildSystem.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,10 @@ package actor SwiftPMBuildSystem: BuiltInBuildSystem {
302302
explicitDirectory: options.swiftPMOrDefault.swiftSDKsDirectory.map { try AbsolutePath(validating: $0) }
303303
),
304304
fileSystem: localFileSystem,
305-
observabilityScope: observabilitySystem.topScope,
305+
observabilityScope: observabilitySystem.topScope.makeChildScope(description: "SwiftPM Bundle Store"),
306306
outputHandler: { _ in }
307307
),
308-
observabilityScope: observabilitySystem.topScope,
308+
observabilityScope: observabilitySystem.topScope.makeChildScope(description: "Derive Target Swift SDK"),
309309
fileSystem: localFileSystem
310310
)
311311

@@ -414,7 +414,7 @@ package actor SwiftPMBuildSystem: BuiltInBuildSystem {
414414
let modulesGraph = try await self.swiftPMWorkspace.loadPackageGraph(
415415
rootInput: PackageGraphRootInput(packages: [AbsolutePath(validating: projectRoot.filePath)]),
416416
forceResolvedVersions: !isForIndexBuild,
417-
observabilityScope: observabilitySystem.topScope
417+
observabilityScope: observabilitySystem.topScope.makeChildScope(description: "Load package graph")
418418
)
419419

420420
let plan = try await BuildPlan(
@@ -423,7 +423,7 @@ package actor SwiftPMBuildSystem: BuiltInBuildSystem {
423423
graph: modulesGraph,
424424
disableSandbox: options.swiftPMOrDefault.disableSandbox ?? false,
425425
fileSystem: localFileSystem,
426-
observabilityScope: observabilitySystem.topScope
426+
observabilityScope: observabilitySystem.topScope.makeChildScope(description: "Create SwiftPM build plan")
427427
)
428428
let buildDescription = BuildDescription(buildPlan: plan)
429429
self.buildDescription = buildDescription

0 commit comments

Comments
 (0)