swift-docc-plugin was not building with Swift 5.7 due to using newer syntax which did not exist yet.
Fixes the compilation issues by using older Swift syntax.
I've also updated our minimum supported version to Swift 5.7; older versions are no longer supported.
Dependencies
N/A
Testing
Steps:
Clone repository and set up docker image with Swift 5.7
Try to build swift-docc-plugin and it should fail without these changes, and succeed with them
docker run -v /local/path/to/swift-docc-plugin:/swift-docc-plugin -it swift:5.7-amazonlinux2
cd /swift-docc-plugin
swift build
Before:
/swift-docc-plugin/Plugins/Swift-DocC Convert/Symbolic Links/SwiftDocCPluginUtilities/CommandLineArguments/CommandLineArguments.swift:31:50: error: consecutive declarations on a line must be separated by ';'
private var remainingOptionsOrFlags: [String].SubSequence
^
[...]
/swift-docc-plugin/Plugins/Swift-DocC Convert/SwiftDocCConvert.swift:111:52: error: expected initial value after '='
let dependencyArchivePaths: [String] = if isCombinedDocumentationEnabled {
^
[...]
/swift-docc-plugin/Plugins/Swift-DocC Convert/Symbolic Links/SwiftDocCPluginUtilities/HelpInformation.swift:139:27: error: expected initial value after '='
var description = if flagListText.count < 23 {
^
Bug/issue #, if applicable: fixes https://github.com/swiftlang/swift-docc-plugin/issues/94, rdar://134859979
Summary
swift-docc-plugin was not building with Swift 5.7 due to using newer syntax which did not exist yet.
Fixes the compilation issues by using older Swift syntax.
I've also updated our minimum supported version to Swift 5.7; older versions are no longer supported.
Dependencies
N/A
Testing
Steps:
Before:
After:
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
[ ] Added testsNot needed./bin/test
script and it succeeded[ ] Updated documentation if necessaryNot needed