@@ -252,10 +252,12 @@ public struct PubGrubDependencyResolver {
252
252
}
253
253
254
254
let products = assignment. term. node. productFilter
255
- let container = try await withCheckedThrowingContinuation {
255
+ let container = try await withCheckedThrowingContinuation { continuation in
256
256
self . provider. getContainer (
257
257
for: assignment. term. node. package ,
258
- completion: $0. resume ( with: )
258
+ completion: {
259
+ continuation. resume ( with: $0)
260
+ }
259
261
)
260
262
}
261
263
let updatePackage = try await container. underlying. loadPackageReference ( at: boundVersion)
@@ -278,8 +280,10 @@ public struct PubGrubDependencyResolver {
278
280
279
281
// Add overridden packages to the result.
280
282
for (package , override) in state. overriddenPackages {
281
- let container = try await withCheckedThrowingContinuation {
282
- self . provider. getContainer ( for: package , completion: $0. resume ( with: ) )
283
+ let container = try await withCheckedThrowingContinuation { continuation in
284
+ self . provider. getContainer ( for: package , completion: {
285
+ continuation. resume ( with: $0)
286
+ } )
283
287
}
284
288
let updatePackage = try await container. underlying. loadPackageReference ( at: override. version)
285
289
finalAssignments. append ( . init(
@@ -340,10 +344,12 @@ public struct PubGrubDependencyResolver {
340
344
// We collect all version-based dependencies in a separate structure so they can
341
345
// be process at the end. This allows us to override them when there is a non-version
342
346
// based (unversioned/branch-based) constraint present in the graph.
343
- let container = try await withCheckedThrowingContinuation {
347
+ let container = try await withCheckedThrowingContinuation { continuation in
344
348
self . provider. getContainer (
345
349
for: node. package ,
346
- completion: $0. resume ( with: )
350
+ completion: {
351
+ continuation. resume ( with: $0)
352
+ }
347
353
)
348
354
}
349
355
for dependency in try await container. underlying
@@ -394,8 +400,10 @@ public struct PubGrubDependencyResolver {
394
400
395
401
// Process dependencies of this package, similar to the first phase but branch-based dependencies
396
402
// are not allowed to contain local/unversioned packages.
397
- let container = try await withCheckedThrowingContinuation {
398
- self . provider. getContainer ( for: package , completion: $0. resume ( with: ) )
403
+ let container = try await withCheckedThrowingContinuation { continuation in
404
+ self . provider. getContainer ( for: package , completion: {
405
+ continuation. resume ( with: $0)
406
+ } )
399
407
}
400
408
401
409
// If there is a pin for this revision-based dependency, get
@@ -676,7 +684,9 @@ public struct PubGrubDependencyResolver {
676
684
for term in terms {
677
685
group. addTask {
678
686
let container = try await withCheckedThrowingContinuation { continuation in
679
- self . provider. getContainer ( for: term. node. package , completion: continuation. resume ( with: ) )
687
+ self . provider. getContainer ( for: term. node. package , completion: {
688
+ continuation. resume ( with: $0)
689
+ } )
680
690
}
681
691
return try await ( term, container. versionCount ( term. requirement) )
682
692
}
0 commit comments