mirror of https://github.com/buresdv/Cork
~ Basics of Swift 6 conformance
This commit is contained in:
parent
edab27b7cb
commit
0466611cea
|
|
@ -522,7 +522,7 @@ struct ContentView: View, Sendable
|
|||
Text("action.use-without-notifications")
|
||||
}
|
||||
|
||||
case .couldNotRemoveTapDueToPackagesFromItStillBeingInstalled(let offendingTapProhibitingRemovalOfTap):
|
||||
case .couldNotRemoveTapDueToPackagesFromItStillBeingInstalled(_):
|
||||
EmptyView()
|
||||
|
||||
case .couldNotParseTopPackages:
|
||||
|
|
@ -564,7 +564,7 @@ struct ContentView: View, Sendable
|
|||
case .couldNotGetWorkingDirectory:
|
||||
EmptyView()
|
||||
|
||||
case .couldNotDumpBrewfile(error: let error):
|
||||
case .couldNotDumpBrewfile(error: _):
|
||||
EmptyView()
|
||||
|
||||
case .couldNotReadBrewfile:
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ enum PackageType: String, CustomStringConvertible, Plottable, AppEntity, Codable
|
|||
}
|
||||
}
|
||||
|
||||
static var typeDisplayRepresentation: TypeDisplayRepresentation = .init(name: "package-details.type")
|
||||
static let typeDisplayRepresentation: TypeDisplayRepresentation = .init(name: "package-details.type")
|
||||
|
||||
var displayRepresentation: DisplayRepresentation
|
||||
{
|
||||
|
|
|
|||
|
|
@ -29138,25 +29138,25 @@
|
|||
"few" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%ld службы"
|
||||
"value" : "%lld службы"
|
||||
}
|
||||
},
|
||||
"many" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%ld служб"
|
||||
"value" : "%lld служб"
|
||||
}
|
||||
},
|
||||
"one" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%ld служба"
|
||||
"value" : "%lld служба"
|
||||
}
|
||||
},
|
||||
"other" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%ld служб"
|
||||
"value" : "%lld служб"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@ import CorkShared
|
|||
|
||||
struct GetInstalledCasksIntent: AppIntent
|
||||
{
|
||||
static var title: LocalizedStringResource = "intent.get-installed-casks.title"
|
||||
static var description: LocalizedStringResource = "intent.get-installed-casks.description"
|
||||
static let title: LocalizedStringResource = "intent.get-installed-casks.title"
|
||||
static let description: LocalizedStringResource = "intent.get-installed-casks.description"
|
||||
|
||||
static var isDiscoverable: Bool = true
|
||||
static var openAppWhenRun: Bool = false
|
||||
static let isDiscoverable: Bool = true
|
||||
static let openAppWhenRun: Bool = false
|
||||
|
||||
func perform() async throws -> some ReturnsValue<[MinimalHomebrewPackage]>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@ struct GetInstalledFormulaeIntent: AppIntent
|
|||
@Parameter(title: "intent.get-installed-packages.limit-to-manually-installed-packages")
|
||||
var getOnlyManuallyInstalledPackages: Bool
|
||||
|
||||
static var title: LocalizedStringResource = "intent.get-installed-formulae.title"
|
||||
static var description: LocalizedStringResource = "intent.get-installed-formulae.description"
|
||||
static let title: LocalizedStringResource = "intent.get-installed-formulae.title"
|
||||
static let description: LocalizedStringResource = "intent.get-installed-formulae.description"
|
||||
|
||||
static var isDiscoverable: Bool = true
|
||||
static var openAppWhenRun: Bool = false
|
||||
static let isDiscoverable: Bool = true
|
||||
static let openAppWhenRun: Bool = false
|
||||
|
||||
func perform() async throws -> some ReturnsValue<[MinimalHomebrewPackage]>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@ struct GetInstalledPackagesIntent: AppIntent
|
|||
@Parameter(title: "intent.get-installed-packages.limit-to-manually-installed-packages")
|
||||
var getOnlyManuallyInstalledPackages: Bool
|
||||
|
||||
static var title: LocalizedStringResource = "intent.get-installed-packages.title"
|
||||
static var description: LocalizedStringResource = "intent.get-installed-packages.description"
|
||||
static let title: LocalizedStringResource = "intent.get-installed-packages.title"
|
||||
static let description: LocalizedStringResource = "intent.get-installed-packages.description"
|
||||
|
||||
static var isDiscoverable: Bool = true
|
||||
static var openAppWhenRun: Bool = false
|
||||
static let isDiscoverable: Bool = true
|
||||
static let openAppWhenRun: Bool = false
|
||||
|
||||
func perform() async throws -> some ReturnsValue<[MinimalHomebrewPackage]>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ enum RefreshIntentResult: String, AppEnum
|
|||
case refreshedWithErrors
|
||||
case failed
|
||||
|
||||
static var typeDisplayRepresentation: TypeDisplayRepresentation = .init(name: "intent.refresh.result.display-representation")
|
||||
static let typeDisplayRepresentation: TypeDisplayRepresentation = .init(name: "intent.refresh.result.display-representation")
|
||||
|
||||
static var caseDisplayRepresentations: [RefreshIntentResult: DisplayRepresentation] = [
|
||||
static let caseDisplayRepresentations: [RefreshIntentResult: DisplayRepresentation] = [
|
||||
.refreshed: DisplayRepresentation(title: "intent.refresh.result.refreshed"),
|
||||
.refreshedWithErrors: DisplayRepresentation(title: "intent.refresh.result.refreshed-with-errors"),
|
||||
.failed: DisplayRepresentation(title: "intent.refresh.result.failed")
|
||||
|
|
@ -26,11 +26,11 @@ enum RefreshIntentResult: String, AppEnum
|
|||
|
||||
struct RefreshPackagesIntent: AppIntent
|
||||
{
|
||||
static var title: LocalizedStringResource = "intent.refresh.title"
|
||||
static var description: LocalizedStringResource = "intent.refresh.description"
|
||||
static let title: LocalizedStringResource = "intent.refresh.title"
|
||||
static let description: LocalizedStringResource = "intent.refresh.description"
|
||||
|
||||
static var isDiscoverable: Bool = true
|
||||
static var openAppWhenRun: Bool = false
|
||||
static let isDiscoverable: Bool = true
|
||||
static let openAppWhenRun: Bool = false
|
||||
|
||||
func perform() async throws -> some ReturnsValue<RefreshIntentResult>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
import AppKit
|
||||
import Foundation
|
||||
|
||||
@MainActor
|
||||
func switchCorkToForeground()
|
||||
{
|
||||
if #available(macOS 14.0, *)
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ extension BrewDataStorage
|
|||
|
||||
do
|
||||
{
|
||||
var dependencyName: String = try uninstallCommandOutput.standardError.regexMatch("(?<=required by ).*?(?=, which)")
|
||||
let dependencyName: String = try uninstallCommandOutput.standardError.regexMatch("(?<=required by ).*?(?=, which)")
|
||||
|
||||
appState.showAlert(errorToShow: .uninstallationNotPossibleDueToDependency(packageThatTheUserIsTryingToUninstall: package, offendingDependencyProhibitingUninstallation: dependencyName))
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ struct MinimalHomebrewPackage: Identifiable, Hashable, AppEntity
|
|||
|
||||
var installedIntentionally: Bool
|
||||
|
||||
static var typeDisplayRepresentation: TypeDisplayRepresentation = .init(name: "intents.type.minimal-homebrew-package")
|
||||
static let typeDisplayRepresentation: TypeDisplayRepresentation = .init(name: "intents.type.minimal-homebrew-package")
|
||||
|
||||
var displayRepresentation: DisplayRepresentation
|
||||
{
|
||||
|
|
@ -30,7 +30,7 @@ struct MinimalHomebrewPackage: Identifiable, Hashable, AppEntity
|
|||
)
|
||||
}
|
||||
|
||||
static var defaultQuery: MinimalHomebrewPackageIntentQuery = .init()
|
||||
static let defaultQuery: MinimalHomebrewPackageIntentQuery = .init()
|
||||
}
|
||||
|
||||
struct MinimalHomebrewPackageIntentQuery: EntityQuery
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import Foundation
|
||||
import OSLog
|
||||
import UserNotifications
|
||||
@preconcurrency import UserNotifications
|
||||
|
||||
public struct AppConstants
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue