Skip to content

[5.0] [Driver] Don't suggest using the "major version" for -swift-version #21169

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

Merged

Conversation

jrose-apple
Copy link
Contributor

  • Explanation: Passing an unsupported number to -swift-version produces a diagnostic that looks like this when the number has a minor component:

      $ swiftc -swift-version 4.1 foo.swift
      <unknown>:0: error: invalid value '4.1' in '-swift-version 4.1'
      <unknown>:0: note: use major version, as in '-swift-version 4'
    

    This was a nice feature when people said -swift-version 4.1...up until we got -swift-version 4.2 as an actual valid version. This change just drops the special case.

  • Scope: Diagnosing an invalid argument only.

  • Issue: SR-8850 / rdar://problem/44797691

  • Risk: Very low. No valid compile can be depending on this, since it produces an error.

  • Testing: Passed regression tests.

  • Reviewed by: @davidungar

…wiftlang#20563)

This was a nice feature when people said "-swift-version 3.1"...
up until we got "-swift-version 4.2" as an actual valid version.
Just drop the special case.

https://bugs.swift.org/browse/SR-8850
(cherry picked from commit 00ed3e1)
@jrose-apple jrose-apple requested a review from a team as a code owner December 10, 2018 16:48
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

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

Successfully merging this pull request may close these issues.

2 participants