# Codable, SwiftConcurrency, Swift 6 - Fundamentally incompatible?

**URL:** <https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114>\
**Category:** Using Swift\
**Created:** [July 11, 2024, 4:34pm UTC](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114 "2024-07-11T16:34:12Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![James\_Dempsey](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/james_dempsey/32/14336_2.png) [@James\_Dempsey](https://forums.swift.org/u/James_Dempsey)\
**Post date:** [July 12, 2024, 12:18pm UTC](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114/42 "2024-07-12T12:18:22Z")

</div>

Thanks!

---

<div class="post-metadata">

**Author:** ![itaiferber](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/itaiferber/32/33840_2.png) [@itaiferber](https://forums.swift.org/u/itaiferber)\
**Post date:** [July 12, 2024, 2:40pm UTC](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114/43 "2024-07-12T14:40:01Z")

</div>

> [@ConfusedVorlon](#):
>
> But simply saying "We're in the brave new world of Swift 6, Build your own equality checking implementations for anything isolated" seems half-assed.

For better or worse, that's not necessarily reflective of the situation we have here.

The "brave new world of Swift 6" is much less new than we might think: it's an improved formalization of the model that we already have — warts, backwards compatibility concerns, and all.

I personally find that the constraints you're running into make a lot more sense when I dig deeper into the promises that your types are making:

1. By declaring a class which is neither `Sendable` nor actor-constrained, you are declaring: "this is a type which is safe to use from any individual actor or isolation domain, but _not_ safe to pass between domains/threads/etc."
2. By constraining some of those types' properties to `@MainActor`, you are declaring: "this property is only safe to access from the main actor"
  - Note that this can _already_ conflict with (1): you can create `Doc` on a non-main-actor, but in order to access any of its `@MainActor` properties, you'd need to switch to the main actor to do so — except you cannot transfer the value to the main actor because it's not `Sendable`

3. Existing protocols like `Encodable`/`Decodable`, `Equatable`, etc., make _no_ promises about domain isolation, and for backwards compatibility, cannot change. This is a two-way street:
  - You cannot constrain a protocol like `Equatable` to require `@MainActor`, for instance, because existing types which are not `Sendable` or are already isolated to a different actor can no longer conform to it, which would break _adopters_
  - You also can't change `Equatable` to require `@MainActor` because `==` is already called from all sorts of isolation domains, so this would break _callers_

4. By adopting `Codable` on these types, you are guaranteeing that it's safe to call `init(from:)` and `encode(to:)` on your type from any isolation domain, because that's what the protocols promise — but this _isn't true_

How do you square away all of these constraints without changing (1), (2), (3), or (4)? Unfortunately, we can't change (3) without breaking the world, though we _could_ introduce new protocols which make different promises that help you express these types more correctly (though this doesn't help you in the short term).

If you're intent on solving the problem in the short term, you're going to need to make some changes to (1), (2), or (4).

> [@ConfusedVorlon](#):
>
> > [@vns](#):
> >
> > it prevents you from achieving functionality
> 
> Not in Swift 5!

Swift 5 tells you: "hey, what you're doing is fundamentally broken, but we can't prevent you from doing it yet". Swift 6 tells you: "hey, what you're doing is fundamentally broken, and we're now preventing you from doing it".

This situation isn't any _safer_ or _more correct_ in Swift 5, but the language doesn't yet prevent you from making these incompatible promises. Swift 6 does.

* * *

I fully sympathize and empathize with the fact that none of this helps you solve your problems _right now_. Changing your existing types when they work succinctly is a HUGE pain, and adopting a ton of boilerplate for no "real benefit" _right now_ feels like a losing deal.

But: consider the promises your types are currently making, and whether you're comfortable making them. All of this was _never_ safe to do; the language just didn't help diagnose it, or try to prevent it.

Stick to Swift 5 for now if you can live with the warnings, and maybe mull this over. Improvements to isolation are constantly coming, and as @hborla says, there are always plans to make expressing your true intent safer, easier, and require less boilerplate.

---

<div class="post-metadata">

**Author:** ![ConfusedVorlon](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/confusedvorlon/32/14854_2.png) [@ConfusedVorlon](https://forums.swift.org/u/ConfusedVorlon)\
**Post date:** [July 12, 2024, 2:59pm UTC](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114/44 "2024-07-12T14:59:25Z")

</div>

> [@itaiferber](#):
>
> Existing protocols like `Encodable`/`Decodable`, `Equatable`, etc., make _no_ promises about domain isolation, and for backwards compatibility, cannot change. This is a two-way street:
> 
> - You cannot constrain a protocol like `Equatable` to require `@MainActor`, for instance, because existing types which are not `Sendable` or are already isolated to a different actor can no longer conform to it, which would break _adopters_
> - You also can't change `Equatable` to require `@MainActor` because `==` is already called from all sorts of isolation domains, so this would break _callers_

I do get the logic that leads here - but that doesn't mean swift can't evolve to solve the same problems in the new world.

for example, we can well imagine AsyncCodable which solves the same problem as Codable - just in an async world. The conforming class only has to provide

`required init(from decoder: Decoder) async throws`

on _some_ isolation domain. The encoder calls the method asynchronously and all is good. (and in fact - in most cases, then compiler can generate the implementation just like it does today for Codable)

Sure - it isn't Codable, but it solves the problem that Codable solves in an async world.

> [@itaiferber](#):
>
> By adopting `Codable` on these types, you are guaranteeing that it's safe to call `init(from:)` and `encode(to:)` on your type from any isolation domain, because that's what the protocols promise — but this _isn't true_

In my specific case, it _is_ true that you can safely call

`@MainActor required init(from decoder: Decoder) throws`

and most classes/actors could provide that method **correctly** on _some_ isolation domain.

The rest is implementation details right ;)

Same thing with `AsyncEquatable`. You have to provide a method of checking equality in _some_ isolation region. You can't check across regions. If you're checking from a different region, then the equality check is asynchronous.

I get that Swift 6 is different, and I get that there are necessary consequences. But it is NOT necessary to throw out support for serialising/deserializing or checking equality checking as 'things Swift makes easy'

The point here is the functionality. Swift 5 provides a bunch of super-useful developer functionality (like native support for encoding/decoding & equality checking with compiler-built implementations). I don't care exactly _how_ Swift 6 provides that functionality - but I want it to be there.

---

<div class="post-metadata">

**Author:** ![itaiferber](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/itaiferber/32/33840_2.png) [@itaiferber](https://forums.swift.org/u/itaiferber)\
**Post date:** [July 12, 2024, 3:09pm UTC](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114/45 "2024-07-12T15:09:53Z")

</div>

> [@ConfusedVorlon](#):
>
> but that doesn't mean swift can't evolve to solve the same problems in the new world.

Right! No one is saying that — and in fact, we _want_ Swift to continue evolving, hence the continuous work to make things better. 😄

> [@ConfusedVorlon](#):
>
> we can well imagine AsyncCodable

> [@ConfusedVorlon](#):
>
> Same thing with `AsyncEquatable`.

Absolutely! There's nothing at all preventing these from existing: it's just work. Someone needs to figure out the semantics required, put together a pitch, write the implementation, and get it through Swift Evolution. Not impossible, and in fact, likely quite necessary. But all of this takes time and effort that _someone_ needs to put in. Until they do, we don't have these tools.

> [@ConfusedVorlon](#):
>
> But it is NOT necessary to throw out support for serialising/deserializing or checking equality checking as 'things Swift makes easy'

To be clear: no one is saying "Swift 6 _shouldn't_ make this possible, or _shouldn't_ make this easy", but also, Swift 6 doesn't throw out support for anything. It's reflecting to you a situation that was _already in place_. It's just that:

> [@ConfusedVorlon](#):
>
> I don't care exactly _how_ Swift 6 provides that functionality - but I want it to be there.

getting to this point will require time and effort on someone else's behalf. If you can wait for that, then great; if you need solutions in the short term, you have the tools to put them in place. And if you want to be the person to put in the time and effort to make this easier for everyone else and write some pitches and implementations, you can do that too! 😄

---

<div class="post-metadata">

**Author:** ![ConfusedVorlon](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/confusedvorlon/32/14854_2.png) [@ConfusedVorlon](https://forums.swift.org/u/ConfusedVorlon)\
**Post date:** [July 12, 2024, 3:18pm UTC](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114/46 "2024-07-12T15:18:58Z")

</div>

> [@itaiferber](#):
>
> getting to this point will require time and effort on someone else's behalf.

This is entirely fair! I am asking for a lot of work from other people!

The counterpoint I'd put here is that I feel that the pressure to move to Swift 6 is building up.

I _think_ I have the minimal settings for the transition in Xcode 16, and I'm inundated with warnings.

 ![Screenshot 2024-07-12 at 16.14.57](https://global.discourse-cdn.com/swift/original/3X/1/9/19bd993f470f258ab3615995781bd04897c6773d.png)

Swift 6 isn't ready _for me_ and there doesn't seem to be a good way for me to stay off the treadmill until this kind of functionality is built out.

(and yes, of course, I can stay on Xcode 15 for a bit - but 16 is so much better in ways unrelated to Swift 6)

---

<div class="post-metadata">

**Author:** ![taylorswift](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/taylorswift/32/43413_2.png) [@taylorswift](https://forums.swift.org/u/taylorswift)\
**Post date:** [July 12, 2024, 3:22pm UTC](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114/47 "2024-07-12T15:22:26Z")

</div>

> [@itaiferber](#):
>
> Stick to Swift 5 for now if you can live with the warnings, and maybe mull this over.

historically languages that required a lot of deep architectural refactoring to upgrade to new language versions have struggled with adoption of the new major version, and ended up having to support the old series for far longer than anticipated.

part of me wonders if it’s still too early to pull the “warnings to errors” trigger. by Swift Package Index’s [census](https://swiftpackageindex.com/ready-for-swift-6), only 42 percent of public Swift packages compile in Swift 6 mode, and that statistic already excludes some 4,000 packages that are considered “abandoned”.

---

<div class="post-metadata">

**Author:** ![hborla](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/hborla/32/27563_2.png) [@hborla](https://forums.swift.org/u/hborla)\
**Post date:** [July 12, 2024, 3:31pm UTC](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114/48 "2024-07-12T15:31:02Z")

</div>

> [@ConfusedVorlon](#):
>
> I _think_ I have the minimal settings for the transition in Xcode 16, and I'm inundated with warnings.
> 
> ![Screenshot 2024-07-12 at 16.14.57](https://global.discourse-cdn.com/swift/original/3X/1/9/19bd993f470f258ab3615995781bd04897c6773d.png)
> 
> Swift 6 isn't ready _for me_ and there doesn't seem to be a good way for me to stay off the treadmill until this kind of functionality is built out.

From your original post, it looks like you have explicit `@MainActor` annotations in your code. That's why you're getting warnings and errors related to concurrency. Minimal checking means that the compiler won't tell you about concurrency issues caused by retroactively-added annotations in libraries that you're using if you're not actually explicitly trying to use concurrency in your project. As soon as you explicitly introduce an actor, a `@MainActor` annotation, an `async` function, etc, the compiler will tell you when you're using the annotations incorrectly. You can't turn off diagnostics for a feature that you are explicitly using in your code.

> [@ConfusedVorlon](#):
>
> This works, but now gives me the warning
> 
> > Main actor-isolated initializer 'init(from:)' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
> 
> Is there a solution here to have Codable and @MainActor properties?

I did not see this suggestion from a skim of the thread, but there _is_ a way to defer the actor isolation checking to runtime in the case where you know the `Codable` conformance is only used on the main actor, like this:

```swift
class Doc: @preconcurrency Codable {
  var foo:String
  @MainActor var title:String

  @MainActor required public init(from decoder: Decoder) throws { ... }
  @MainActor public func encode(to encoder: Encoder) throws { ... }
}

```

This feature is from [SE-0423: Dynamic actor isolation enforcement from non-strict-concurrency contexts](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0423-dynamic-actor-isolation.md).

---

<div class="post-metadata">

**Author:** ![itaiferber](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/itaiferber/32/33840_2.png) [@itaiferber](https://forums.swift.org/u/itaiferber)\
**Post date:** [July 12, 2024, 4:25pm UTC](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114/49 "2024-07-12T16:25:16Z")

</div>

> [@hborla](#):
>
> in the case where you know the `Codable` conformance is only used on the main actor

And to make this more explicit: for types like `JSONEncoder` and `JSONDecoder`, which don't make use of any concurrency features under the hood, all this would mean is ensuring that you only call the top-level `encode(_:)` and `decode(_:from:)` methods on those types in a main-actor-isolated context.

---

<div class="post-metadata">

**Author:** ![ConfusedVorlon](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/confusedvorlon/32/14854_2.png) [@ConfusedVorlon](https://forums.swift.org/u/ConfusedVorlon)\
**Post date:** [July 12, 2024, 5:29pm UTC](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114/50 "2024-07-12T17:29:38Z")

</div>

> [@hborla](#):
>
> ```swift
> class Doc: @preconcurrency Codable {
> var foo:String
> @MainActor var title:String
> 
> @MainActor required public init(from decoder: Decoder) throws { ... }
> @MainActor public func encode(to encoder: Encoder) throws { ... }
> }
> 
> ```

I wasn't aware of that. It definitely cleans things up - Thank you.

---

<div class="post-metadata">

**Author:** ![mattie](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/mattie/32/13267_2.png) [@mattie](https://forums.swift.org/u/mattie)\
**Post date:** [July 19, 2024, 8:29pm UTC](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114/51 "2024-07-19T20:29:11Z")

</div>

> [@tcldr](#):
>
> Practically speaking, in your case, you might try _removing_ the `@MainActor` annotation. Then – assuming you initialise `Doc` on the `@MainActor` and it remains non-`Sendable` – you'll be naturally constrained to the `@MainActor` anyway.

I'm not 100% sure I understand where this landed in the end, but I think this was an under-rated suggestion.

Because the type is non-Sendable, I don't see how the split isolation was helpful. Unless maybe it was being used to work around other isolation mis-matches?

---

<div class="post-metadata">

**Author:** ![tgoyne](https://avatars.discourse-cdn.com/v4/letter/t/5e9695/32.png) [@tgoyne](https://forums.swift.org/u/tgoyne)\
**Post date:** [July 19, 2024, 10:04pm UTC](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114/52 "2024-07-19T22:04:08Z")

</div>

I am mildly surprised that a `@MainActor` property on a non-Sendable, non-isolated type is even a legal thing to do. It means that your type can be constructed on any actor, but if you construct it on an actor other than the main actor some of the properties can never be accessed. This is a _really_ weird thing to do and I have trouble imagining where it'd be better than having two different types.

---

<div class="post-metadata">

**Author:** ![ConfusedVorlon](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/confusedvorlon/32/14854_2.png) [@ConfusedVorlon](https://forums.swift.org/u/ConfusedVorlon)\
**Post date:** [July 19, 2024, 10:22pm UTC](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114/53 "2024-07-19T22:22:45Z")

</div>

> [@mattie](#):
>
> Because the type is non-Sendable, I don't see how the split isolation was helpful. Unless maybe it was being used to work around other isolation mis-matches?

Split isolation isn't the key here.  
The same issue exists if you make the whole class @MainActor (or some other actor)

The point is that as soon as you have some (or all) of your class constrained - then "Swift's native serialization mechanism" stops working.

To me - that's a hygene factor for an ergonomic Swift 6.

 ![Screenshot 2024-07-19 at 23.20.55](https://global.discourse-cdn.com/swift/original/3X/f/2/f22a21564fa820563719514145ce138b9a23eef3.png)

---

<div class="post-metadata">

**Author:** ![ConfusedVorlon](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/confusedvorlon/32/14854_2.png) [@ConfusedVorlon](https://forums.swift.org/u/ConfusedVorlon)\
**Post date:** [July 19, 2024, 10:29pm UTC](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114/54 "2024-07-19T22:29:08Z")

</div>

> [@tgoyne](#):
>
> It means that your type can be constructed on any actor, but if you construct it on an actor other than the main actor some of the properties can never be accessed.

This seems perfectly reasonable to me!

Class is constructed in the background alongside some potentially expensive file access. Indeed -that's what I'm doing in my case. A bunch of files have to be loaded, ML analysed in order to construct the class.

I could do that work on the background - then hop back to main to initialise, but that doesn't gain me anything.

Then it's passed to the @MainActor so that it can be edited and displayed.

Background work (again, expensive calculations) just jump over to @MainActor when they need to write resulting state to vars which are read by the UI.

---

<div class="post-metadata">

**Author:** ![tgoyne](https://avatars.discourse-cdn.com/v4/letter/t/5e9695/32.png) [@tgoyne](https://forums.swift.org/u/tgoyne)\
**Post date:** [July 19, 2024, 10:35pm UTC](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114/55 "2024-07-19T22:35:30Z")

</div>

That flow requires a Sendable type.

---

<div class="post-metadata">

**Author:** ![itaiferber](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/itaiferber/32/33840_2.png) [@itaiferber](https://forums.swift.org/u/itaiferber)\
**Post date:** [July 20, 2024, 1:40am UTC](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114/56 "2024-07-20T01:40:38Z")

</div>

> [@ConfusedVorlon](#):
>
> Then it's passed to the @MainActor so that it can be edited and displayed.

This isn't valid so long as the type isn't `Sendable`, which is part of the problem you're running into here.

---

<div class="post-metadata">

**Author:** ![vns](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/vns/32/37396_2.png) [@vns](https://forums.swift.org/u/vns)\
**Post date:** [July 20, 2024, 6:26am UTC](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114/57 "2024-07-20T06:26:53Z")

</div>

> [@tgoyne](#):
>
> I am mildly surprised that a `@MainActor` property on a non-Sendable, non-isolated type is even a legal thing to do.

I suppose with region-based isolation it is OK thing to have if you’ll use it in disconnected region. Because before that, having async functions on non-isolated, non-`Sendable` type also didn’t make sense, as you wasn’t able to use such type practically nowhere, but with region-based isolation it now makes sense to have such.

---

<div class="post-metadata">

**Author:** ![tcldr](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/tcldr/32/24405_2.png) [@tcldr](https://forums.swift.org/u/tcldr)\
**Post date:** [July 20, 2024, 11:20am UTC](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114/58 "2024-07-20T11:20:45Z")

</div>

> [@ConfusedVorlon](#):
>
> Class is constructed in the background alongside some potentially expensive file access. Indeed -that's what I'm doing in my case. A bunch of files have to be loaded, ML analysed in order to construct the class.
> 
> I could do that work on the background - then hop back to main to initialise, but that doesn't gain me anything.
> 
> Then it's passed to the @MainActor so that it can be edited and displayed

Maybe region based isolation plus `transferring` closures will be the ointment here. You'll still need to remove the `@MainActor` annotations on the non isolated protocol conformances, however.

[This post](https://forums.swift.org/t/how-can-i-use-region-based-isolation/71426/5) gives a good summary:

> [@How can I use region-based isolation?](https://forums.swift.org/t/how-can-i-use-region-based-isolation/71426/5):
>
> As a quick example of this in action, consider the following:
> 
> ```swift
> class NonSendable { }
> 
> extension Task where Failure == Never {
> // Modified Task.init() converting it to a non-Sendable transferring implementation.
> init(x: (), @_inheritActorContext @_implicitSelfCapture operation: transferring @escaping () async -> Success) {
> /* ... */
> }
> }
> 
> func spawn() {
> let ns = NonSendable()
> Task.init(x: ()) {
> _ = ns
> }
> }
> 
> ```

IIUC, this should allow you to construct your `@MainActor` destined class off the main actor, then pass it to the `@MainActor` once constructed.

---

<div class="post-metadata">

**Author:** ![mattie](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/mattie/32/13267_2.png) [@mattie](https://forums.swift.org/u/mattie)\
**Post date:** [July 20, 2024, 12:09pm UTC](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114/59 "2024-07-20T12:09:53Z")

</div>

Yes, that's right! This is a mis-match between the protocol and type isolation.

But here's what I'm getting at. Why do you have some properties MainActor? It sounds like this class is being constructed in the background, transferred (via RBI or an explicit `sending` return value) to the MainActor, where it then will remain. This flow can be done without any annotations. And if we could remove the isolation, this specific problem would be solved.

---

<div class="post-metadata">

**Author:** ![vns](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/vns/32/37396_2.png) [@vns](https://forums.swift.org/u/vns)\
**Post date:** [July 20, 2024, 12:11pm UTC](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114/60 "2024-07-20T12:11:29Z")

</div>

> [@tcldr](#):
>
> IIUC, this should allow you to construct your `@MainActor` destined class off the main actor, then pass it to the `@MainActor` once constructed.

But as long as class itself contains only sync methods. If you pass non-`Sendable` to, say, view controller to be stored as a property then, and try to call async method on it, then lack of isolation would still be an issue.

---

<div class="post-metadata">

**Author:** ![mattie](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/mattie/32/13267_2.png) [@mattie](https://forums.swift.org/u/mattie)\
**Post date:** [July 20, 2024, 12:15pm UTC](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114/61 "2024-07-20T12:15:03Z")

</div>

Non-Sendables + async methods was definitely a major problem _with Swift 5_, but [SE-0420](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0420-inheritance-of-actor-isolation.md) provides a source-compatible (but 6-only) way to potentially make this arrangement work.

[Previous page](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114.md?page=2)

[Next page](https://forums.swift.org/t/codable-swiftconcurrency-swift-6-fundamentally-incompatible/73114.md?page=4)
