@@ -9,7 +9,7 @@ public func foo() {}
9
9
/// Build Lib as a resilient and non-resilient swiftmodule
10
10
// RUN: %target-swift-frontend -emit-module %t/Lib.swift -swift-version 5 -o %t/build -parse-stdlib -module-cache-path %t/cache -module-name ResilientLib -enable-library-evolution
11
11
// RUN: %target-swift-frontend -emit-module %t/Lib.swift -swift-version 5 -o %t/build -parse-stdlib -module-cache-path %t/cache -module-name NonResilientLib
12
- // RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=my-revision \
12
+ // RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=1.0.0.0.1 \
13
13
// RUN: %target-swift-frontend -emit-module %t/Lib.swift -swift-version 5 -o %t/build -parse-stdlib -module-cache-path %t/cache -module-name TaggedLib -enable-library-evolution
14
14
15
15
@@ -19,9 +19,9 @@ import NonResilientLib
19
19
foo ( )
20
20
21
21
/// Building a NonResilientLib client should reject the import for a tagged compiler
22
- // RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=my-revision \
22
+ // RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=1.0.0.0.1 \
23
23
// RUN: not %target-swift-frontend -typecheck %t/NonResilientClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache 2>&1 | %FileCheck -check-prefix=CHECK-NON-RESILIENT %s
24
- // CHECK-NON-RESILIENT: compiled module was created by a different version of the compiler; rebuild 'NonResilientLib' and try again: {{.*}}NonResilientLib.swiftmodule
24
+ // CHECK-NON-RESILIENT: compiled module was created by a different version of the compiler '' ; rebuild 'NonResilientLib' and try again: {{.*}}NonResilientLib.swiftmodule
25
25
26
26
27
27
/// 3. Test importing the resilient untagged library
@@ -33,12 +33,12 @@ foo()
33
33
// RUN: %target-swift-frontend -typecheck %t/ResilientClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache
34
34
35
35
/// Building a ResilientLib client should reject the import for a tagged compiler
36
- // RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=not-a-revision \
36
+ // RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=1.0.0.0.1 \
37
37
// RUN: not %target-swift-frontend -typecheck %t/ResilientClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache 2>&1 | %FileCheck %s
38
- // CHECK: compiled module was created by a different version of the compiler; rebuild 'ResilientLib' and try again: {{.*}}ResilientLib.swiftmodule
38
+ // CHECK: compiled module was created by a different version of the compiler '' ; rebuild 'ResilientLib' and try again: {{.*}}ResilientLib.swiftmodule
39
39
40
- /// Building a ResilientLib client should succeed for a tagged compiler with SWIFT_DEBUG_IGNORE_SWIFTMODULE_REVISION
41
- // RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=not-a-revision SWIFT_DEBUG_IGNORE_SWIFTMODULE_REVISION =true \
40
+ /// Building a ResilientLib client should succeed for a tagged compiler with SWIFT_IGNORE_SWIFTMODULE_REVISION
41
+ // RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=1.0.0.0.1 SWIFT_IGNORE_SWIFTMODULE_REVISION =true \
42
42
// RUN: %target-swift-frontend -typecheck %t/ResilientClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache
43
43
44
44
@@ -47,12 +47,19 @@ foo()
47
47
import TaggedLib
48
48
foo ( )
49
49
50
- /// Importing TaggedLib should succeed with the same tag or a dev compiler
51
- // RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=my-revision \
50
+ /// Importing TaggedLib should succeed with the same tag.
51
+ // RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=1.0.0.0.1 \
52
52
// RUN: %target-swift-frontend -typecheck %t/TaggedClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache
53
+
54
+ /// Importing TaggedLib should succeed with a dev compiler
53
55
// RUN: %target-swift-frontend -typecheck %t/TaggedClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache
54
56
57
+ /// Importing TaggedLib should succeed but remark on a last digit difference.
58
+ // RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=1.0.0.0.2 \
59
+ // RUN: %target-swift-frontend -typecheck %t/TaggedClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache 2>&1 | %FileCheck %s --check-prefix=CHECK-LAST-DIGIT
60
+ // CHECK-LAST-DIGIT: remark: compiled module was created by a different version of the compiler '1.0.0.0.1': {{.*}}TaggedLib.swiftmodule
61
+
55
62
/// Building a TaggedLib client should reject the import for a different tagged compiler
56
- // RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=not-a-revision \
63
+ // RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=1.0.0.1.1 \
57
64
// RUN: not %target-swift-frontend -typecheck %t/TaggedClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache 2>&1 | %FileCheck %s --check-prefix=CHECK-TAGGED
58
- // CHECK-TAGGED: compiled module was created by a different version of the compiler; rebuild 'TaggedLib' and try again: {{.*}}TaggedLib.swiftmodule
65
+ // CHECK-TAGGED: error: compiled module was created by a different version of the compiler '1.0.0.0.1' ; rebuild 'TaggedLib' and try again: {{.*}}TaggedLib.swiftmodule
0 commit comments