Skip to content

Commit 52e6839

Browse files
committed
Adopt MemberImportVisiblity - PackageGraphTests
1 parent 4a7e73c commit 52e6839

File tree

6 files changed

+12
-3
lines changed

6 files changed

+12
-3
lines changed

Package.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,10 @@ let package = Package(
876876
),
877877
.testTarget(
878878
name: "PackageGraphTests",
879-
dependencies: ["PackageGraph", "_InternalTestSupport"]
879+
dependencies: ["PackageGraph", "_InternalTestSupport"],
880+
swiftSettings: [
881+
.enableExperimentalFeature("MemberImportVisibility"),
882+
],
880883
),
881884
.testTarget(
882885
name: "PackageGraphPerformanceTests",

Sources/PackageGraph/ModulesGraph.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,8 @@ enum GraphError: Error {
384384
case unexpectedCycle
385385
}
386386

387+
// TODO: Rename this back and only import what is required from TSCBasic to omit importing its implementation of topologicalSort
388+
387389
/// Perform a topological sort of an graph.
388390
///
389391
/// This function is optimized for use cases where cycles are unexpected, and

Tests/PackageGraphTests/CrossCompilationPackageGraphTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import _InternalTestSupport
1717
@testable
1818
import PackageGraph
1919

20+
import PackageModel
2021
import XCTest
2122

2223
final class CrossCompilationPackageGraphTests: XCTestCase {

Tests/PackageGraphTests/ModulesGraphTests.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
import Basics
14+
import PackageLoading
15+
import TSCUtility
1416

1517
@_spi(DontAdoptOutsideOfSwiftPMExposedForBenchmarksAndTestsOnly)
1618
@testable import PackageGraph
@@ -2921,7 +2923,7 @@ final class ModulesGraphTests: XCTestCase {
29212923
]
29222924

29232925
let expectedPlatformsForTests = customXCTestMinimumDeploymentTargets
2924-
.reduce(into: [Platform: PlatformVersion]()) { partialResult, entry in
2926+
.reduce(into: [PackageModel.Platform: PlatformVersion]()) { partialResult, entry in
29252927
if entry.value > entry.key.oldestSupportedVersion {
29262928
partialResult[entry.key] = entry.value
29272929
} else {

Tests/PackageGraphTests/TopologicalSortTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ extension Int {
3737
extension Int: @retroactive Identifiable {}
3838

3939
private func topologicalSort(_ nodes: [Int], _ successors: [Int: [Int]]) throws -> [Int] {
40-
return try topologicalSort(nodes, successors: { successors[$0] ?? [] })
40+
return try topologicalSortIdentifiable(nodes, successors: { successors[$0] ?? [] })
4141
}
4242
private func topologicalSort(_ node: Int, _ successors: [Int: [Int]]) throws -> [Int] {
4343
return try topologicalSort([node], successors)

Tests/PackageGraphTests/VersionSetSpecifierTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
import Foundation
14+
import TSCUtility
1415
import XCTest
1516

1617
import PackageGraph

0 commit comments

Comments
 (0)