Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?
Description
Adding the nonisolated keyword to a public struct in a module with default module isolation (i.e. non-isolated) is reported as an API breaking change by swift package diagnose-api-breaking-changes.
Under default module isolation, a plain struct is already nonisolated, so adding the keyword is a no-op and shouldn't be an issue.
Expected behavior
diagnose-api-breaking-changes shouldn't report issues.
Actual behavior
diagnose-api-breaking-changes reports that the API has been broken.
Steps to reproduce
nonisolated-struct-repro.zip
- Checkout attached Swift project
- Run
swift package diagnose-api-breaking-changes baseline
3 breaking changes detected in Repro:
💔 API breakage: struct S is now with nonisolated
💔 API breakage: constructor S.init() is now with nonisolated
💔 API breakage: func S.foo() is now with nonisolated
Swift Package Manager version/commit hash
No response
Swift & OS version (output of swift --version ; uname -a)
No response
Is it reproducible with SwiftPM command-line tools:
swift build,swift test,swift packageetc?swift build,swift test,swift packageetc.Description
Adding the
nonisolatedkeyword to apublic structin a module with default module isolation (i.e. non-isolated) is reported as an API breaking change byswift package diagnose-api-breaking-changes.Under default module isolation, a plain struct is already
nonisolated, so adding the keyword is a no-op and shouldn't be an issue.Expected behavior
diagnose-api-breaking-changes shouldn't report issues.
Actual behavior
diagnose-api-breaking-changes reports that the API has been broken.
Steps to reproduce
nonisolated-struct-repro.zip
swift package diagnose-api-breaking-changes baselineSwift Package Manager version/commit hash
No response
Swift & OS version (output of
swift --version ; uname -a)No response