# Silencing Swift 6 concurrency warnings in Swift 5 mode

**URL:** <https://forums.swift.org/t/silencing-swift-6-concurrency-warnings-in-swift-5-mode/73431>\
**Category:** Using Swift\
**Tags:** swift5, concurrency, compiler-warning, swift6, xcode16\
**Created:** [July 24, 2024, 9:37pm UTC](https://forums.swift.org/t/silencing-swift-6-concurrency-warnings-in-swift-5-mode/73431 "2024-07-24T21:37:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![NSExceptional](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/nsexceptional/32/6813_2.png) [@NSExceptional](https://forums.swift.org/u/NSExceptional)\
**Post date:** [July 24, 2024, 9:37pm UTC](https://forums.swift.org/t/silencing-swift-6-concurrency-warnings-in-swift-5-mode/73431/1 "2024-07-24T21:37:21Z")

</div>

I'm working on migrating our codebase to be Xcode 16 compatible. At my company we have warnings as errors enabled, and for now we are in Swift 5 mode as we are not yet ready to adopt concurrency (we're working on it).

It seems Xcode 16 will warn you about concurrency errors even in Swift 5 mode. At the moment, they are only getting in our way. We want to get onto Xcode 16 and handle concurrency separately, but it seems Xcode 16 wants to force us to handle those two (both rather monumental) tasks at the same time.

Is there a way to disable these warnings?

---

<div class="post-metadata">

**Author:** ![Jumhyn](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jumhyn/32/3891_2.png) [@Jumhyn](https://forums.swift.org/u/Jumhyn)\
**Post date:** [July 25, 2024, 12:05am UTC](https://forums.swift.org/t/silencing-swift-6-concurrency-warnings-in-swift-5-mode/73431/2 "2024-07-25T00:05:48Z")

</div>

Does the discussion in [this thread](https://forums.swift.org/t/please-help-me-understand-the-decision-to-add-swift-6-warnings-to-swift-5/73417) seem relevant? I.e., does `@preconcurrency import` help you, or are you in one of the buggy cases where `@preconcurrency` introduces a warning (which should be fixed)?

---

<div class="post-metadata">

**Author:** ![NSExceptional](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/nsexceptional/32/6813_2.png) [@NSExceptional](https://forums.swift.org/u/NSExceptional)\
**Post date:** [July 25, 2024, 9:05am UTC](https://forums.swift.org/t/silencing-swift-6-concurrency-warnings-in-swift-5-mode/73431/4 "2024-07-25T09:05:56Z")

</div>

I still get the warning in this case, unless Xcode is just bugged and the warning didn't go away from before I annotated the import:

 ![Screenshot 2024-07-25 at 2.04.45 AM](https://global.discourse-cdn.com/swift/original/3X/8/d/8dc34cc527c9b28b77c27c16005d77ae70d28e5b.png)

---

<div class="post-metadata">

**Author:** ![calicoding](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/calicoding/32/36652_2.png) [@calicoding](https://forums.swift.org/u/calicoding)\
**Post date:** [July 26, 2024, 2:49am UTC](https://forums.swift.org/t/silencing-swift-6-concurrency-warnings-in-swift-5-mode/73431/5 "2024-07-26T02:49:37Z")

</div>

If you can, consider making lastActionDateSortDescriptor a computed property. That way there’s no shared state, and it can be safely accessed from any isolation domain, even if NSSortDescriptor is not Sendable.

---

<div class="post-metadata">

**Author:** ![NSExceptional](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/nsexceptional/32/6813_2.png) [@NSExceptional](https://forums.swift.org/u/NSExceptional)\
**Post date:** [July 29, 2024, 9:30pm UTC](https://forums.swift.org/t/silencing-swift-6-concurrency-warnings-in-swift-5-mode/73431/6 "2024-07-29T21:30:54Z")

</div>

I don't love the idea of making something computed just to satisfy memory safety warnings :/ especially when I don't want to opt into said warnings to begin with

---

<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 29, 2024, 9:41pm UTC](https://forums.swift.org/t/silencing-swift-6-concurrency-warnings-in-swift-5-mode/73431/7 "2024-07-29T21:41:06Z")

</div>

The warnings that you posted a screenshot of upthread are gated behind complete concurrency checking. This could be a manifestation of [Swift 6 language mode being passed to dependencies](https://forums.swift.org/t/swift-6-language-mode-being-passed-to-dependencies/72622) which is fixed by [[6.0][Concurrency] Don't attempt to diagnose `GlobalConcurrency` issues wi… by xedin · Pull Request #74624 · swiftlang/swift · GitHub](https://github.com/swiftlang/swift/pull/74624).

---

<div class="post-metadata">

**Author:** ![NSExceptional](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/nsexceptional/32/6813_2.png) [@NSExceptional](https://forums.swift.org/u/NSExceptional)\
**Post date:** [July 30, 2024, 12:26am UTC](https://forums.swift.org/t/silencing-swift-6-concurrency-warnings-in-swift-5-mode/73431/8 "2024-07-30T00:26:39Z")

</div>

I see, thank you for the context! Do you know which beta will that change be in?

---

<div class="post-metadata">

**Author:** ![NSExceptional](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/nsexceptional/32/6813_2.png) [@NSExceptional](https://forums.swift.org/u/NSExceptional)\
**Post date:** [September 17, 2024, 10:52pm UTC](https://forums.swift.org/t/silencing-swift-6-concurrency-warnings-in-swift-5-mode/73431/9 "2024-09-17T22:52:25Z")

</div>

@hborla I'm still seeing such warnings in beta 6, was this really fixed?
