swiftlang/swift-markdown

Drop Swift 5.3 Support

Kyle-Ye opened this issue · 3 comments

Is there a timeline we can drop support for Swift 5.3?

Currently there are 2 Package.swift files which has a maintenance cost (Sometimes PR only updates one while missing updating the another one to make them in sync. And we have to make another PR to fix it)

Also the Swift 5.3 limits a lot of nice Swift syntax and features when fixing bug or developing new features.

eg.

  • #10 need @main support which was introduced by Swift 5.4
  • Sometimes we write closure and does not provide a return value which is OK locally since we are using Package@swift5.5 and it will be inferred in recent swift versions(Maybe introduced by Swift 5.4, 5.5 or 5.6🤔)
    But writing such code will make the CI fail😢.
- xx = xx.map { element in
+ xx = xx.map { element -> String in

Other Info

Some popular swift packages (In the server side) make a commitment to provide a 2 year support(If a version is introduced 2 years ago then we can drop it) or 3 swift version support(When swift 5.7 is released and supported we can drop support for Swift 5.4).

I'd like to know what swift-version supporting strategy will the Swift-Docc project take. Thanks.

Some context when updating min-swift version to Swift 5.3 #4

I think there's a broader discussion to be had about upgrading the minimum Swift version for Swift-DocC and its dependencies. This could probably be a Documentation Workgroup topic, IMO.
#135 (comment)

Yeah. I agree this deserves a topic we can discuss next time in workgroup meeting. @QuietMisdreavus

There will be no blockage from the Swift Toolchain or CI side. Just a trade-off decision for library maintainers.

See swiftlang/swift-package-manager#6214
The toolchain CI is Swift 5.7 + macOS 12.