apple / swift-log

A Logging API for Swift
https://apple.github.io/swift-log/
Apache License 2.0
3.48k stars 284 forks source link

Add Sendability annotations #308

Closed PeterAdams-A closed 2 months ago

PeterAdams-A commented 3 months ago

Motivation:

This becomes a critical feature in swift 6.

Modifications:

Add Sendability annotations where required. Factor out code protected by locks.

Result:

Compiles without warnings with Sendability checking

FranzBusch commented 2 months ago

The PR looks good to me. The breaking change is expected and the nightly failure is unrelated and we should fix it separately

💔 API breakage: func LoggingSystem.bootstrap(:) is now with @preconcurrency 💔 API breakage: func LoggingSystem.bootstrap(:metadataProvider:) is now with @preconcurrency