Build Information
Successful build of AAInfographics-Pro, reference master (f777af), with Swift 6.1 for macOS (SPM) on 28 Apr 2026 10:18:30 UTC.
Swift 6 data race errors: 0
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCapturesBuild Log
========================================
RunAll
========================================
Builder version: 4.70.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/AAChartModel/AAChartKit-Swift-Pro.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/AAChartModel/AAChartKit-Swift-Pro
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at f777af5 Update project.pbxproj
Cloned https://github.com/AAChartModel/AAChartKit-Swift-Pro.git
Revision (git rev-parse @):
f777af5514ecf5e60c87bf0bb325060d69c1f83c
SUCCESS checkout https://github.com/AAChartModel/AAChartKit-Swift-Pro.git at master
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.1
Building package at path: $PWD
https://github.com/AAChartModel/AAChartKit-Swift-Pro.git
https://github.com/AAChartModel/AAChartKit-Swift-Pro.git
{
"dependencies" : [
],
"manifest_display_name" : "AAInfographics-Pro",
"name" : "AAInfographics-Pro",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "13.0"
},
{
"name" : "macos",
"version" : "10.13"
}
],
"products" : [
{
"name" : "AAInfographics-Pro",
"targets" : [
"AAInfographics-Pro"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "AAInfographicsProTests",
"module_type" : "SwiftTarget",
"name" : "AAInfographicsProTests",
"path" : "Tests/AAInfographicsProTests",
"sources" : [
"AAChartViewPluginLoaderTests.swift",
"AAChartViewPluginProviderTests.swift"
],
"target_dependencies" : [
"AAInfographics-Pro"
],
"type" : "test"
},
{
"c99name" : "AAInfographics_Pro",
"module_type" : "SwiftTarget",
"name" : "AAInfographics-Pro",
"path" : "AAInfographics-Pro",
"product_memberships" : [
"AAInfographics-Pro"
],
"resources" : [
{
"path" : "/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAJSFiles.bundle",
"rule" : {
"copy" : {
}
}
}
],
"sources" : [
"AAChartCreator/AAChartOptions/AAChartModel.swift",
"AAChartCreator/AAChartOptions/AAOptions.swift",
"AAChartCreator/AAChartOptions/AASeriesElement.swift",
"AAChartCreator/AAChartView/AAChartView+API.swift",
"AAChartCreator/AAChartView/AAChartView.swift",
"AAChartCreator/AAChartView/AAChartViewPluginLoader.swift",
"AAChartCreator/AAChartView/AAChartViewPluginProvider.swift",
"AAChartCreator/AASerializable.swift",
"AAOptionsModel/AAAnimation.swift",
"AAOptionsModel/AAAxis.swift",
"AAOptionsModel/AABoxplot.swift",
"AAOptionsModel/AAChart.swift",
"AAOptionsModel/AACredits.swift",
"AAOptionsModel/AACrosshair.swift",
"AAOptionsModel/AADataLabels.swift",
"AAOptionsModel/AALabel.swift",
"AAOptionsModel/AALabels.swift",
"AAOptionsModel/AALang.swift",
"AAOptionsModel/AALegend.swift",
"AAOptionsModel/AAMarker.swift",
"AAOptionsModel/AAPane.swift",
"AAOptionsModel/AAPlotBandsElement.swift",
"AAOptionsModel/AAPlotLinesElement.swift",
"AAOptionsModel/AAPlotOptions.swift",
"AAOptionsModel/AAScrollablePlotArea.swift",
"AAOptionsModel/AASeries.swift",
"AAOptionsModel/AAStates.swift",
"AAOptionsModel/AAStyle.swift",
"AAOptionsModel/AASubtitle.swift",
"AAOptionsModel/AATitle.swift",
"AAOptionsModel/AATooltip.swift",
"AAOptionsModel/AAXAxis.swift",
"AAOptionsModel/AAYAxis.swift",
"AAOptionsProModel/AABulletDataElement.swift",
"AAOptionsProModel/AAColorAxis.swift",
"AAOptionsProModel/AAData.swift",
"AAOptionsProModel/AAHeatmap.swift",
"AAOptionsProModel/AAItem.swift",
"AAOptionsProModel/AALayoutAlgorithm.swift",
"AAOptionsProModel/AALevelsElement.swift",
"AAOptionsProModel/AAOrganization.swift",
"AAOptionsProModel/AAPackedbubble.swift",
"AAOptionsProModel/AAParallelAxes.swift",
"AAOptionsProModel/AAPictorial.swift",
"AAOptionsProModel/AASolidgauge.swift",
"AAOptionsProModel/AASolidgaugeDataElement.swift",
"AAOptionsProModel/AATreemap.swift",
"AATool/AAColor.swift",
"AATool/AAExtension.swift",
"AATool/AAGradientColor.swift",
"PackageBundlePathLoader.swift"
],
"type" : "library"
}
],
"tools_version" : "5.3"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/3] Write sources
[1/3] Copying AAJSFiles.bundle
[2/3] Write swift-version-2F0A5646E1D333AE.txt
[4/51] Emitting module AAInfographics_Pro
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:420:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
418 | // MARK: - WKUIDelegate
419 | extension AAChartView: WKUIDelegate {
420 | open func webView(
| `- warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
421 | _ webView: WKWebView,
422 | runJavaScriptAlertPanelWithMessage message: String,
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:420:15: warning: instance method 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' nearly matches optional requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' of protocol 'WKUIDelegate'
418 | // MARK: - WKUIDelegate
419 | extension AAChartView: WKUIDelegate {
420 | open func webView(
| |- warning: instance method 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' nearly matches optional requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' of protocol 'WKUIDelegate'
| |- note: candidate has non-matching type '(WKWebView, String, WKFrameInfo, @escaping () -> Void) -> ()'
| `- note: move 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' to another extension to silence this warning
421 | _ webView: WKWebView,
422 | runJavaScriptAlertPanelWithMessage message: String,
WebKit.WKUIDelegate.webView:3:28: note: requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' declared here
1 | protocol WKUIDelegate {
2 | @available(macOS 10.10, *)
3 | @MainActor optional func webView(_ webView: WKWebView, runJavaScriptAlertPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping @MainActor @Sendable () -> Void)}
| `- note: requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' declared here
4 |
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:73:24: warning: static property 'scriptCache' is not concurrency-safe because non-'Sendable' type 'NSCache<NSString, NSString>' may have shared mutable state; this is an error in the Swift 6 language mode
71 | internal final class AAChartViewPluginLoader: AAChartViewPluginLoaderProtocol {
72 | private let pluginProvider: AAChartViewPluginProviderProtocol
73 | private static let scriptCache: NSCache<NSString, NSString> = {
| |- warning: static property 'scriptCache' is not concurrency-safe because non-'Sendable' type 'NSCache<NSString, NSString>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'scriptCache' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
74 | let cache = NSCache<NSString, NSString>()
75 | cache.countLimit = 64
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCache.h:13:12: note: generic class 'NSCache' does not conform to the 'Sendable' protocol
11 |
12 | API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0))
13 | @interface NSCache <KeyType, ObjectType> : NSObject
| `- note: generic class 'NSCache' does not conform to the 'Sendable' protocol
14 |
15 | @property (copy) NSString *name;
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginProvider.swift:95:24: warning: static property 'pluginConfigurations' is not concurrency-safe because non-'Sendable' type '[AAChartViewPluginProvider.AAChartPluginConfiguration]' may have shared mutable state; this is an error in the Swift 6 language mode
83 | private var scriptPathCache: [AAChartPluginScriptType: String] = [:]
84 |
85 | private struct AAChartPluginConfiguration {
| `- note: consider making struct 'AAChartPluginConfiguration' conform to the 'Sendable' protocol
86 | let types: Set<AAChartType>
87 | let scripts: [AAChartPluginScriptType]
:
93 | }
94 |
95 | private static let pluginConfigurations: [AAChartPluginConfiguration] = [
| |- warning: static property 'pluginConfigurations' is not concurrency-safe because non-'Sendable' type '[AAChartViewPluginProvider.AAChartPluginConfiguration]' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'pluginConfigurations' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
96 | // --- Advanced Charts requiring Highcharts-More ---
97 | .init(types: [
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginProvider.swift:157:24: warning: static property 'scriptsByChartType' is not concurrency-safe because non-'Sendable' type '[AAChartType : Set<AAChartPluginScriptType>]' may have shared mutable state; this is an error in the Swift 6 language mode
155 | ]
156 |
157 | private static let scriptsByChartType: [AAChartType: Set<AAChartPluginScriptType>] = {
| |- warning: static property 'scriptsByChartType' is not concurrency-safe because non-'Sendable' type '[AAChartType : Set<AAChartPluginScriptType>]' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'scriptsByChartType' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
158 | var mapping: [AAChartType: Set<AAChartPluginScriptType>] = [:]
159 | for configuration in pluginConfigurations {
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartOptions/AAChartModel.swift:71:13: note: consider making enum 'AAChartType' conform to the 'Sendable' protocol
69 | }
70 |
71 | public enum AAChartType: String {
| `- note: consider making enum 'AAChartType' conform to the 'Sendable' protocol
72 | case column //Column series display one column per value along an X axis.
73 | case bar //A bar series is a special type of column series where the columns are horizontal.
[5/56] Compiling AAInfographics_Pro AAItem.swift
[6/56] Compiling AAInfographics_Pro AALayoutAlgorithm.swift
[7/56] Compiling AAInfographics_Pro AALevelsElement.swift
[8/56] Compiling AAInfographics_Pro AAOrganization.swift
[9/56] Compiling AAInfographics_Pro AAPackedbubble.swift
[10/56] Compiling AAInfographics_Pro AAColor.swift
[11/56] Compiling AAInfographics_Pro AAExtension.swift
[12/56] Compiling AAInfographics_Pro AAGradientColor.swift
[13/56] Compiling AAInfographics_Pro PackageBundlePathLoader.swift
[14/56] Compiling AAInfographics_Pro resource_bundle_accessor.swift
[15/56] Compiling AAInfographics_Pro AAPlotLinesElement.swift
[16/56] Compiling AAInfographics_Pro AAPlotOptions.swift
[17/56] Compiling AAInfographics_Pro AAScrollablePlotArea.swift
[18/56] Compiling AAInfographics_Pro AASeries.swift
[19/56] Compiling AAInfographics_Pro AAStates.swift
[20/56] Compiling AAInfographics_Pro AAStyle.swift
[21/56] Compiling AAInfographics_Pro AASubtitle.swift
[22/56] Compiling AAInfographics_Pro AATitle.swift
[23/56] Compiling AAInfographics_Pro AATooltip.swift
[24/56] Compiling AAInfographics_Pro AAXAxis.swift
[25/56] Compiling AAInfographics_Pro AAYAxis.swift
[26/56] Compiling AAInfographics_Pro AABulletDataElement.swift
[27/56] Compiling AAInfographics_Pro AAColorAxis.swift
[28/56] Compiling AAInfographics_Pro AAData.swift
[29/56] Compiling AAInfographics_Pro AAHeatmap.swift
[30/56] Compiling AAInfographics_Pro AAParallelAxes.swift
[31/56] Compiling AAInfographics_Pro AAPictorial.swift
[32/56] Compiling AAInfographics_Pro AASolidgauge.swift
[33/56] Compiling AAInfographics_Pro AASolidgaugeDataElement.swift
[34/56] Compiling AAInfographics_Pro AATreemap.swift
[35/56] Compiling AAInfographics_Pro AAChartViewPluginProvider.swift
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginProvider.swift:95:24: warning: static property 'pluginConfigurations' is not concurrency-safe because non-'Sendable' type '[AAChartViewPluginProvider.AAChartPluginConfiguration]' may have shared mutable state; this is an error in the Swift 6 language mode
83 | private var scriptPathCache: [AAChartPluginScriptType: String] = [:]
84 |
85 | private struct AAChartPluginConfiguration {
| `- note: consider making struct 'AAChartPluginConfiguration' conform to the 'Sendable' protocol
86 | let types: Set<AAChartType>
87 | let scripts: [AAChartPluginScriptType]
:
93 | }
94 |
95 | private static let pluginConfigurations: [AAChartPluginConfiguration] = [
| |- warning: static property 'pluginConfigurations' is not concurrency-safe because non-'Sendable' type '[AAChartViewPluginProvider.AAChartPluginConfiguration]' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'pluginConfigurations' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
96 | // --- Advanced Charts requiring Highcharts-More ---
97 | .init(types: [
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginProvider.swift:157:24: warning: static property 'scriptsByChartType' is not concurrency-safe because non-'Sendable' type '[AAChartType : Set<AAChartPluginScriptType>]' may have shared mutable state; this is an error in the Swift 6 language mode
155 | ]
156 |
157 | private static let scriptsByChartType: [AAChartType: Set<AAChartPluginScriptType>] = {
| |- warning: static property 'scriptsByChartType' is not concurrency-safe because non-'Sendable' type '[AAChartType : Set<AAChartPluginScriptType>]' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'scriptsByChartType' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
158 | var mapping: [AAChartType: Set<AAChartPluginScriptType>] = [:]
159 | for configuration in pluginConfigurations {
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartOptions/AAChartModel.swift:71:13: note: consider making enum 'AAChartType' conform to the 'Sendable' protocol
69 | }
70 |
71 | public enum AAChartType: String {
| `- note: consider making enum 'AAChartType' conform to the 'Sendable' protocol
72 | case column //Column series display one column per value along an X axis.
73 | case bar //A bar series is a special type of column series where the columns are horizontal.
[36/56] Compiling AAInfographics_Pro AASerializable.swift
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginProvider.swift:95:24: warning: static property 'pluginConfigurations' is not concurrency-safe because non-'Sendable' type '[AAChartViewPluginProvider.AAChartPluginConfiguration]' may have shared mutable state; this is an error in the Swift 6 language mode
83 | private var scriptPathCache: [AAChartPluginScriptType: String] = [:]
84 |
85 | private struct AAChartPluginConfiguration {
| `- note: consider making struct 'AAChartPluginConfiguration' conform to the 'Sendable' protocol
86 | let types: Set<AAChartType>
87 | let scripts: [AAChartPluginScriptType]
:
93 | }
94 |
95 | private static let pluginConfigurations: [AAChartPluginConfiguration] = [
| |- warning: static property 'pluginConfigurations' is not concurrency-safe because non-'Sendable' type '[AAChartViewPluginProvider.AAChartPluginConfiguration]' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'pluginConfigurations' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
96 | // --- Advanced Charts requiring Highcharts-More ---
97 | .init(types: [
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginProvider.swift:157:24: warning: static property 'scriptsByChartType' is not concurrency-safe because non-'Sendable' type '[AAChartType : Set<AAChartPluginScriptType>]' may have shared mutable state; this is an error in the Swift 6 language mode
155 | ]
156 |
157 | private static let scriptsByChartType: [AAChartType: Set<AAChartPluginScriptType>] = {
| |- warning: static property 'scriptsByChartType' is not concurrency-safe because non-'Sendable' type '[AAChartType : Set<AAChartPluginScriptType>]' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'scriptsByChartType' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
158 | var mapping: [AAChartType: Set<AAChartPluginScriptType>] = [:]
159 | for configuration in pluginConfigurations {
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartOptions/AAChartModel.swift:71:13: note: consider making enum 'AAChartType' conform to the 'Sendable' protocol
69 | }
70 |
71 | public enum AAChartType: String {
| `- note: consider making enum 'AAChartType' conform to the 'Sendable' protocol
72 | case column //Column series display one column per value along an X axis.
73 | case bar //A bar series is a special type of column series where the columns are horizontal.
[37/56] Compiling AAInfographics_Pro AAAnimation.swift
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginProvider.swift:95:24: warning: static property 'pluginConfigurations' is not concurrency-safe because non-'Sendable' type '[AAChartViewPluginProvider.AAChartPluginConfiguration]' may have shared mutable state; this is an error in the Swift 6 language mode
83 | private var scriptPathCache: [AAChartPluginScriptType: String] = [:]
84 |
85 | private struct AAChartPluginConfiguration {
| `- note: consider making struct 'AAChartPluginConfiguration' conform to the 'Sendable' protocol
86 | let types: Set<AAChartType>
87 | let scripts: [AAChartPluginScriptType]
:
93 | }
94 |
95 | private static let pluginConfigurations: [AAChartPluginConfiguration] = [
| |- warning: static property 'pluginConfigurations' is not concurrency-safe because non-'Sendable' type '[AAChartViewPluginProvider.AAChartPluginConfiguration]' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'pluginConfigurations' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
96 | // --- Advanced Charts requiring Highcharts-More ---
97 | .init(types: [
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginProvider.swift:157:24: warning: static property 'scriptsByChartType' is not concurrency-safe because non-'Sendable' type '[AAChartType : Set<AAChartPluginScriptType>]' may have shared mutable state; this is an error in the Swift 6 language mode
155 | ]
156 |
157 | private static let scriptsByChartType: [AAChartType: Set<AAChartPluginScriptType>] = {
| |- warning: static property 'scriptsByChartType' is not concurrency-safe because non-'Sendable' type '[AAChartType : Set<AAChartPluginScriptType>]' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'scriptsByChartType' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
158 | var mapping: [AAChartType: Set<AAChartPluginScriptType>] = [:]
159 | for configuration in pluginConfigurations {
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartOptions/AAChartModel.swift:71:13: note: consider making enum 'AAChartType' conform to the 'Sendable' protocol
69 | }
70 |
71 | public enum AAChartType: String {
| `- note: consider making enum 'AAChartType' conform to the 'Sendable' protocol
72 | case column //Column series display one column per value along an X axis.
73 | case bar //A bar series is a special type of column series where the columns are horizontal.
[38/56] Compiling AAInfographics_Pro AAAxis.swift
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginProvider.swift:95:24: warning: static property 'pluginConfigurations' is not concurrency-safe because non-'Sendable' type '[AAChartViewPluginProvider.AAChartPluginConfiguration]' may have shared mutable state; this is an error in the Swift 6 language mode
83 | private var scriptPathCache: [AAChartPluginScriptType: String] = [:]
84 |
85 | private struct AAChartPluginConfiguration {
| `- note: consider making struct 'AAChartPluginConfiguration' conform to the 'Sendable' protocol
86 | let types: Set<AAChartType>
87 | let scripts: [AAChartPluginScriptType]
:
93 | }
94 |
95 | private static let pluginConfigurations: [AAChartPluginConfiguration] = [
| |- warning: static property 'pluginConfigurations' is not concurrency-safe because non-'Sendable' type '[AAChartViewPluginProvider.AAChartPluginConfiguration]' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'pluginConfigurations' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
96 | // --- Advanced Charts requiring Highcharts-More ---
97 | .init(types: [
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginProvider.swift:157:24: warning: static property 'scriptsByChartType' is not concurrency-safe because non-'Sendable' type '[AAChartType : Set<AAChartPluginScriptType>]' may have shared mutable state; this is an error in the Swift 6 language mode
155 | ]
156 |
157 | private static let scriptsByChartType: [AAChartType: Set<AAChartPluginScriptType>] = {
| |- warning: static property 'scriptsByChartType' is not concurrency-safe because non-'Sendable' type '[AAChartType : Set<AAChartPluginScriptType>]' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'scriptsByChartType' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
158 | var mapping: [AAChartType: Set<AAChartPluginScriptType>] = [:]
159 | for configuration in pluginConfigurations {
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartOptions/AAChartModel.swift:71:13: note: consider making enum 'AAChartType' conform to the 'Sendable' protocol
69 | }
70 |
71 | public enum AAChartType: String {
| `- note: consider making enum 'AAChartType' conform to the 'Sendable' protocol
72 | case column //Column series display one column per value along an X axis.
73 | case bar //A bar series is a special type of column series where the columns are horizontal.
[39/56] Compiling AAInfographics_Pro AABoxplot.swift
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginProvider.swift:95:24: warning: static property 'pluginConfigurations' is not concurrency-safe because non-'Sendable' type '[AAChartViewPluginProvider.AAChartPluginConfiguration]' may have shared mutable state; this is an error in the Swift 6 language mode
83 | private var scriptPathCache: [AAChartPluginScriptType: String] = [:]
84 |
85 | private struct AAChartPluginConfiguration {
| `- note: consider making struct 'AAChartPluginConfiguration' conform to the 'Sendable' protocol
86 | let types: Set<AAChartType>
87 | let scripts: [AAChartPluginScriptType]
:
93 | }
94 |
95 | private static let pluginConfigurations: [AAChartPluginConfiguration] = [
| |- warning: static property 'pluginConfigurations' is not concurrency-safe because non-'Sendable' type '[AAChartViewPluginProvider.AAChartPluginConfiguration]' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'pluginConfigurations' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
96 | // --- Advanced Charts requiring Highcharts-More ---
97 | .init(types: [
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginProvider.swift:157:24: warning: static property 'scriptsByChartType' is not concurrency-safe because non-'Sendable' type '[AAChartType : Set<AAChartPluginScriptType>]' may have shared mutable state; this is an error in the Swift 6 language mode
155 | ]
156 |
157 | private static let scriptsByChartType: [AAChartType: Set<AAChartPluginScriptType>] = {
| |- warning: static property 'scriptsByChartType' is not concurrency-safe because non-'Sendable' type '[AAChartType : Set<AAChartPluginScriptType>]' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'scriptsByChartType' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
158 | var mapping: [AAChartType: Set<AAChartPluginScriptType>] = [:]
159 | for configuration in pluginConfigurations {
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartOptions/AAChartModel.swift:71:13: note: consider making enum 'AAChartType' conform to the 'Sendable' protocol
69 | }
70 |
71 | public enum AAChartType: String {
| `- note: consider making enum 'AAChartType' conform to the 'Sendable' protocol
72 | case column //Column series display one column per value along an X axis.
73 | case bar //A bar series is a special type of column series where the columns are horizontal.
[40/56] Compiling AAInfographics_Pro AAChart.swift
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginProvider.swift:95:24: warning: static property 'pluginConfigurations' is not concurrency-safe because non-'Sendable' type '[AAChartViewPluginProvider.AAChartPluginConfiguration]' may have shared mutable state; this is an error in the Swift 6 language mode
83 | private var scriptPathCache: [AAChartPluginScriptType: String] = [:]
84 |
85 | private struct AAChartPluginConfiguration {
| `- note: consider making struct 'AAChartPluginConfiguration' conform to the 'Sendable' protocol
86 | let types: Set<AAChartType>
87 | let scripts: [AAChartPluginScriptType]
:
93 | }
94 |
95 | private static let pluginConfigurations: [AAChartPluginConfiguration] = [
| |- warning: static property 'pluginConfigurations' is not concurrency-safe because non-'Sendable' type '[AAChartViewPluginProvider.AAChartPluginConfiguration]' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'pluginConfigurations' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
96 | // --- Advanced Charts requiring Highcharts-More ---
97 | .init(types: [
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginProvider.swift:157:24: warning: static property 'scriptsByChartType' is not concurrency-safe because non-'Sendable' type '[AAChartType : Set<AAChartPluginScriptType>]' may have shared mutable state; this is an error in the Swift 6 language mode
155 | ]
156 |
157 | private static let scriptsByChartType: [AAChartType: Set<AAChartPluginScriptType>] = {
| |- warning: static property 'scriptsByChartType' is not concurrency-safe because non-'Sendable' type '[AAChartType : Set<AAChartPluginScriptType>]' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'scriptsByChartType' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
158 | var mapping: [AAChartType: Set<AAChartPluginScriptType>] = [:]
159 | for configuration in pluginConfigurations {
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartOptions/AAChartModel.swift:71:13: note: consider making enum 'AAChartType' conform to the 'Sendable' protocol
69 | }
70 |
71 | public enum AAChartType: String {
| `- note: consider making enum 'AAChartType' conform to the 'Sendable' protocol
72 | case column //Column series display one column per value along an X axis.
73 | case bar //A bar series is a special type of column series where the columns are horizontal.
[41/56] Compiling AAInfographics_Pro AALang.swift
[42/56] Compiling AAInfographics_Pro AALegend.swift
[43/56] Compiling AAInfographics_Pro AAMarker.swift
[44/56] Compiling AAInfographics_Pro AAPane.swift
[45/56] Compiling AAInfographics_Pro AAPlotBandsElement.swift
[46/56] Compiling AAInfographics_Pro AACredits.swift
[47/56] Compiling AAInfographics_Pro AACrosshair.swift
[48/56] Compiling AAInfographics_Pro AADataLabels.swift
[49/56] Compiling AAInfographics_Pro AALabel.swift
[50/56] Compiling AAInfographics_Pro AALabels.swift
[51/56] Compiling AAInfographics_Pro AAChartModel.swift
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:420:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
418 | // MARK: - WKUIDelegate
419 | extension AAChartView: WKUIDelegate {
420 | open func webView(
| `- warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
421 | _ webView: WKWebView,
422 | runJavaScriptAlertPanelWithMessage message: String,
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:420:15: warning: instance method 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' nearly matches optional requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' of protocol 'WKUIDelegate'
418 | // MARK: - WKUIDelegate
419 | extension AAChartView: WKUIDelegate {
420 | open func webView(
| |- warning: instance method 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' nearly matches optional requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' of protocol 'WKUIDelegate'
| |- note: candidate has non-matching type '(WKWebView, String, WKFrameInfo, @escaping () -> Void) -> ()'
| `- note: move 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' to another extension to silence this warning
421 | _ webView: WKWebView,
422 | runJavaScriptAlertPanelWithMessage message: String,
WebKit.WKUIDelegate.webView:3:28: note: requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' declared here
1 | protocol WKUIDelegate {
2 | @available(macOS 10.10, *)
3 | @MainActor optional func webView(_ webView: WKWebView, runJavaScriptAlertPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping @MainActor @Sendable () -> Void)}
| `- note: requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' declared here
4 |
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:411:45: warning: call to main actor-isolated instance method 'removeAllUserScripts()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
409 |
410 | deinit {
411 | configuration.userContentController.removeAllUserScripts()
| `- warning: call to main actor-isolated instance method 'removeAllUserScripts()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
WebKit.WKUserContentController.removeAllUserScripts:2:22: note: calls to instance method 'removeAllUserScripts()' from outside of its actor context are implicitly asynchronous
1 | class WKUserContentController {
2 | @MainActor open func removeAllUserScripts()}
| `- note: calls to instance method 'removeAllUserScripts()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:411:23: warning: main actor-isolated property 'userContentController' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
409 |
410 | deinit {
411 | configuration.userContentController.removeAllUserScripts()
| `- warning: main actor-isolated property 'userContentController' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h:118:56: note: property declared here
116 | /*! @abstract The user content controller to associate with the web view.
117 | */
118 | @property (nonatomic, strong) WKUserContentController *userContentController;
| `- note: property declared here
119 |
120 | /*! @abstract The web extension controller to associate with the web view.
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:411:9: warning: main actor-isolated property 'configuration' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
409 |
410 | deinit {
411 | configuration.userContentController.removeAllUserScripts()
| `- warning: main actor-isolated property 'configuration' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebView.h:91:63: note: property declared here
89 | /*! @abstract A copy of the configuration with which the web view was
90 | initialized. */
91 | @property (nonatomic, readonly, copy) WKWebViewConfiguration *configuration;
| `- note: property declared here
92 |
93 | /*! @abstract The web view's navigation delegate. */
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:413:9: warning: call to main actor-isolated instance method 'debugLog' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
389 |
390 | //添加一个 debug log 方法, 用于打印一些调试信息
391 | private func debugLog(_ message: String) {
| |- note: calls to instance method 'debugLog' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from inheritance from class 'WKWebView'
392 | #if DEBUG
393 | print(message)
:
411 | configuration.userContentController.removeAllUserScripts()
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
| `- warning: call to main actor-isolated instance method 'debugLog' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
414 | }
415 | }
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:73:24: warning: static property 'scriptCache' is not concurrency-safe because non-'Sendable' type 'NSCache<NSString, NSString>' may have shared mutable state; this is an error in the Swift 6 language mode
71 | internal final class AAChartViewPluginLoader: AAChartViewPluginLoaderProtocol {
72 | private let pluginProvider: AAChartViewPluginProviderProtocol
73 | private static let scriptCache: NSCache<NSString, NSString> = {
| |- warning: static property 'scriptCache' is not concurrency-safe because non-'Sendable' type 'NSCache<NSString, NSString>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'scriptCache' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
74 | let cache = NSCache<NSString, NSString>()
75 | cache.countLimit = 64
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCache.h:13:12: note: generic class 'NSCache' does not conform to the 'Sendable' protocol
11 |
12 | API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0))
13 | @interface NSCache <KeyType, ObjectType> : NSObject
| `- note: generic class 'NSCache' does not conform to the 'Sendable' protocol
14 |
15 | @property (copy) NSString *name;
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:65:47: warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
59 | }
60 |
61 | private func completeOnMainThread(_ completion: @escaping () -> Void) {
| `- note: parameter 'completion' is implicitly non-sendable
62 | if Thread.isMainThread {
63 | completion()
64 | } else {
65 | DispatchQueue.main.async(execute: completion)
| `- warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
66 | }
67 | }
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:133:55: warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
104 | userPlugins: Set<String>,
105 | dependencies: [String: String],
106 | completion: @escaping () -> Void
| `- note: parameter 'completion' is implicitly non-sendable
107 | ) {
108 | let totalRequiredPluginsSet = requiredPluginPaths.union(userPlugins)
:
131 | completion()
132 | } else {
133 | DispatchQueue.main.async(execute: completion)
| `- warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
134 | }
135 | return
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:348:23: warning: capture of 'self' with non-sendable type 'AAChartViewPluginLoader?' in a '@Sendable' closure
69 |
70 | // Loader for Pro version, handling plugin loading and scripts
71 | internal final class AAChartViewPluginLoader: AAChartViewPluginLoaderProtocol {
| `- note: class 'AAChartViewPluginLoader' does not conform to the 'Sendable' protocol
72 | private let pluginProvider: AAChartViewPluginProviderProtocol
73 | private static let scriptCache: NSCache<NSString, NSString> = {
:
346 |
347 | pluginIOQueue.async { [weak self, weak webView] in
348 | guard let self else {
| `- warning: capture of 'self' with non-sendable type 'AAChartViewPluginLoader?' in a '@Sendable' closure
349 | DispatchQueue.main.async {
350 | completion(Set())
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:350:21: warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in a '@Sendable' closure
348 | guard let self else {
349 | DispatchQueue.main.async {
350 | completion(Set())
| |- warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
351 | }
352 | return
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:413:72: warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in an isolated closure; this is an error in the Swift 6 language mode
411 | --------------------------------------------------
412 | """)
413 | self.completeOnMainThread(with: Set(), completion: completion)
| |- warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
414 | } else {
415 | self.completeOnMainThread(with: successfullyReadPaths, completion: completion)
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:446:21: warning: call to main actor-isolated instance method 'evaluateJavaScript(_:completionHandler:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
444 | ) {
445 | onMainThread {
446 | webView.evaluateJavaScript(javaScript) { _, error in
| `- warning: call to main actor-isolated instance method 'evaluateJavaScript(_:completionHandler:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
447 | completion(error)
448 | }
WebKit.WKWebView.evaluateJavaScript:2:22: note: calls to instance method 'evaluateJavaScript(_:completionHandler:)' from outside of its actor context are implicitly asynchronous
1 | class WKWebView {
2 | @MainActor open func evaluateJavaScript(_ javaScriptString: String, completionHandler: (@MainActor @Sendable (Any?, (any Error)?) -> Void)? = nil)}
| `- note: calls to instance method 'evaluateJavaScript(_:completionHandler:)' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:486:47: warning: passing non-sendable parameter 'block' to function expecting a @Sendable closure
480 | }
481 |
482 | private func onMainThread(_ block: @escaping () -> Void) {
| `- note: parameter 'block' is implicitly non-sendable
483 | if Thread.isMainThread {
484 | block()
485 | } else {
486 | DispatchQueue.main.async(execute: block)
| `- warning: passing non-sendable parameter 'block' to function expecting a @Sendable closure
487 | }
488 | }
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:447:17: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
445 | onMainThread {
446 | webView.evaluateJavaScript(javaScript) { _, error in
447 | completion(error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
448 | }
449 | }
[52/56] Compiling AAInfographics_Pro AAOptions.swift
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:420:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
418 | // MARK: - WKUIDelegate
419 | extension AAChartView: WKUIDelegate {
420 | open func webView(
| `- warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
421 | _ webView: WKWebView,
422 | runJavaScriptAlertPanelWithMessage message: String,
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:420:15: warning: instance method 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' nearly matches optional requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' of protocol 'WKUIDelegate'
418 | // MARK: - WKUIDelegate
419 | extension AAChartView: WKUIDelegate {
420 | open func webView(
| |- warning: instance method 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' nearly matches optional requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' of protocol 'WKUIDelegate'
| |- note: candidate has non-matching type '(WKWebView, String, WKFrameInfo, @escaping () -> Void) -> ()'
| `- note: move 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' to another extension to silence this warning
421 | _ webView: WKWebView,
422 | runJavaScriptAlertPanelWithMessage message: String,
WebKit.WKUIDelegate.webView:3:28: note: requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' declared here
1 | protocol WKUIDelegate {
2 | @available(macOS 10.10, *)
3 | @MainActor optional func webView(_ webView: WKWebView, runJavaScriptAlertPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping @MainActor @Sendable () -> Void)}
| `- note: requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' declared here
4 |
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:411:45: warning: call to main actor-isolated instance method 'removeAllUserScripts()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
409 |
410 | deinit {
411 | configuration.userContentController.removeAllUserScripts()
| `- warning: call to main actor-isolated instance method 'removeAllUserScripts()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
WebKit.WKUserContentController.removeAllUserScripts:2:22: note: calls to instance method 'removeAllUserScripts()' from outside of its actor context are implicitly asynchronous
1 | class WKUserContentController {
2 | @MainActor open func removeAllUserScripts()}
| `- note: calls to instance method 'removeAllUserScripts()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:411:23: warning: main actor-isolated property 'userContentController' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
409 |
410 | deinit {
411 | configuration.userContentController.removeAllUserScripts()
| `- warning: main actor-isolated property 'userContentController' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h:118:56: note: property declared here
116 | /*! @abstract The user content controller to associate with the web view.
117 | */
118 | @property (nonatomic, strong) WKUserContentController *userContentController;
| `- note: property declared here
119 |
120 | /*! @abstract The web extension controller to associate with the web view.
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:411:9: warning: main actor-isolated property 'configuration' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
409 |
410 | deinit {
411 | configuration.userContentController.removeAllUserScripts()
| `- warning: main actor-isolated property 'configuration' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebView.h:91:63: note: property declared here
89 | /*! @abstract A copy of the configuration with which the web view was
90 | initialized. */
91 | @property (nonatomic, readonly, copy) WKWebViewConfiguration *configuration;
| `- note: property declared here
92 |
93 | /*! @abstract The web view's navigation delegate. */
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:413:9: warning: call to main actor-isolated instance method 'debugLog' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
389 |
390 | //添加一个 debug log 方法, 用于打印一些调试信息
391 | private func debugLog(_ message: String) {
| |- note: calls to instance method 'debugLog' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from inheritance from class 'WKWebView'
392 | #if DEBUG
393 | print(message)
:
411 | configuration.userContentController.removeAllUserScripts()
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
| `- warning: call to main actor-isolated instance method 'debugLog' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
414 | }
415 | }
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:73:24: warning: static property 'scriptCache' is not concurrency-safe because non-'Sendable' type 'NSCache<NSString, NSString>' may have shared mutable state; this is an error in the Swift 6 language mode
71 | internal final class AAChartViewPluginLoader: AAChartViewPluginLoaderProtocol {
72 | private let pluginProvider: AAChartViewPluginProviderProtocol
73 | private static let scriptCache: NSCache<NSString, NSString> = {
| |- warning: static property 'scriptCache' is not concurrency-safe because non-'Sendable' type 'NSCache<NSString, NSString>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'scriptCache' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
74 | let cache = NSCache<NSString, NSString>()
75 | cache.countLimit = 64
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCache.h:13:12: note: generic class 'NSCache' does not conform to the 'Sendable' protocol
11 |
12 | API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0))
13 | @interface NSCache <KeyType, ObjectType> : NSObject
| `- note: generic class 'NSCache' does not conform to the 'Sendable' protocol
14 |
15 | @property (copy) NSString *name;
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:65:47: warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
59 | }
60 |
61 | private func completeOnMainThread(_ completion: @escaping () -> Void) {
| `- note: parameter 'completion' is implicitly non-sendable
62 | if Thread.isMainThread {
63 | completion()
64 | } else {
65 | DispatchQueue.main.async(execute: completion)
| `- warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
66 | }
67 | }
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:133:55: warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
104 | userPlugins: Set<String>,
105 | dependencies: [String: String],
106 | completion: @escaping () -> Void
| `- note: parameter 'completion' is implicitly non-sendable
107 | ) {
108 | let totalRequiredPluginsSet = requiredPluginPaths.union(userPlugins)
:
131 | completion()
132 | } else {
133 | DispatchQueue.main.async(execute: completion)
| `- warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
134 | }
135 | return
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:348:23: warning: capture of 'self' with non-sendable type 'AAChartViewPluginLoader?' in a '@Sendable' closure
69 |
70 | // Loader for Pro version, handling plugin loading and scripts
71 | internal final class AAChartViewPluginLoader: AAChartViewPluginLoaderProtocol {
| `- note: class 'AAChartViewPluginLoader' does not conform to the 'Sendable' protocol
72 | private let pluginProvider: AAChartViewPluginProviderProtocol
73 | private static let scriptCache: NSCache<NSString, NSString> = {
:
346 |
347 | pluginIOQueue.async { [weak self, weak webView] in
348 | guard let self else {
| `- warning: capture of 'self' with non-sendable type 'AAChartViewPluginLoader?' in a '@Sendable' closure
349 | DispatchQueue.main.async {
350 | completion(Set())
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:350:21: warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in a '@Sendable' closure
348 | guard let self else {
349 | DispatchQueue.main.async {
350 | completion(Set())
| |- warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
351 | }
352 | return
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:413:72: warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in an isolated closure; this is an error in the Swift 6 language mode
411 | --------------------------------------------------
412 | """)
413 | self.completeOnMainThread(with: Set(), completion: completion)
| |- warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
414 | } else {
415 | self.completeOnMainThread(with: successfullyReadPaths, completion: completion)
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:446:21: warning: call to main actor-isolated instance method 'evaluateJavaScript(_:completionHandler:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
444 | ) {
445 | onMainThread {
446 | webView.evaluateJavaScript(javaScript) { _, error in
| `- warning: call to main actor-isolated instance method 'evaluateJavaScript(_:completionHandler:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
447 | completion(error)
448 | }
WebKit.WKWebView.evaluateJavaScript:2:22: note: calls to instance method 'evaluateJavaScript(_:completionHandler:)' from outside of its actor context are implicitly asynchronous
1 | class WKWebView {
2 | @MainActor open func evaluateJavaScript(_ javaScriptString: String, completionHandler: (@MainActor @Sendable (Any?, (any Error)?) -> Void)? = nil)}
| `- note: calls to instance method 'evaluateJavaScript(_:completionHandler:)' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:486:47: warning: passing non-sendable parameter 'block' to function expecting a @Sendable closure
480 | }
481 |
482 | private func onMainThread(_ block: @escaping () -> Void) {
| `- note: parameter 'block' is implicitly non-sendable
483 | if Thread.isMainThread {
484 | block()
485 | } else {
486 | DispatchQueue.main.async(execute: block)
| `- warning: passing non-sendable parameter 'block' to function expecting a @Sendable closure
487 | }
488 | }
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:447:17: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
445 | onMainThread {
446 | webView.evaluateJavaScript(javaScript) { _, error in
447 | completion(error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
448 | }
449 | }
[53/56] Compiling AAInfographics_Pro AASeriesElement.swift
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:420:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
418 | // MARK: - WKUIDelegate
419 | extension AAChartView: WKUIDelegate {
420 | open func webView(
| `- warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
421 | _ webView: WKWebView,
422 | runJavaScriptAlertPanelWithMessage message: String,
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:420:15: warning: instance method 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' nearly matches optional requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' of protocol 'WKUIDelegate'
418 | // MARK: - WKUIDelegate
419 | extension AAChartView: WKUIDelegate {
420 | open func webView(
| |- warning: instance method 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' nearly matches optional requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' of protocol 'WKUIDelegate'
| |- note: candidate has non-matching type '(WKWebView, String, WKFrameInfo, @escaping () -> Void) -> ()'
| `- note: move 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' to another extension to silence this warning
421 | _ webView: WKWebView,
422 | runJavaScriptAlertPanelWithMessage message: String,
WebKit.WKUIDelegate.webView:3:28: note: requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' declared here
1 | protocol WKUIDelegate {
2 | @available(macOS 10.10, *)
3 | @MainActor optional func webView(_ webView: WKWebView, runJavaScriptAlertPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping @MainActor @Sendable () -> Void)}
| `- note: requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' declared here
4 |
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:411:45: warning: call to main actor-isolated instance method 'removeAllUserScripts()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
409 |
410 | deinit {
411 | configuration.userContentController.removeAllUserScripts()
| `- warning: call to main actor-isolated instance method 'removeAllUserScripts()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
WebKit.WKUserContentController.removeAllUserScripts:2:22: note: calls to instance method 'removeAllUserScripts()' from outside of its actor context are implicitly asynchronous
1 | class WKUserContentController {
2 | @MainActor open func removeAllUserScripts()}
| `- note: calls to instance method 'removeAllUserScripts()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:411:23: warning: main actor-isolated property 'userContentController' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
409 |
410 | deinit {
411 | configuration.userContentController.removeAllUserScripts()
| `- warning: main actor-isolated property 'userContentController' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h:118:56: note: property declared here
116 | /*! @abstract The user content controller to associate with the web view.
117 | */
118 | @property (nonatomic, strong) WKUserContentController *userContentController;
| `- note: property declared here
119 |
120 | /*! @abstract The web extension controller to associate with the web view.
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:411:9: warning: main actor-isolated property 'configuration' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
409 |
410 | deinit {
411 | configuration.userContentController.removeAllUserScripts()
| `- warning: main actor-isolated property 'configuration' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebView.h:91:63: note: property declared here
89 | /*! @abstract A copy of the configuration with which the web view was
90 | initialized. */
91 | @property (nonatomic, readonly, copy) WKWebViewConfiguration *configuration;
| `- note: property declared here
92 |
93 | /*! @abstract The web view's navigation delegate. */
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:413:9: warning: call to main actor-isolated instance method 'debugLog' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
389 |
390 | //添加一个 debug log 方法, 用于打印一些调试信息
391 | private func debugLog(_ message: String) {
| |- note: calls to instance method 'debugLog' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from inheritance from class 'WKWebView'
392 | #if DEBUG
393 | print(message)
:
411 | configuration.userContentController.removeAllUserScripts()
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
| `- warning: call to main actor-isolated instance method 'debugLog' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
414 | }
415 | }
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:73:24: warning: static property 'scriptCache' is not concurrency-safe because non-'Sendable' type 'NSCache<NSString, NSString>' may have shared mutable state; this is an error in the Swift 6 language mode
71 | internal final class AAChartViewPluginLoader: AAChartViewPluginLoaderProtocol {
72 | private let pluginProvider: AAChartViewPluginProviderProtocol
73 | private static let scriptCache: NSCache<NSString, NSString> = {
| |- warning: static property 'scriptCache' is not concurrency-safe because non-'Sendable' type 'NSCache<NSString, NSString>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'scriptCache' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
74 | let cache = NSCache<NSString, NSString>()
75 | cache.countLimit = 64
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCache.h:13:12: note: generic class 'NSCache' does not conform to the 'Sendable' protocol
11 |
12 | API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0))
13 | @interface NSCache <KeyType, ObjectType> : NSObject
| `- note: generic class 'NSCache' does not conform to the 'Sendable' protocol
14 |
15 | @property (copy) NSString *name;
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:65:47: warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
59 | }
60 |
61 | private func completeOnMainThread(_ completion: @escaping () -> Void) {
| `- note: parameter 'completion' is implicitly non-sendable
62 | if Thread.isMainThread {
63 | completion()
64 | } else {
65 | DispatchQueue.main.async(execute: completion)
| `- warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
66 | }
67 | }
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:133:55: warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
104 | userPlugins: Set<String>,
105 | dependencies: [String: String],
106 | completion: @escaping () -> Void
| `- note: parameter 'completion' is implicitly non-sendable
107 | ) {
108 | let totalRequiredPluginsSet = requiredPluginPaths.union(userPlugins)
:
131 | completion()
132 | } else {
133 | DispatchQueue.main.async(execute: completion)
| `- warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
134 | }
135 | return
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:348:23: warning: capture of 'self' with non-sendable type 'AAChartViewPluginLoader?' in a '@Sendable' closure
69 |
70 | // Loader for Pro version, handling plugin loading and scripts
71 | internal final class AAChartViewPluginLoader: AAChartViewPluginLoaderProtocol {
| `- note: class 'AAChartViewPluginLoader' does not conform to the 'Sendable' protocol
72 | private let pluginProvider: AAChartViewPluginProviderProtocol
73 | private static let scriptCache: NSCache<NSString, NSString> = {
:
346 |
347 | pluginIOQueue.async { [weak self, weak webView] in
348 | guard let self else {
| `- warning: capture of 'self' with non-sendable type 'AAChartViewPluginLoader?' in a '@Sendable' closure
349 | DispatchQueue.main.async {
350 | completion(Set())
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:350:21: warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in a '@Sendable' closure
348 | guard let self else {
349 | DispatchQueue.main.async {
350 | completion(Set())
| |- warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
351 | }
352 | return
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:413:72: warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in an isolated closure; this is an error in the Swift 6 language mode
411 | --------------------------------------------------
412 | """)
413 | self.completeOnMainThread(with: Set(), completion: completion)
| |- warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
414 | } else {
415 | self.completeOnMainThread(with: successfullyReadPaths, completion: completion)
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:446:21: warning: call to main actor-isolated instance method 'evaluateJavaScript(_:completionHandler:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
444 | ) {
445 | onMainThread {
446 | webView.evaluateJavaScript(javaScript) { _, error in
| `- warning: call to main actor-isolated instance method 'evaluateJavaScript(_:completionHandler:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
447 | completion(error)
448 | }
WebKit.WKWebView.evaluateJavaScript:2:22: note: calls to instance method 'evaluateJavaScript(_:completionHandler:)' from outside of its actor context are implicitly asynchronous
1 | class WKWebView {
2 | @MainActor open func evaluateJavaScript(_ javaScriptString: String, completionHandler: (@MainActor @Sendable (Any?, (any Error)?) -> Void)? = nil)}
| `- note: calls to instance method 'evaluateJavaScript(_:completionHandler:)' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:486:47: warning: passing non-sendable parameter 'block' to function expecting a @Sendable closure
480 | }
481 |
482 | private func onMainThread(_ block: @escaping () -> Void) {
| `- note: parameter 'block' is implicitly non-sendable
483 | if Thread.isMainThread {
484 | block()
485 | } else {
486 | DispatchQueue.main.async(execute: block)
| `- warning: passing non-sendable parameter 'block' to function expecting a @Sendable closure
487 | }
488 | }
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:447:17: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
445 | onMainThread {
446 | webView.evaluateJavaScript(javaScript) { _, error in
447 | completion(error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
448 | }
449 | }
[54/56] Compiling AAInfographics_Pro AAChartView+API.swift
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:420:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
418 | // MARK: - WKUIDelegate
419 | extension AAChartView: WKUIDelegate {
420 | open func webView(
| `- warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
421 | _ webView: WKWebView,
422 | runJavaScriptAlertPanelWithMessage message: String,
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:420:15: warning: instance method 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' nearly matches optional requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' of protocol 'WKUIDelegate'
418 | // MARK: - WKUIDelegate
419 | extension AAChartView: WKUIDelegate {
420 | open func webView(
| |- warning: instance method 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' nearly matches optional requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' of protocol 'WKUIDelegate'
| |- note: candidate has non-matching type '(WKWebView, String, WKFrameInfo, @escaping () -> Void) -> ()'
| `- note: move 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' to another extension to silence this warning
421 | _ webView: WKWebView,
422 | runJavaScriptAlertPanelWithMessage message: String,
WebKit.WKUIDelegate.webView:3:28: note: requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' declared here
1 | protocol WKUIDelegate {
2 | @available(macOS 10.10, *)
3 | @MainActor optional func webView(_ webView: WKWebView, runJavaScriptAlertPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping @MainActor @Sendable () -> Void)}
| `- note: requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' declared here
4 |
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:411:45: warning: call to main actor-isolated instance method 'removeAllUserScripts()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
409 |
410 | deinit {
411 | configuration.userContentController.removeAllUserScripts()
| `- warning: call to main actor-isolated instance method 'removeAllUserScripts()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
WebKit.WKUserContentController.removeAllUserScripts:2:22: note: calls to instance method 'removeAllUserScripts()' from outside of its actor context are implicitly asynchronous
1 | class WKUserContentController {
2 | @MainActor open func removeAllUserScripts()}
| `- note: calls to instance method 'removeAllUserScripts()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:411:23: warning: main actor-isolated property 'userContentController' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
409 |
410 | deinit {
411 | configuration.userContentController.removeAllUserScripts()
| `- warning: main actor-isolated property 'userContentController' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h:118:56: note: property declared here
116 | /*! @abstract The user content controller to associate with the web view.
117 | */
118 | @property (nonatomic, strong) WKUserContentController *userContentController;
| `- note: property declared here
119 |
120 | /*! @abstract The web extension controller to associate with the web view.
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:411:9: warning: main actor-isolated property 'configuration' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
409 |
410 | deinit {
411 | configuration.userContentController.removeAllUserScripts()
| `- warning: main actor-isolated property 'configuration' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebView.h:91:63: note: property declared here
89 | /*! @abstract A copy of the configuration with which the web view was
90 | initialized. */
91 | @property (nonatomic, readonly, copy) WKWebViewConfiguration *configuration;
| `- note: property declared here
92 |
93 | /*! @abstract The web view's navigation delegate. */
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:413:9: warning: call to main actor-isolated instance method 'debugLog' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
389 |
390 | //添加一个 debug log 方法, 用于打印一些调试信息
391 | private func debugLog(_ message: String) {
| |- note: calls to instance method 'debugLog' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from inheritance from class 'WKWebView'
392 | #if DEBUG
393 | print(message)
:
411 | configuration.userContentController.removeAllUserScripts()
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
| `- warning: call to main actor-isolated instance method 'debugLog' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
414 | }
415 | }
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:73:24: warning: static property 'scriptCache' is not concurrency-safe because non-'Sendable' type 'NSCache<NSString, NSString>' may have shared mutable state; this is an error in the Swift 6 language mode
71 | internal final class AAChartViewPluginLoader: AAChartViewPluginLoaderProtocol {
72 | private let pluginProvider: AAChartViewPluginProviderProtocol
73 | private static let scriptCache: NSCache<NSString, NSString> = {
| |- warning: static property 'scriptCache' is not concurrency-safe because non-'Sendable' type 'NSCache<NSString, NSString>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'scriptCache' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
74 | let cache = NSCache<NSString, NSString>()
75 | cache.countLimit = 64
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCache.h:13:12: note: generic class 'NSCache' does not conform to the 'Sendable' protocol
11 |
12 | API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0))
13 | @interface NSCache <KeyType, ObjectType> : NSObject
| `- note: generic class 'NSCache' does not conform to the 'Sendable' protocol
14 |
15 | @property (copy) NSString *name;
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:65:47: warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
59 | }
60 |
61 | private func completeOnMainThread(_ completion: @escaping () -> Void) {
| `- note: parameter 'completion' is implicitly non-sendable
62 | if Thread.isMainThread {
63 | completion()
64 | } else {
65 | DispatchQueue.main.async(execute: completion)
| `- warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
66 | }
67 | }
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:133:55: warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
104 | userPlugins: Set<String>,
105 | dependencies: [String: String],
106 | completion: @escaping () -> Void
| `- note: parameter 'completion' is implicitly non-sendable
107 | ) {
108 | let totalRequiredPluginsSet = requiredPluginPaths.union(userPlugins)
:
131 | completion()
132 | } else {
133 | DispatchQueue.main.async(execute: completion)
| `- warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
134 | }
135 | return
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:348:23: warning: capture of 'self' with non-sendable type 'AAChartViewPluginLoader?' in a '@Sendable' closure
69 |
70 | // Loader for Pro version, handling plugin loading and scripts
71 | internal final class AAChartViewPluginLoader: AAChartViewPluginLoaderProtocol {
| `- note: class 'AAChartViewPluginLoader' does not conform to the 'Sendable' protocol
72 | private let pluginProvider: AAChartViewPluginProviderProtocol
73 | private static let scriptCache: NSCache<NSString, NSString> = {
:
346 |
347 | pluginIOQueue.async { [weak self, weak webView] in
348 | guard let self else {
| `- warning: capture of 'self' with non-sendable type 'AAChartViewPluginLoader?' in a '@Sendable' closure
349 | DispatchQueue.main.async {
350 | completion(Set())
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:350:21: warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in a '@Sendable' closure
348 | guard let self else {
349 | DispatchQueue.main.async {
350 | completion(Set())
| |- warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
351 | }
352 | return
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:413:72: warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in an isolated closure; this is an error in the Swift 6 language mode
411 | --------------------------------------------------
412 | """)
413 | self.completeOnMainThread(with: Set(), completion: completion)
| |- warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
414 | } else {
415 | self.completeOnMainThread(with: successfullyReadPaths, completion: completion)
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:446:21: warning: call to main actor-isolated instance method 'evaluateJavaScript(_:completionHandler:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
444 | ) {
445 | onMainThread {
446 | webView.evaluateJavaScript(javaScript) { _, error in
| `- warning: call to main actor-isolated instance method 'evaluateJavaScript(_:completionHandler:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
447 | completion(error)
448 | }
WebKit.WKWebView.evaluateJavaScript:2:22: note: calls to instance method 'evaluateJavaScript(_:completionHandler:)' from outside of its actor context are implicitly asynchronous
1 | class WKWebView {
2 | @MainActor open func evaluateJavaScript(_ javaScriptString: String, completionHandler: (@MainActor @Sendable (Any?, (any Error)?) -> Void)? = nil)}
| `- note: calls to instance method 'evaluateJavaScript(_:completionHandler:)' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:486:47: warning: passing non-sendable parameter 'block' to function expecting a @Sendable closure
480 | }
481 |
482 | private func onMainThread(_ block: @escaping () -> Void) {
| `- note: parameter 'block' is implicitly non-sendable
483 | if Thread.isMainThread {
484 | block()
485 | } else {
486 | DispatchQueue.main.async(execute: block)
| `- warning: passing non-sendable parameter 'block' to function expecting a @Sendable closure
487 | }
488 | }
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:447:17: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
445 | onMainThread {
446 | webView.evaluateJavaScript(javaScript) { _, error in
447 | completion(error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
448 | }
449 | }
[55/56] Compiling AAInfographics_Pro AAChartView.swift
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:420:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
418 | // MARK: - WKUIDelegate
419 | extension AAChartView: WKUIDelegate {
420 | open func webView(
| `- warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
421 | _ webView: WKWebView,
422 | runJavaScriptAlertPanelWithMessage message: String,
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:420:15: warning: instance method 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' nearly matches optional requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' of protocol 'WKUIDelegate'
418 | // MARK: - WKUIDelegate
419 | extension AAChartView: WKUIDelegate {
420 | open func webView(
| |- warning: instance method 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' nearly matches optional requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' of protocol 'WKUIDelegate'
| |- note: candidate has non-matching type '(WKWebView, String, WKFrameInfo, @escaping () -> Void) -> ()'
| `- note: move 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' to another extension to silence this warning
421 | _ webView: WKWebView,
422 | runJavaScriptAlertPanelWithMessage message: String,
WebKit.WKUIDelegate.webView:3:28: note: requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' declared here
1 | protocol WKUIDelegate {
2 | @available(macOS 10.10, *)
3 | @MainActor optional func webView(_ webView: WKWebView, runJavaScriptAlertPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping @MainActor @Sendable () -> Void)}
| `- note: requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' declared here
4 |
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:411:45: warning: call to main actor-isolated instance method 'removeAllUserScripts()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
409 |
410 | deinit {
411 | configuration.userContentController.removeAllUserScripts()
| `- warning: call to main actor-isolated instance method 'removeAllUserScripts()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
WebKit.WKUserContentController.removeAllUserScripts:2:22: note: calls to instance method 'removeAllUserScripts()' from outside of its actor context are implicitly asynchronous
1 | class WKUserContentController {
2 | @MainActor open func removeAllUserScripts()}
| `- note: calls to instance method 'removeAllUserScripts()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:411:23: warning: main actor-isolated property 'userContentController' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
409 |
410 | deinit {
411 | configuration.userContentController.removeAllUserScripts()
| `- warning: main actor-isolated property 'userContentController' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h:118:56: note: property declared here
116 | /*! @abstract The user content controller to associate with the web view.
117 | */
118 | @property (nonatomic, strong) WKUserContentController *userContentController;
| `- note: property declared here
119 |
120 | /*! @abstract The web extension controller to associate with the web view.
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:411:9: warning: main actor-isolated property 'configuration' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
409 |
410 | deinit {
411 | configuration.userContentController.removeAllUserScripts()
| `- warning: main actor-isolated property 'configuration' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebView.h:91:63: note: property declared here
89 | /*! @abstract A copy of the configuration with which the web view was
90 | initialized. */
91 | @property (nonatomic, readonly, copy) WKWebViewConfiguration *configuration;
| `- note: property declared here
92 |
93 | /*! @abstract The web view's navigation delegate. */
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:413:9: warning: call to main actor-isolated instance method 'debugLog' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
389 |
390 | //添加一个 debug log 方法, 用于打印一些调试信息
391 | private func debugLog(_ message: String) {
| |- note: calls to instance method 'debugLog' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from inheritance from class 'WKWebView'
392 | #if DEBUG
393 | print(message)
:
411 | configuration.userContentController.removeAllUserScripts()
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
| `- warning: call to main actor-isolated instance method 'debugLog' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
414 | }
415 | }
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:73:24: warning: static property 'scriptCache' is not concurrency-safe because non-'Sendable' type 'NSCache<NSString, NSString>' may have shared mutable state; this is an error in the Swift 6 language mode
71 | internal final class AAChartViewPluginLoader: AAChartViewPluginLoaderProtocol {
72 | private let pluginProvider: AAChartViewPluginProviderProtocol
73 | private static let scriptCache: NSCache<NSString, NSString> = {
| |- warning: static property 'scriptCache' is not concurrency-safe because non-'Sendable' type 'NSCache<NSString, NSString>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'scriptCache' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
74 | let cache = NSCache<NSString, NSString>()
75 | cache.countLimit = 64
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCache.h:13:12: note: generic class 'NSCache' does not conform to the 'Sendable' protocol
11 |
12 | API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0))
13 | @interface NSCache <KeyType, ObjectType> : NSObject
| `- note: generic class 'NSCache' does not conform to the 'Sendable' protocol
14 |
15 | @property (copy) NSString *name;
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:65:47: warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
59 | }
60 |
61 | private func completeOnMainThread(_ completion: @escaping () -> Void) {
| `- note: parameter 'completion' is implicitly non-sendable
62 | if Thread.isMainThread {
63 | completion()
64 | } else {
65 | DispatchQueue.main.async(execute: completion)
| `- warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
66 | }
67 | }
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:133:55: warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
104 | userPlugins: Set<String>,
105 | dependencies: [String: String],
106 | completion: @escaping () -> Void
| `- note: parameter 'completion' is implicitly non-sendable
107 | ) {
108 | let totalRequiredPluginsSet = requiredPluginPaths.union(userPlugins)
:
131 | completion()
132 | } else {
133 | DispatchQueue.main.async(execute: completion)
| `- warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
134 | }
135 | return
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:348:23: warning: capture of 'self' with non-sendable type 'AAChartViewPluginLoader?' in a '@Sendable' closure
69 |
70 | // Loader for Pro version, handling plugin loading and scripts
71 | internal final class AAChartViewPluginLoader: AAChartViewPluginLoaderProtocol {
| `- note: class 'AAChartViewPluginLoader' does not conform to the 'Sendable' protocol
72 | private let pluginProvider: AAChartViewPluginProviderProtocol
73 | private static let scriptCache: NSCache<NSString, NSString> = {
:
346 |
347 | pluginIOQueue.async { [weak self, weak webView] in
348 | guard let self else {
| `- warning: capture of 'self' with non-sendable type 'AAChartViewPluginLoader?' in a '@Sendable' closure
349 | DispatchQueue.main.async {
350 | completion(Set())
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:350:21: warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in a '@Sendable' closure
348 | guard let self else {
349 | DispatchQueue.main.async {
350 | completion(Set())
| |- warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
351 | }
352 | return
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:413:72: warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in an isolated closure; this is an error in the Swift 6 language mode
411 | --------------------------------------------------
412 | """)
413 | self.completeOnMainThread(with: Set(), completion: completion)
| |- warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
414 | } else {
415 | self.completeOnMainThread(with: successfullyReadPaths, completion: completion)
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:446:21: warning: call to main actor-isolated instance method 'evaluateJavaScript(_:completionHandler:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
444 | ) {
445 | onMainThread {
446 | webView.evaluateJavaScript(javaScript) { _, error in
| `- warning: call to main actor-isolated instance method 'evaluateJavaScript(_:completionHandler:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
447 | completion(error)
448 | }
WebKit.WKWebView.evaluateJavaScript:2:22: note: calls to instance method 'evaluateJavaScript(_:completionHandler:)' from outside of its actor context are implicitly asynchronous
1 | class WKWebView {
2 | @MainActor open func evaluateJavaScript(_ javaScriptString: String, completionHandler: (@MainActor @Sendable (Any?, (any Error)?) -> Void)? = nil)}
| `- note: calls to instance method 'evaluateJavaScript(_:completionHandler:)' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:486:47: warning: passing non-sendable parameter 'block' to function expecting a @Sendable closure
480 | }
481 |
482 | private func onMainThread(_ block: @escaping () -> Void) {
| `- note: parameter 'block' is implicitly non-sendable
483 | if Thread.isMainThread {
484 | block()
485 | } else {
486 | DispatchQueue.main.async(execute: block)
| `- warning: passing non-sendable parameter 'block' to function expecting a @Sendable closure
487 | }
488 | }
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:447:17: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
445 | onMainThread {
446 | webView.evaluateJavaScript(javaScript) { _, error in
447 | completion(error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
448 | }
449 | }
[56/56] Compiling AAInfographics_Pro AAChartViewPluginLoader.swift
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:420:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
418 | // MARK: - WKUIDelegate
419 | extension AAChartView: WKUIDelegate {
420 | open func webView(
| `- warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
421 | _ webView: WKWebView,
422 | runJavaScriptAlertPanelWithMessage message: String,
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:420:15: warning: instance method 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' nearly matches optional requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' of protocol 'WKUIDelegate'
418 | // MARK: - WKUIDelegate
419 | extension AAChartView: WKUIDelegate {
420 | open func webView(
| |- warning: instance method 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' nearly matches optional requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' of protocol 'WKUIDelegate'
| |- note: candidate has non-matching type '(WKWebView, String, WKFrameInfo, @escaping () -> Void) -> ()'
| `- note: move 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' to another extension to silence this warning
421 | _ webView: WKWebView,
422 | runJavaScriptAlertPanelWithMessage message: String,
WebKit.WKUIDelegate.webView:3:28: note: requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' declared here
1 | protocol WKUIDelegate {
2 | @available(macOS 10.10, *)
3 | @MainActor optional func webView(_ webView: WKWebView, runJavaScriptAlertPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping @MainActor @Sendable () -> Void)}
| `- note: requirement 'webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)' declared here
4 |
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:411:45: warning: call to main actor-isolated instance method 'removeAllUserScripts()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
409 |
410 | deinit {
411 | configuration.userContentController.removeAllUserScripts()
| `- warning: call to main actor-isolated instance method 'removeAllUserScripts()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
WebKit.WKUserContentController.removeAllUserScripts:2:22: note: calls to instance method 'removeAllUserScripts()' from outside of its actor context are implicitly asynchronous
1 | class WKUserContentController {
2 | @MainActor open func removeAllUserScripts()}
| `- note: calls to instance method 'removeAllUserScripts()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:411:23: warning: main actor-isolated property 'userContentController' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
409 |
410 | deinit {
411 | configuration.userContentController.removeAllUserScripts()
| `- warning: main actor-isolated property 'userContentController' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h:118:56: note: property declared here
116 | /*! @abstract The user content controller to associate with the web view.
117 | */
118 | @property (nonatomic, strong) WKUserContentController *userContentController;
| `- note: property declared here
119 |
120 | /*! @abstract The web extension controller to associate with the web view.
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:411:9: warning: main actor-isolated property 'configuration' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
409 |
410 | deinit {
411 | configuration.userContentController.removeAllUserScripts()
| `- warning: main actor-isolated property 'configuration' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebView.h:91:63: note: property declared here
89 | /*! @abstract A copy of the configuration with which the web view was
90 | initialized. */
91 | @property (nonatomic, readonly, copy) WKWebViewConfiguration *configuration;
| `- note: property declared here
92 |
93 | /*! @abstract The web view's navigation delegate. */
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartView.swift:413:9: warning: call to main actor-isolated instance method 'debugLog' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
389 |
390 | //添加一个 debug log 方法, 用于打印一些调试信息
391 | private func debugLog(_ message: String) {
| |- note: calls to instance method 'debugLog' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from inheritance from class 'WKWebView'
392 | #if DEBUG
393 | print(message)
:
411 | configuration.userContentController.removeAllUserScripts()
412 | NotificationCenter.default.removeObserver(self)
413 | debugLog("👻👻👻 AAChartView instance \(self) has been destroyed!")
| `- warning: call to main actor-isolated instance method 'debugLog' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
414 | }
415 | }
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:73:24: warning: static property 'scriptCache' is not concurrency-safe because non-'Sendable' type 'NSCache<NSString, NSString>' may have shared mutable state; this is an error in the Swift 6 language mode
71 | internal final class AAChartViewPluginLoader: AAChartViewPluginLoaderProtocol {
72 | private let pluginProvider: AAChartViewPluginProviderProtocol
73 | private static let scriptCache: NSCache<NSString, NSString> = {
| |- warning: static property 'scriptCache' is not concurrency-safe because non-'Sendable' type 'NSCache<NSString, NSString>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'scriptCache' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
74 | let cache = NSCache<NSString, NSString>()
75 | cache.countLimit = 64
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCache.h:13:12: note: generic class 'NSCache' does not conform to the 'Sendable' protocol
11 |
12 | API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0))
13 | @interface NSCache <KeyType, ObjectType> : NSObject
| `- note: generic class 'NSCache' does not conform to the 'Sendable' protocol
14 |
15 | @property (copy) NSString *name;
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:65:47: warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
59 | }
60 |
61 | private func completeOnMainThread(_ completion: @escaping () -> Void) {
| `- note: parameter 'completion' is implicitly non-sendable
62 | if Thread.isMainThread {
63 | completion()
64 | } else {
65 | DispatchQueue.main.async(execute: completion)
| `- warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
66 | }
67 | }
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:133:55: warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
104 | userPlugins: Set<String>,
105 | dependencies: [String: String],
106 | completion: @escaping () -> Void
| `- note: parameter 'completion' is implicitly non-sendable
107 | ) {
108 | let totalRequiredPluginsSet = requiredPluginPaths.union(userPlugins)
:
131 | completion()
132 | } else {
133 | DispatchQueue.main.async(execute: completion)
| `- warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
134 | }
135 | return
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:348:23: warning: capture of 'self' with non-sendable type 'AAChartViewPluginLoader?' in a '@Sendable' closure
69 |
70 | // Loader for Pro version, handling plugin loading and scripts
71 | internal final class AAChartViewPluginLoader: AAChartViewPluginLoaderProtocol {
| `- note: class 'AAChartViewPluginLoader' does not conform to the 'Sendable' protocol
72 | private let pluginProvider: AAChartViewPluginProviderProtocol
73 | private static let scriptCache: NSCache<NSString, NSString> = {
:
346 |
347 | pluginIOQueue.async { [weak self, weak webView] in
348 | guard let self else {
| `- warning: capture of 'self' with non-sendable type 'AAChartViewPluginLoader?' in a '@Sendable' closure
349 | DispatchQueue.main.async {
350 | completion(Set())
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:350:21: warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in a '@Sendable' closure
348 | guard let self else {
349 | DispatchQueue.main.async {
350 | completion(Set())
| |- warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
351 | }
352 | return
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:413:72: warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in an isolated closure; this is an error in the Swift 6 language mode
411 | --------------------------------------------------
412 | """)
413 | self.completeOnMainThread(with: Set(), completion: completion)
| |- warning: capture of 'completion' with non-sendable type '(Set<String>) -> Void' in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
414 | } else {
415 | self.completeOnMainThread(with: successfullyReadPaths, completion: completion)
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:446:21: warning: call to main actor-isolated instance method 'evaluateJavaScript(_:completionHandler:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
444 | ) {
445 | onMainThread {
446 | webView.evaluateJavaScript(javaScript) { _, error in
| `- warning: call to main actor-isolated instance method 'evaluateJavaScript(_:completionHandler:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
447 | completion(error)
448 | }
WebKit.WKWebView.evaluateJavaScript:2:22: note: calls to instance method 'evaluateJavaScript(_:completionHandler:)' from outside of its actor context are implicitly asynchronous
1 | class WKWebView {
2 | @MainActor open func evaluateJavaScript(_ javaScriptString: String, completionHandler: (@MainActor @Sendable (Any?, (any Error)?) -> Void)? = nil)}
| `- note: calls to instance method 'evaluateJavaScript(_:completionHandler:)' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:486:47: warning: passing non-sendable parameter 'block' to function expecting a @Sendable closure
480 | }
481 |
482 | private func onMainThread(_ block: @escaping () -> Void) {
| `- note: parameter 'block' is implicitly non-sendable
483 | if Thread.isMainThread {
484 | block()
485 | } else {
486 | DispatchQueue.main.async(execute: block)
| `- warning: passing non-sendable parameter 'block' to function expecting a @Sendable closure
487 | }
488 | }
/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAChartCreator/AAChartView/AAChartViewPluginLoader.swift:447:17: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
445 | onMainThread {
446 | webView.evaluateJavaScript(javaScript) { _, error in
447 | completion(error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
448 | }
449 | }
Build complete! (8.15s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "AAInfographics-Pro",
"name" : "AAInfographics-Pro",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "13.0"
},
{
"name" : "macos",
"version" : "10.13"
}
],
"products" : [
{
"name" : "AAInfographics-Pro",
"targets" : [
"AAInfographics-Pro"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "AAInfographicsProTests",
"module_type" : "SwiftTarget",
"name" : "AAInfographicsProTests",
"path" : "Tests/AAInfographicsProTests",
"sources" : [
"AAChartViewPluginLoaderTests.swift",
"AAChartViewPluginProviderTests.swift"
],
"target_dependencies" : [
"AAInfographics-Pro"
],
"type" : "test"
},
{
"c99name" : "AAInfographics_Pro",
"module_type" : "SwiftTarget",
"name" : "AAInfographics-Pro",
"path" : "AAInfographics-Pro",
"product_memberships" : [
"AAInfographics-Pro"
],
"resources" : [
{
"path" : "/Users/admin/builder/spi-builder-workspace/AAInfographics-Pro/AAJSFiles.bundle",
"rule" : {
"copy" : {
}
}
}
],
"sources" : [
"AAChartCreator/AAChartOptions/AAChartModel.swift",
"AAChartCreator/AAChartOptions/AAOptions.swift",
"AAChartCreator/AAChartOptions/AASeriesElement.swift",
"AAChartCreator/AAChartView/AAChartView+API.swift",
"AAChartCreator/AAChartView/AAChartView.swift",
"AAChartCreator/AAChartView/AAChartViewPluginLoader.swift",
"AAChartCreator/AAChartView/AAChartViewPluginProvider.swift",
"AAChartCreator/AASerializable.swift",
"AAOptionsModel/AAAnimation.swift",
"AAOptionsModel/AAAxis.swift",
"AAOptionsModel/AABoxplot.swift",
"AAOptionsModel/AAChart.swift",
"AAOptionsModel/AACredits.swift",
"AAOptionsModel/AACrosshair.swift",
"AAOptionsModel/AADataLabels.swift",
"AAOptionsModel/AALabel.swift",
"AAOptionsModel/AALabels.swift",
"AAOptionsModel/AALang.swift",
"AAOptionsModel/AALegend.swift",
"AAOptionsModel/AAMarker.swift",
"AAOptionsModel/AAPane.swift",
"AAOptionsModel/AAPlotBandsElement.swift",
"AAOptionsModel/AAPlotLinesElement.swift",
"AAOptionsModel/AAPlotOptions.swift",
"AAOptionsModel/AAScrollablePlotArea.swift",
"AAOptionsModel/AASeries.swift",
"AAOptionsModel/AAStates.swift",
"AAOptionsModel/AAStyle.swift",
"AAOptionsModel/AASubtitle.swift",
"AAOptionsModel/AATitle.swift",
"AAOptionsModel/AATooltip.swift",
"AAOptionsModel/AAXAxis.swift",
"AAOptionsModel/AAYAxis.swift",
"AAOptionsProModel/AABulletDataElement.swift",
"AAOptionsProModel/AAColorAxis.swift",
"AAOptionsProModel/AAData.swift",
"AAOptionsProModel/AAHeatmap.swift",
"AAOptionsProModel/AAItem.swift",
"AAOptionsProModel/AALayoutAlgorithm.swift",
"AAOptionsProModel/AALevelsElement.swift",
"AAOptionsProModel/AAOrganization.swift",
"AAOptionsProModel/AAPackedbubble.swift",
"AAOptionsProModel/AAParallelAxes.swift",
"AAOptionsProModel/AAPictorial.swift",
"AAOptionsProModel/AASolidgauge.swift",
"AAOptionsProModel/AASolidgaugeDataElement.swift",
"AAOptionsProModel/AATreemap.swift",
"AATool/AAColor.swift",
"AATool/AAExtension.swift",
"AATool/AAGradientColor.swift",
"PackageBundlePathLoader.swift"
],
"type" : "library"
}
],
"tools_version" : "5.3"
}
Done.