Uploaded image for project: 'Swift'
  1. Swift
  2. SR-5677

Error message for inapplicable command line options could be clearer

    XMLWordPrintable

    Details

      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'?

        Attachments

          Activity

            People

            • Assignee:
              deyton Deyton Sehn
              Reporter:
              jalkut@red-sweater.com Daniel Jalkut
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: