Static property 'configuration' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6
Adding @preconcurrency to the import statement does not seem to help.
I had thought that @preconcurrency was meant to allow types to be used as Sendable even if they are not marked as such in the imported module.
So my questions are:
What is @preconcurrency supposed to do?
(e.g. Is what I'm seeing a bug or am I misunderstanding what @preconcurrency does)
Besides marking static variables like this as nonisolated(unsafe) is there any way to suppress the warnings while waiting for the dependencies to update for concurrency?
This is a compiler bug. Adding a @preconcurrency import should suppress the global variable warning, because CommandConfiguration being Sendable would make this code safe.
The other way to suppress the warning until the dependency is updated is to add a retroactive @unchecked Sendable conformance to the specific type you're using:
Thank you @hborla. It's unfortunate there's a bug but good to know @precondition should work in the future. (Also better to have this bug in 5.10 than in 6.0)
I'll think about adding the retroactive conformance as opposed to the nonisolated(unsafe). Receiving the warning once the dependency updates would be helpful.