[SR-8850] swiftc error for unsupported -swift-version shouldn't tell user to use major version #51356
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
legacy driver
Area → compiler: the integrated C++ legacy driver. Succeeded by the swift-driver project
Environment
Apple Swift version 4.2 (swiftlang-1000.11.37.1 clang-1000.11.45.1)
Target: x86_64-apple-darwin18.0.0
Additional Detail from JIRA
md5: acbde8337bb87d5f58122c392669a832
Issue Description:
Right now passing an unsupported minor Swift version to
swiftc -swift-version
tells the user to use a major version number. This error message is bad because we actually support a version with a minor version number (4.2
). The other problem with this error is it doesn't tell the user what the supported versions are, which the error you get by specifying an unsupported major version number does. The fact that the other error tells the user what the supported versions are is sufficient info to let them infer that they should usually not specify a minor version.Current behavior:
Expected behavior:
The text was updated successfully, but these errors were encountered: