-
-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Error message:
warning: data race detected: @MainActor function at
{PackageName}/{FileName}:{LineNumber} was not
called on the main thread
Here is the line highlighted by the purple runtime warning, from LanguageLayer.swift.
Here was the code used to initialise a TextViewHighlighter, that brought about the warnings.
It's just now occurred to me that the actual error is happening on code from SwiftTreeSitter, not Neon itself. Would you prefer me to post over there?
Neon is being used in my case from within a Swift Package, and the below snippet from my Package.swift was being used to enable strict concurrency checking:
for target in package.targets {
target.swiftSettings = target.swiftSettings ?? []
target.swiftSettings?.append(
.unsafeFlags([
"-Xfrontend", "-warn-concurrency",
"-Xfrontend", "-enable-actor-data-race-checks"
])
)
}Removing this, and replacing it with the below, does make the warnings go away.
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency")
]Metadata
Metadata
Assignees
Labels
No labels