Skip to content

Commit f46d841

Browse files
committed
[Test] Enable library-evolution in relevant tests using swiftinterfaces
1 parent c31727f commit f46d841

File tree

56 files changed

+81
-81
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+81
-81
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// swift-interface-format-version: 1.0
2-
// swift-module-flags: -swift-version 5 -enforce-exclusivity=checked -module-name SIMod
2+
// swift-module-flags: -swift-version 5 -enforce-exclusivity=checked -module-name SIMod -enable-library-evolution
33
import CIMod
44

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// swift-interface-format-version: 1.0
2-
// swift-module-flags: -target x86_64-apple-macos10.9 -module-name OtherModule -O
2+
// swift-module-flags: -target x86_64-apple-macos10.9 -module-name OtherModule -O -enable-library-evolution
33

44
import Swift
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// swift-interface-format-version: 1.0
2-
// swift-module-flags: -target x86_64-apple-macos10.9 -module-name Swift -parse-stdlib
2+
// swift-module-flags: -target x86_64-apple-macos10.9 -module-name Swift -parse-stdlib -enable-library-evolution
33

44
public struct Int {}
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// swift-interface-format-version: 1.0
2-
// swift-module-flags: -target x86_64-apple-macos10.9 -module-name _Concurrency -parse-stdlib
2+
// swift-module-flags: -target x86_64-apple-macos10.9 -module-name _Concurrency -parse-stdlib -enable-library-evolution
33

44
@frozen public enum Task {}

test/ModuleInterface/ModuleCache/Inputs/mock-sdk/ExportedLib.swiftinterface

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// swift-interface-format-version: 1.0
2-
// swift-module-flags: -parse-stdlib -module-name ExportedLib
2+
// swift-module-flags: -parse-stdlib -module-name ExportedLib -enable-library-evolution
33

44
@_exported import SomeCModule
55

66
public struct ExportedInterface {
7-
@inlinable public init() {}
7+
@inlinable public init() { self.init() }
88
}
99
public var testValue: ExportedInterface {
1010
@inlinable get { return ExportedInterface() }

test/ModuleInterface/ModuleCache/Inputs/mock-sdk/SdkLib.swiftinterface

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// swift-interface-format-version: 1.0
2-
// swift-module-flags: -parse-stdlib -module-name SdkLib
2+
// swift-module-flags: -parse-stdlib -module-name SdkLib -enable-library-evolution
33

44
@_exported import ExportedLib
55

test/ModuleInterface/ModuleCache/Inputs/prebuilt-module-cache/Lib.swiftinterface

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// swift-interface-format-version: 1.0
2-
// swift-module-flags: -parse-stdlib -module-name Lib
2+
// swift-module-flags: -parse-stdlib -module-name Lib -enable-library-evolution
33

44
public struct FromInterface {
5-
@inlinable public init() {}
5+
@inlinable public init() { self.init() }
66
}
77
public var testValue: FromInterface {
88
@inlinable get { return FromInterface() }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// swift-interface-format-version: 1.0
2-
// swift-module-flags: -parse-stdlib -module-name LibExporter
2+
// swift-module-flags: -parse-stdlib -module-name LibExporter -enable-library-evolution
33

44
@_exported import Lib

test/ModuleInterface/ModuleCache/RebuildRemarks/malformed-compiled-module.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// RUN: echo 'public func publicFunction() {}' > %t/TestModule.swift
77

88
// 2. Create an interface for it
9-
// RUN: %target-swift-frontend -typecheck %t/TestModule.swift -emit-module-interface-path %t/Build/TestModule.swiftinterface -swift-version 5
9+
// RUN: %target-swift-frontend -typecheck %t/TestModule.swift -emit-module-interface-path %t/Build/TestModule.swiftinterface -swift-version 5 -enable-library-evolution
1010

1111
// 3. Create an empty .swiftmodule, which will force recompiling from the interface
1212
// RUN: touch %t/Build/TestModule.swiftmodule
@@ -16,4 +16,4 @@
1616

1717
import TestModule // expected-remark {{rebuilding module 'TestModule' from interface}}
1818
// expected-note @-1 {{is out of date}}
19-
// expected-note @-2 {{malformed}}
19+
// expected-note @-2 {{malformed}}

test/ModuleInterface/ModuleCache/RebuildRemarks/missing-dependency.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// RUN: echo 'public func publicFunction() {}' > %t/TestModule.swift
66

77
// 2. Create both an interface and a compiled module for it
8-
// RUN: %target-swift-frontend -emit-module -o %t/Build/TestModule.swiftmodule %t/TestModule.swift -emit-module-interface-path %t/Build/TestModule.swiftinterface -swift-version 5 -module-name TestModule
8+
// RUN: %target-swift-frontend -emit-module -o %t/Build/TestModule.swiftmodule %t/TestModule.swift -emit-module-interface-path %t/Build/TestModule.swiftinterface -swift-version 5 -module-name TestModule -enable-library-evolution
99

1010
// 3. Make the compiled module unreadable so it gets added as a dependency but is not used
1111
// RUN: mv %t/Build/TestModule.swiftmodule %t/Build/TestModule.swiftmodule.moved-aside

0 commit comments

Comments
 (0)