-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Project-wide "Pattern that the region based isolation checker does not understand how to check" #76005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
cc @gottesmm you seem to get mentioned with these warnings in the other issue reports. |
Attaching the full build log |
The issue persists with Xcode 16 RC release today. |
cc @gottesmm |
Any updates on this? This issue persists in Version 16.1 (16B40) and remains a significant blocker for adopting Swift 6. I’ve eventually managed to isolate the problem to a minimal setup, which consistently reproduces the error. It will yield the following error for one or more files (even if the code is only contained in a single file):
The example defines a type @propertyWrapper
class PropertyWrapper<Value> {
var wrappedValue: Value
init(wrappedValue: Value) {
self.wrappedValue = wrappedValue
}
}
@MainActor
struct Values {
nonisolated init() {}
}
@globalActor
actor TestActor {
static let shared = TestActor()
}
@TestActor
final class TestClass: Sendable {
@MainActor @PropertyWrapper var property: Values
@MainActor
init(_ value: Int) {
self.property = Values()
}
} You cannot initialize the underlying storage property of the property wrapper as this yields the error shown below. Annotating the property wrapper with @MainActor
init(_ value: Int) {
self._property = PropertyWrapper(wrappedValue: Values()) // error: Global actor 'TestActor'-isolated property '_property' can not be mutated from the main actor
}
`` |
Description
There have been previous reports of this compiler warning popping up, that was fixed in Xcode Beta 5 (#75439, #75128, #75238). I just now installed Xcode Beta 6 and have hoped this warning to disappear but it remains. However, for me the warning is not associated with a specific line or file but is printed as:
This error occurs when compiling the StanfordSpezi/SpeziBluetooth SPM package (commit hash as of time of writing
8ee8ba902cff833aa6a6062fc8433e5d0e0338f3
). The warning is printed 8 times, each when compiling the filesresource_bunle_accessor.swift
(file generated by Xcode),Bluetooth.swift
,DeviceDiscoveryDescriptor.swift
,Discover.swift
,DiscoveryDescriptorBuilder
,BluetoothManager.swift
,BluetoothPeripheral.swift
andCharacteristicDescription.swift
. Except for the first file, all of the files are part of the project.Most of these files are non-trivial. The project is otherwise compatible with Swift 6 strict concurrency checking.
This issue is intended to ask for assistance in tracking down the exact issue for this warning. Are there any magic switches to pull that would provide more information where the warning is generated from? Or might this be related to a known issue that was reported somewhere else (hopefully in a more reproducible manner) that is about to be fixed?
Reproduction
As explained above, I currently cannot isolate it to a single line of code due to the cryptic compiler warning. The only steps for reproduction I can point to is the project where the error occurs.
Expected behavior
Report a more useful diagnostic that includes the file and line number where this error/warning occurs.
Environment
Xcode Beta 6
Additional information
No response
The text was updated successfully, but these errors were encountered: