Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

annotate Logger nonisolated based upon swift version #879

Merged
merged 1 commit into from
Sep 10, 2024
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
5 changes: 3 additions & 2 deletions Sources/Site/Music/Atlas.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ import os
#endif

extension Logger {
nonisolated(unsafe) static let atlas = Logger(category: "atlas")
#if swift(>=6.0)
#warning("nonisolated(unsafe) unneeded.")
static let atlas = Logger(category: "atlas")
#else
nonisolated(unsafe) static let atlas = Logger(category: "atlas")
#endif
}

Expand Down
5 changes: 3 additions & 2 deletions Sources/Site/Music/AtlasCache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import Foundation
import os

extension Logger {
nonisolated(unsafe) static let atlasCache = Logger(category: "atlasCache")
#if swift(>=6.0)
#warning("nonisolated(unsafe) unneeded.")
static let atlasCache = Logger(category: "atlasCache")
#else
nonisolated(unsafe) static let atlasCache = Logger(category: "atlasCache")
#endif
}

Expand Down
5 changes: 3 additions & 2 deletions Sources/Site/Music/Lookup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import Foundation
import os

extension Logger {
nonisolated(unsafe) static let lookup = Logger(category: "lookup")
#if swift(>=6.0)
#warning("nonisolated(unsafe) unneeded.")
static let lookup = Logger(category: "lookup")
#else
nonisolated(unsafe) static let lookup = Logger(category: "lookup")
#endif
}

Expand Down
8 changes: 5 additions & 3 deletions Sources/Site/Music/Music+URL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ import Foundation
import os

extension Logger {
nonisolated(unsafe) static let url = Logger(category: "url")
nonisolated(unsafe) static let music = Logger(category: "music")
#if swift(>=6.0)
#warning("nonisolated(unsafe) unneeded.")
static let url = Logger(category: "url")
static let music = Logger(category: "music")
#else
nonisolated(unsafe) static let url = Logger(category: "url")
nonisolated(unsafe) static let music = Logger(category: "music")
#endif
}

Expand Down
10 changes: 7 additions & 3 deletions Sources/Site/Music/NSUserActivity+ArchiveCategory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ import Intents
import os

extension Logger {
nonisolated(unsafe) static let updateCategoryActivity = Logger(category: "updateCategoryActivity")
nonisolated(unsafe) static let decodeCategoryActivity = Logger(category: "decodeCategoryActivity")
#if swift(>=6.0)
#warning("nonisolated(unsafe) unneeded.")
static let updateCategoryActivity = Logger(category: "updateCategoryActivity")
static let decodeCategoryActivity = Logger(category: "decodeCategoryActivity")
#else
nonisolated(unsafe) static let updateCategoryActivity = Logger(
category: "updateCategoryActivity")
nonisolated(unsafe) static let decodeCategoryActivity = Logger(
category: "decodeCategoryActivity")
#endif
}

Expand Down
8 changes: 5 additions & 3 deletions Sources/Site/Music/NSUserActivity+ArchivePath.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ import Foundation
import os

extension Logger {
nonisolated(unsafe) static let updateActivity = Logger(category: "updateActivity")
nonisolated(unsafe) static let decodeActivity = Logger(category: "decodeActivity")
#if swift(>=6.0)
#warning("nonisolated(unsafe) unneeded.")
static let updateActivity = Logger(category: "updateActivity")
static let decodeActivity = Logger(category: "decodeActivity")
#else
nonisolated(unsafe) static let updateActivity = Logger(category: "updateActivity")
nonisolated(unsafe) static let decodeActivity = Logger(category: "decodeActivity")
#endif
}

Expand Down
5 changes: 3 additions & 2 deletions Sources/Site/Music/SiteModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import Foundation
import os

