|
| 1 | +// RUN: %empty-directory(%t) |
| 2 | +// RUN: split-file %s %t |
| 3 | + |
| 4 | +// RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=1.0.0.0.1 \ |
| 5 | +// RUN: %target-swift-frontend -emit-module -module-name Foo -o %t/match/Foo.swiftmodule -swift-version 5 \ |
| 6 | +// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \ |
| 7 | +// RUN: -emit-module-interface-path %t/match/Foo.swiftinterface -enable-library-evolution %t/foo.swift |
| 8 | + |
| 9 | +// RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=1.0.0.1 \ |
| 10 | +// RUN: %target-swift-frontend -emit-module -module-name Foo -o %t/new/Foo.swiftmodule -swift-version 5 \ |
| 11 | +// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \ |
| 12 | +// RUN: -emit-module-interface-path %t/new/Foo.swiftinterface -enable-library-evolution %t/foo.swift |
| 13 | + |
| 14 | +// RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=1.0.0.0.2 \ |
| 15 | +// RUN: %target-swift-frontend -emit-module -module-name Foo -o %t/revision/Foo.swiftmodule -swift-version 5 \ |
| 16 | +// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \ |
| 17 | +// RUN: -emit-module-interface-path %t/revision/Foo.swiftinterface -enable-library-evolution %t/foo.swift |
| 18 | + |
| 19 | +// RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=1.0.0.0.1 \ |
| 20 | +// RUN: %target-swift-frontend -scan-dependencies -module-name Test -O -module-load-mode prefer-binary \ |
| 21 | +// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \ |
| 22 | +// RUN: %t/main.swift -o %t/deps-1.json -swift-version 5 -I %t/match |
| 23 | + |
| 24 | +// RUN: %FileCheck %s --check-prefix=BINARY --input-file=%t/deps-1.json |
| 25 | + |
| 26 | +// RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=1.0.0.0.1 \ |
| 27 | +// RUN: %target-swift-frontend -scan-dependencies -module-name Test -O -module-load-mode prefer-binary \ |
| 28 | +// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \ |
| 29 | +// RUN: %t/main.swift -o %t/deps-2.json -swift-version 5 -I %t/new |
| 30 | + |
| 31 | +// RUN: %FileCheck %s --check-prefix=TEXTUAL --input-file=%t/deps-2.json |
| 32 | + |
| 33 | +// RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=1.0.0.0.1 \ |
| 34 | +// RUN: %target-swift-frontend -scan-dependencies -module-name Test -O -module-load-mode prefer-binary \ |
| 35 | +// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \ |
| 36 | +// RUN: %t/main.swift -o %t/deps-3.json -swift-version 5 -I %t/revision |
| 37 | + |
| 38 | +// RUN: %FileCheck %s --check-prefix=BINARY --input-file=%t/deps-3.json |
| 39 | + |
| 40 | +// BINARY: "directDependencies": [ |
| 41 | +// BINARY-NEXT: { |
| 42 | +// BINARY-NEXT: "swiftPrebuiltExternal": "Foo" |
| 43 | +// BINARY-NEXT: } |
| 44 | +// BINARY-NEXT: ] |
| 45 | + |
| 46 | +// TEXTUAL: "directDependencies": [ |
| 47 | +// TEXTUAL-NEXT: { |
| 48 | +// TEXTUAL-NEXT: "swift": "Foo" |
| 49 | +// TEXTUAL-NEXT: } |
| 50 | +// TEXTUAL-NEXT: ] |
| 51 | + |
| 52 | +//--- foo.swift |
| 53 | +public func foo() {} |
| 54 | + |
| 55 | +//--- main.swift |
| 56 | +import Foo |
0 commit comments