Skip to content

Commit

Permalink
Merge pull request #1536 from ahoppen/fix-merge-race
Browse files Browse the repository at this point in the history
Fix a compilation issue caused by #1533 and #1524 racing
  • Loading branch information
ahoppen authored Jun 28, 2024
2 parents 16e4f83 + c6b82a7 commit e5d93e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Sources/SKSwiftPMWorkspace/SwiftPMBuildSystem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,10 @@ public actor SwiftPMBuildSystem {
let hostSwiftPMToolchain = try UserToolchain(swiftSDK: hostSDK)

var destinationSDK: SwiftSDK
if let swiftSDK = options.swiftSDK {
if let swiftSDK = options.swiftPM.swiftSDK {
let bundleStore = try SwiftSDKBundleStore(
swiftSDKsDirectory: fileSystem.getSharedSwiftSDKsDirectory(
explicitDirectory: options.swiftSDKsDirectory.map { try AbsolutePath(validating: $0) }
explicitDirectory: options.swiftPM.swiftSDKsDirectory.map { try AbsolutePath(validating: $0) }
),
fileSystem: fileSystem,
observabilityScope: observabilitySystem.topScope,
Expand All @@ -235,7 +235,7 @@ public actor SwiftPMBuildSystem {
destinationSDK = hostSDK
}

if let triple = options.triple {
if let triple = options.swiftPM.triple {
destinationSDK = hostSDK
destinationSDK.targetTriple = try Triple(triple)
}
Expand Down
6 changes: 5 additions & 1 deletion Sources/SKTestSupport/TestSourceKitLSPClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ import XCTest

extension SourceKitLSPOptions {
public static func testDefault(experimentalFeatures: Set<ExperimentalFeature>? = nil) -> SourceKitLSPOptions {
return SourceKitLSPOptions(experimentalFeatures: experimentalFeatures, swiftPublishDiagnosticsDebounceDuration: 0)
return SourceKitLSPOptions(
experimentalFeatures: experimentalFeatures,
swiftPublishDiagnosticsDebounceDuration: 0,
workDoneProgressDebounceDuration: 0
)
}
}

Expand Down

0 comments on commit e5d93e1

Please sign in to comment.