Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/SWBCore/Core.swift
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ extension Core {
/// The delegate used to convey information to registry subsystems about the core, including a channel for those registries to report diagnostics. This struct is created by the core itself and refers to the core. It exists as a struct separate from core to avoid creating an ownership cycle between the core and the registry objects.
///
/// Although primarily used by registries during the loading of the core, this delegate is persisted since registries may need to report additional information after loading. For example, new toolchains may be downloaded.
struct CoreRegistryDelegate : PlatformRegistryDelegate, SDKRegistryDelegate, SpecRegistryDelegate, ToolchainRegistryDelegate, SpecRegistryProvider {
struct CoreRegistryDelegate : PlatformRegistryDelegate, SDKRegistryDelegate, SpecRegistryDelegate, ToolchainRegistryDelegate, SpecRegistryProvider, Sendable {
unowned let core: Core

var diagnosticsEngine: DiagnosticProducingDelegateProtocolPrivate<DiagnosticsEngine> {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SWBCore/DiagnosticSupport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ extension Diagnostic {
public static let libRemarksAvailable = isLibRemarksAvailable()
}

public struct DiagnosticProducingDelegateProtocolPrivate<T> {
public struct DiagnosticProducingDelegateProtocolPrivate<T: Sendable>: Sendable {
fileprivate let instance: T

public init(_ instance: T) {
Expand Down
156 changes: 78 additions & 78 deletions Sources/SWBCore/SpecImplementations/SpecRegistry.swift

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Tests/SWBCoreTests/PlatformRegistryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import SWBMacro

@Suite fileprivate struct PlatformRegistryTests {
final class TestDataDelegate: PlatformRegistryDelegate {
final class MockSpecRegistryDelegate : SpecRegistryDelegate {
final class MockSpecRegistryDelegate: SpecRegistryDelegate, Sendable {
let diagnosticsEngine: DiagnosticProducingDelegateProtocolPrivate<DiagnosticsEngine>

init(_ diagnosticsEngine: DiagnosticsEngine) {
Expand Down
2 changes: 1 addition & 1 deletion Tests/SWBCoreTests/SpecLoadingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import SWBMacro
var specDataCaches = Registry<Spec, any SpecDataCache>()

class TestDataDelegate : SpecParserDelegate {
class MockSpecRegistryDelegate : SpecRegistryDelegate {
final class MockSpecRegistryDelegate: SpecRegistryDelegate, Sendable {
private let _diagnosticsEngine: DiagnosticsEngine

init(_ diagnosticsEngine: DiagnosticsEngine) {
Expand Down
2 changes: 1 addition & 1 deletion Tests/SWBCoreTests/SpecParserTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fileprivate final class MockSpecType: SpecType {

@Suite fileprivate struct SpecParserTests {
final class TestDataDelegate : SpecParserDelegate {
class MockSpecRegistryDelegate : SpecRegistryDelegate {
final class MockSpecRegistryDelegate: SpecRegistryDelegate, Sendable {
private let _diagnosticsEngine: DiagnosticsEngine

init(_ diagnosticsEngine: DiagnosticsEngine) {
Expand Down
2 changes: 1 addition & 1 deletion Tests/SWBCoreTests/SpecRegistryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import SWBUtil
@_spi(Testing) import SWBCore

@Suite fileprivate struct SpecRegistryTests: CoreBasedTests {
final class TestDataDelegate: SpecRegistryDelegate {
final class TestDataDelegate: SpecRegistryDelegate, Sendable {
private let _diagnosticsEngine = DiagnosticsEngine()

var diagnosticsEngine: DiagnosticProducingDelegateProtocolPrivate<DiagnosticsEngine> {
Expand Down