|
5 | 5 | // RUN: %target-swift-frontend -disable-implicit-concurrency-module-import -disable-implicit-string-processing-module-import -emit-module -o %t/nonResilient.swiftmodule %t/empty.swift
|
6 | 6 | // RUN: %target-swift-frontend -disable-implicit-concurrency-module-import -disable-implicit-string-processing-module-import -emit-module -o %t/resilient.swiftmodule %t/empty.swift -enable-library-evolution
|
7 | 7 |
|
8 |
| -/// Check errors. |
9 |
| -// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %t/clientWithError.swift -disable-implicit-concurrency-module-import -disable-implicit-string-processing-module-import -I %t -verify -enable-upcoming-feature InternalImportsByDefault |
| 8 | +/// Warning vs error on public import of a non-LE module from LE. |
| 9 | +// RUN: %target-swift-emit-module-interface(%t.swiftinterface) \ |
| 10 | +// RUN: %t/clientWithError.swift -I %t -verify \ |
| 11 | +// RUN: -disable-implicit-concurrency-module-import \ |
| 12 | +// RUN: -disable-implicit-string-processing-module-import \ |
| 13 | +// RUN: -enable-upcoming-feature InternalImportsByDefault \ |
| 14 | +// RUN: -verify-additional-prefix library-level-private- |
| 15 | +// RUN: %target-swift-emit-module-interface(%t.swiftinterface) \ |
| 16 | +// RUN: %t/clientWithError.swift -I %t -verify \ |
| 17 | +// RUN: -disable-implicit-concurrency-module-import \ |
| 18 | +// RUN: -disable-implicit-string-processing-module-import \ |
| 19 | +// RUN: -enable-upcoming-feature InternalImportsByDefault \ |
| 20 | +// RUN: -verify-additional-prefix library-level-private- -library-level ipi |
| 21 | +// RUN: %target-swift-emit-module-interface(%t.swiftinterface) \ |
| 22 | +// RUN: %t/clientWithError.swift -I %t -verify \ |
| 23 | +// RUN: -disable-implicit-concurrency-module-import \ |
| 24 | +// RUN: -disable-implicit-string-processing-module-import \ |
| 25 | +// RUN: -enable-upcoming-feature InternalImportsByDefault \ |
| 26 | +// RUN: -verify-additional-prefix library-level-public- -library-level spi |
| 27 | +// RUN: %target-swift-emit-module-interface(%t.swiftinterface) \ |
| 28 | +// RUN: %t/clientWithError.swift -I %t -verify \ |
| 29 | +// RUN: -disable-implicit-concurrency-module-import \ |
| 30 | +// RUN: -disable-implicit-string-processing-module-import \ |
| 31 | +// RUN: -enable-upcoming-feature InternalImportsByDefault \ |
| 32 | +// RUN: -verify-additional-prefix library-level-public- -library-level api |
10 | 33 |
|
11 | 34 | /// Check Swift 7 imports printed in swiftinterface from 2 source files.
|
12 | 35 | // RUN: %target-swift-emit-module-interface(%t.swiftinterface) %t/main.swift %t/main-other.swift -disable-implicit-concurrency-module-import -disable-implicit-string-processing-module-import -I %S/Inputs/imports-clang-modules/ -I %t -verify -enable-upcoming-feature InternalImportsByDefault
|
@@ -38,8 +61,11 @@ public import D // expected-warning {{public import of 'D' was not used in publi
|
38 | 61 | public import NotSoSecret // expected-warning {{'NotSoSecret' inconsistently imported as implementation-only}}
|
39 | 62 | // expected-warning @-1 {{public import of 'NotSoSecret' was not used in public declarations or inlinable code}}
|
40 | 63 | @_implementationOnly import NotSoSecret2 // expected-note {{imported as implementation-only here}}
|
| 64 | + |
41 | 65 | //--- clientWithError.swift
|
42 |
| -@_exported public import nonResilient // expected-error {{module 'nonResilient' was not compiled with library evolution support; using it means binary compatibility for 'clientWithError' can't be guaranteed}} |
| 66 | +@_exported public import nonResilient |
| 67 | +// expected-library-level-public-error @-1 {{module 'nonResilient' was not compiled with library evolution support; using it means binary compatibility for 'clientWithError' can't be guaranteed}} |
| 68 | +// expected-library-level-private-warning @-2 {{module 'nonResilient' was not compiled with library evolution support; using it means binary compatibility for 'clientWithError' can't be guaranteed}} |
43 | 69 |
|
44 | 70 | // CHECK-7-NOT: import
|
45 | 71 | // CHECK-7: {{^}}public import A{{$}}
|
|
0 commit comments