extension Logger {
nonisolated(unsafe) static let vaultLoader = Logger(category: "vaultLoader")
#if swift(>=6.0)
#warning("nonisolated(unsafe) unneeded.")
static let vaultLoader = Logger(category: "vaultLoader")
#else
nonisolated(unsafe) static let vaultLoader = Logger(category: "vaultLoader")
#endif
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import SwiftUI
import os

extension Logger {
nonisolated(unsafe) static let sharing = Logger(category: "sharing")
#if swift(>=6.0)
#warning("nonisolated(unsafe) unneeded.")
static let sharing = Logger(category: "sharing")
#else
nonisolated(unsafe) static let sharing = Logger(category: "sharing")
#endif
}

Expand Down
5 changes: 3 additions & 2 deletions Sources/Site/Music/UI/ArchiveNavigation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import Foundation
import os

extension Logger {
nonisolated(unsafe) static let archive = Logger(category: "archive")
#if swift(>=6.0)
#warning("nonisolated(unsafe) unneeded.")
static let archive = Logger(category: "archive")
#else
nonisolated(unsafe) static let archive = Logger(category: "archive")
#endif
}

Expand Down
5 changes: 3 additions & 2 deletions Sources/Site/Music/UI/ArchiveStateView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import SwiftUI
import os

extension Logger {
nonisolated(unsafe) static let link = Logger(category: "link")
#if swift(>=6.0)
#warning("nonisolated(unsafe) unneeded.")
static let link = Logger(category: "link")
#else
nonisolated(unsafe) static let link = Logger(category: "link")
#endif
}

Expand Down
5 changes: 3 additions & 2 deletions Sources/Site/Music/UI/NotificationModifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import SwiftUI
import os

extension Logger {
nonisolated(unsafe) static let notification = Logger(category: "notification")
#if swift(>=6.0)
#warning("nonisolated(unsafe) unneeded.")
static let notification = Logger(category: "notification")
#else
nonisolated(unsafe) static let notification = Logger(category: "notification")
#endif
}

Expand Down
5 changes: 3 additions & 2 deletions Sources/Site/Music/UI/SiteView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import SwiftUI
import os

extension Logger {
nonisolated(unsafe) static let vaultLoad = Logger(category: "vaultLoad")
#if swift(>=6.0)
#warning("nonisolated(unsafe) unneeded.")
static let vaultLoad = Logger(category: "vaultLoad")
#else
nonisolated(unsafe) static let vaultLoad = Logger(category: "vaultLoad")
#endif
}

Expand Down
5 changes: 3 additions & 2 deletions Sources/Site/Music/Vault+URL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import Foundation
import os

extension Logger {
nonisolated(unsafe) static let vault = Logger(category: "vault")
#if swift(>=6.0)
#warning("nonisolated(unsafe) unneeded.")
static let vault = Logger(category: "vault")
#else
nonisolated(unsafe) static let vault = Logger(category: "vault")
#endif
}

Expand Down
5 changes: 3 additions & 2 deletions Sources/Site/Music/VaultModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ import os
#endif

extension Logger {
nonisolated(unsafe) static let vaultModel = Logger(category: "vaultModel")
#if swift(>=6.0)
#warning("nonisolated(unsafe) unneeded.")
static let vaultModel = Logger(category: "vaultModel")
#else
nonisolated(unsafe) static let vaultModel = Logger(category: "vaultModel")
#endif
}

Expand Down
5 changes: 3 additions & 2 deletions Sources/Site/Utility/Data+JSON.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import Foundation
import os

extension Logger {
nonisolated(unsafe) static let json = Logger(category: "json")
#if swift(>=6.0)
#warning("nonisolated(unsafe) unneeded.")
static let json = Logger(category: "json")
#else
nonisolated(unsafe) static let json = Logger(category: "json")
#endif
}

Expand Down
5 changes: 3 additions & 2 deletions Sources/Site/Utility/LocationManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import CoreLocation
import os

extension Logger {
nonisolated(unsafe) static let location = Logger(category: "location")
#if swift(>=6.0)
#warning("nonisolated(unsafe) unneeded.")
static let location = Logger(category: "location")
#else
nonisolated(unsafe) static let location = Logger(category: "location")
#endif
}

Expand Down