You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Frontend: Ignore resilient binary swiftmodules under usr/lib/swift
Most SDKs use only swiftinterfaces under usr/lib/swift. Let's make sure
we standardize this behavior and use only swiftinterface when they are
present, even if there are also binary swiftmodule files available.
Apply the same logic to SubFrameworks as well while we're at it.
rdar://145316821
// RUN: echo "This is a malformed swiftmodule" > %t/sdk/System/Library/Frameworks/PublicSwift.framework/Modules/PublicSwift.swiftmodule/%target-swiftmodule-name
20
37
// RUN: echo "This is a malformed swiftmodule" > %t/sdk/System/Library/PrivateFrameworks/PrivateSwift.framework/Modules/PrivateSwift.swiftmodule/%target-swiftmodule-name
38
+
// RUN: echo "This is a malformed swiftmodule" > %t/sdk/System/Library/SubFrameworks/SubSwift.framework/Modules/SubSwift.swiftmodule/%target-swiftmodule-name
39
+
// RUN: echo "This is a malformed swiftmodule" > %t/sdk/usr/lib/swift/PublicSwiftLibrary.swiftmodule/%target-swiftmodule-name
21
40
22
41
/// There should be no attempt at loading the malformed PublicSwift swiftmodule.
23
42
/// This means no notes about:
@@ -36,3 +55,9 @@ import PrivateSwift
36
55
// expected-remark @-1 {{rebuilding module 'PrivateSwift' from interface}}
37
56
// expected-note @-2 {{compiled module is out of date}}
38
57
// expected-note @-3 {{: malformed}}
58
+
59
+
import PublicSwiftLibrary // expected-remark {{rebuilding module 'PublicSwiftLibrary' from interface}}
60
+
// expected-note @-1 {{was ignored because it's a library module in the SDK}}
61
+
62
+
import SubSwift // expected-remark {{rebuilding module 'SubSwift' from interface}}
63
+
// expected-note @-1 {{was ignored because it belongs to a framework in the SDK}}
0 commit comments