[SR-5677] Error message for inapplicable command line options could be clearer #48247
Labels
compiler
The Swift compiler in itself
good first issue
Good for newcomers
improvement
legacy driver
Area → compiler: the integrated C++ legacy driver. Succeeded by the swift-driver project
Additional Detail from JIRA
md5: 9c5c9edc9a419a8de844d1c26013e2e8
Issue Description:
If 'swift' is invoked with command line options that are only pertinent to 'swiftc', the error message that results should cut to the chase and emphasize that the user probably wants to invoke 'swiftc'. The inclusion of the inapplicable options in the "did you mean" text leads users (well, me anyway) to scrutinize the choice of option, rather than the choice of tool name.
From the Terminal, run:
swift -emit-assembly
Results in an error:
<unknown>:0: error: unsupported option '-emit-assembly' for 'swift'; did you mean 'swiftc -emit-assembly'?
I think it would be less confusing if the error message emphasized the likely wrong choice of command line tool:
<unknown>:0: error: unsupported option '-emit-assembly' for 'swift'; did you mean to use 'swiftc'?
The text was updated successfully, but these errors were encountered: