Not all of your examples are SDK issues, but yes, you should absolutely file feedback reports if you believe an API is mis-annotated.
I think using a main-actor isolated key-path in a property wrapper initializer should be fine as long as your enclosing view is @MainActor
, per SE-0411: Isolated default values. That makes this just a compiler bug.
It's a compiler bug that the @preconcurrency import
doesn't suppress the warning.
Dimension
is has an explicit, unavailable Sendable
conformance, which means it's definitely not a thread-safe type, so this is not an issue for Foundation to fix. If you want to use a non-Sendable
type as a global/static variable in your code, you will need to isolated it to a global actor for safety to be proven statically, or wrap it in some kind of Sendable
container type that protects access to it. If you don't want static data-race safety, you can mark it as nonisolated(unsafe)
and take care at each use site to make sure you are synchronizing access to it, e.g. by using a lock or a dispatch queue.