mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Frontend: add a flag to downgrade all module interface verification errors to warnings
Ideally, module interface verification should fail the build when fatal error occurs when type checking emitted module interfaces. However, we found it's hard to stage this phase in because the ideal case requires all Swift adopters to have valid interfaces. This new front-end flag allows driver to downgrade all interface verification errors to warnings as an intermediate step.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: echo "// swift-interface-format-version: 1.0" > %t/Main.swiftinterface
|
||||
// RUN: echo "// swift-module-flags: -module-name Foo" >> %t/Main.swiftinterface
|
||||
// RUN: echo "malfunctioned" >> %t/Main.swiftinterface
|
||||
// RUN: %target-swift-frontend -typecheck-module-from-interface %t/Main.swiftinterface -module-name Foo -downgrade-typecheck-interface-error &> %t/results.txt
|
||||
// RUN: %FileCheck --input-file %t/results.txt %s
|
||||
|
||||
// CHECK: warning:
|
||||
// CHECK-NOT: error:
|
||||
Reference in New Issue
Block a user