Swift DocC target OS/Xcode version

There is a lot of async and completion handler in current SwiftDocC codebase.

When adding new feature or refactor the old code, I think we should prefer to use the new native Concurrency style.

Package.swift has already defined the min target of macOS is 10.15, but we need Xcode 13.2+ to use back-deployed concurrency feature.

I was wondering if we can use async & await in SwiftDocC repo now? If it was not, is there a plan to drop Xcode 13.2- support so that we can use it in the future?

1 Like

I wonder if there are clear insights how async/await performs on Linux? DocC supports more platforms than just macOS

IMO concurrency should work on Linux since the ABI is not stable and we can always use the latest swift on Linux without any issue.

My concern, as written, is about the performance metrics specifically. Especially given that currently concurrent compiling is disabled on Linux because of the poor metrics as per this comment: https://github.com/apple/swift-docc/blob/main/Sources/SwiftDocC/Utility/Collection%2BConcurrentPerform.swift#L13-L21

Seems like to be the old DispatchQueue currency API performance metric issue.

The new Concurrency feature on Swift in Linux should works fine. Or should be fixed on compiler side.

I would be interested if there'd be a performance impact as well. We can use DocC's benchmarking tools (https://github.com/apple/swift-docc/blob/main/Sources/SwiftDocC/SwiftDocC.docc/SwiftDocC/Benchmarking.md) for that (which @icanzilb originally wrote! :raised_hands:).

If there's a performance regression, we'd need to resolve it before adopting the feature, whether the fix is in the Swift runtime or Swift-DocC.

1 Like