Skip to content

Fix Swift 5.7 build errors#676

Merged
rauhul merged 4 commits into
apple:mainfrom
rgoldberg:675-fix-swift-5.7-build
Nov 6, 2024
Merged

Fix Swift 5.7 build errors#676
rauhul merged 4 commits into
apple:mainfrom
rgoldberg:675-fix-swift-5.7-build

Conversation

@rgoldberg
Copy link
Copy Markdown
Contributor

@rgoldberg rgoldberg commented Oct 31, 2024

Fixed all Swift 5.7 build breaks in main, namely:

  • Package.swift: target array missing a comma
  • ToolInfo.swift: contains 2 if expressions, which are not supported by Swift 5.7
  • GenerateManual.swift: contains switch expression, which is not supported by Swift 5.7
  • DumpHelpGenerationTests.swift: contains switch expression, which is not supported by Swift 5.7

Resolve #675

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

Insert missing comma in targets array in Package.swift to fix Swift 5.7 build
break from commit 83c5134.

Add missing spaces to properly indent code from same commit.

Partial apple#675

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Replace 2 if expressions (which are not supported by Swift 5.7) that were added
to ToolInfo.swift by commit 83c5134.

Remove extraneous trailing newline at end of file.

Partial apple#675

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Replace switch expression (which is not supported by Swift 5.7) that was added
to GenerateManual.swift by commit 44dd206.

Resolve apple#675

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Replace switch expression (which is not supported by Swift 5.7) that was added
to DumpHelpGenerationTests.swift by commit 83c5134.

Resolve apple#675

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
@rgoldberg rgoldberg changed the title Swift 5.7 build errors Fix Swift 5.7 build errors Oct 31, 2024
@rauhul
Copy link
Copy Markdown
Collaborator

rauhul commented Nov 6, 2024

@swift-ci please test

@rauhul
Copy link
Copy Markdown
Collaborator

rauhul commented Nov 6, 2024

I'd love a follow up PR that drops the increases supported version of argument parser to one of 5.9, 5.10, or 6.0. I think 5.9 is most inline with other repos like swift-nio which try to support the last 3 minor releases of Swift.

@rgoldberg
Copy link
Copy Markdown
Contributor Author

@rauhul Please don't drop support for 5.7 anytime soon. I am working on fixing many issues in completion script generation. The project for which I'm using SAP is mas, which still needs to support 5.7.

@rauhul
Copy link
Copy Markdown
Collaborator

rauhul commented Nov 6, 2024

@rauhul Please don't drop support for 5.7 anytime soon. I am working on fixing many issues in completion script generation. The project for which I'm using SAP is mas, which still needs to support 5.7.

Gotcha, what's preventing yall from updating to a newer toolchain?

@rgoldberg
Copy link
Copy Markdown
Contributor Author

rgoldberg commented Nov 6, 2024

Some developers stuck on macOS 12 (therefore Xcode 14.2, therefore Swift 5.7) until M4 Mac Studio release.

I'd suggest supporting Swift back to the most recent EOL macOS (currently macOS 12, so Swift 5.7), to give people leeway to purchase the replacement machine they want when their Mac goes EOL.

@rauhul rauhul merged commit e4009c1 into apple:main Nov 6, 2024
@rgoldberg rgoldberg deleted the 675-fix-swift-5.7-build branch November 6, 2024 18:47
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.

Swift 5.7 build errors

2 participants