mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
For the main source module, provide info on which dependencies are directly imported into the user program, explicitly ('import' statement) or implicitly (e.g. stdlib). Thist list does not include Swift overlay dependencies, cross-import dependencies, bridging header dependencies.
29 lines
1.2 KiB
Swift
29 lines
1.2 KiB
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %empty-directory(%t/module-cache)
|
|
// RUN: %target-swift-frontend -scan-dependencies -module-cache-path %t/module-cache %s -o %t/deps.json -I %S/Inputs/CHeaders -I %S/Inputs/Swift -disable-implicit-concurrency-module-import -disable-implicit-string-processing-module-import
|
|
// Check the contents of the JSON output
|
|
// RUN: %validate-json %t/deps.json | %FileCheck %s
|
|
|
|
// Ensure that round-trip serialization does not affect result
|
|
// RUN: %target-swift-frontend -scan-dependencies -test-dependency-scan-cache-serialization -module-cache-path %t/module-cache %s -o %t/deps.json -I %S/Inputs/CHeaders -I %S/Inputs/Swift -disable-implicit-concurrency-module-import -disable-implicit-string-processing-module-import
|
|
// RUN: %validate-json %t/deps.json | %FileCheck %s
|
|
|
|
// REQUIRES: executable_test
|
|
// REQUIRES: objc_interop
|
|
|
|
import C
|
|
|
|
// CHECK: "sourceImportedDependencies": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-DAG: "swift": "Swift"
|
|
// CHECK-DAG: "swift": "SwiftOnoneSupport"
|
|
// CHECK-DAG: "clang": "C"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
|
|
// CHECK: "swiftOverlayDependencies": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "swift": "A"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|