Skip to content

swift --help doesn't show -language-mode option #1894

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ole opened this issue May 10, 2025 · 0 comments
Open

swift --help doesn't show -language-mode option #1894

ole opened this issue May 10, 2025 · 0 comments

Comments

@ole
Copy link

ole commented May 10, 2025

I wasn't sure whether to file this issue here in the driver repo or under swiftlang/swift. Apologies if this is the wrong place.

I noticed that the Swift 6.1 compiler doesn't show the renamed -language-mode option in its --help output. Instead, it still displays the old -swift-version option. The accepted proposal SE-0441 specifies the reverse:

The -language-mode option will be presented in the compiler help.

The -swift-version option will be suppressed from the top-level help of the compiler.

Here's the output I'm getting from Swift 6.1 (tested on macOS 15.4.1 with the toolchain that ships with Xcode 16.3).

$ swift --version
swift-driver version: 1.120.5 Apple Swift version 6.1 (swiftlang-6.1.0.110.21 clang-1700.0.13.3)
Target: arm64-apple-macosx15.0

# Searching for the term "language" shows the old -swift-version option,
# but not the new -language-mode.
$ swift --help | grep -i language
                          Disable a feature that will be introduced in an upcoming language version
                          Enable a feature that will be introduced in an upcoming language version
  -locale <locale-code>   Choose a language for diagnostic messages
  -swift-version <vers>   Interpret input according to a specific Swift language version number
  -warn-concurrency       Warn about code that is unsafe according to the Swift Concurrency model and will become ill-formed in a future language version

Note that swiftc -frontend --help does show the option (it still shows -swift-version too, contradicting SE-0441):

$ swift -frontend --help | grep -i -- language

  -language-mode <mode>   Interpret input according to a specific Swift language mode

  -swift-version <vers>   Interpret input according to a specific Swift language version number

As far as I can tell, the relevant pull requests have been merged long ago:

Is something else needed to release these changes to the driver and not just the frontend?

cc @dempseyatgithub in case you're interested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant