File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
Sources/SwiftDriver/Driver Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -688,8 +688,7 @@ extension Driver {
688
688
compilerOutputType = nil
689
689
690
690
case . i:
691
- // FIXME: diagnose this
692
- break
691
+ diagnosticsEngine. emit ( . error_i_mode( driverKind) )
693
692
694
693
case . repl, . deprecatedIntegratedRepl, . lldbRepl:
695
694
compilerOutputType = nil
@@ -707,6 +706,17 @@ extension Driver {
707
706
}
708
707
}
709
708
709
+ extension Diagnostic . Message {
710
+ public static func error_i_mode( _ driverKind: DriverKind ) -> Diagnostic . Message {
711
+ . error(
712
+ """
713
+ the flag '-i' is no longer required and has been removed; \
714
+ use ' \( driverKind. usage) input-filename'
715
+ """
716
+ )
717
+ }
718
+ }
719
+
710
720
// Multithreading
711
721
extension Driver {
712
722
/// Determine the number of threads to use for a multithreaded build,
Original file line number Diff line number Diff line change @@ -142,6 +142,12 @@ final class SwiftDriverTests: XCTestCase {
142
142
XCTAssertEqual ( driver3. linkerOutputType, . staticLibrary)
143
143
}
144
144
145
+ func testPrimaryOutputKindsDiagnostics( ) throws {
146
+ try assertDriverDiagnostics ( args: " swift " , " -i " ) {
147
+ $1. expect ( . error_i_mode( . interactive) )
148
+ }
149
+ }
150
+
145
151
func testDebugSettings( ) throws {
146
152
try assertNoDriverDiagnostics ( args: " swiftc " , " foo.swift " , " -emit-module " ) { driver in
147
153
XCTAssertNil ( driver. debugInfoLevel)
You can’t perform that action at this time.
0 commit comments