From 076c642b008502c183d6d59a9f6e779c6cc5bce8 Mon Sep 17 00:00:00 2001 From: uhooi Date: Sat, 29 Jun 2024 03:51:25 +0900 Subject: [PATCH 01/17] Fix warning --- LokiPackage/Sources/Core/UserDefaults/UserDefaultsClient.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LokiPackage/Sources/Core/UserDefaults/UserDefaultsClient.swift b/LokiPackage/Sources/Core/UserDefaults/UserDefaultsClient.swift index cd7e351..780187e 100644 --- a/LokiPackage/Sources/Core/UserDefaults/UserDefaultsClient.swift +++ b/LokiPackage/Sources/Core/UserDefaults/UserDefaultsClient.swift @@ -34,4 +34,4 @@ extension DefaultUserDefaultsClient: UserDefaultsClient { // The UserDefaults class is thread-safe // ref: https://developer.apple.com/documentation/foundation/userdefaults#2926903 -extension UserDefaults: @unchecked Sendable {} +extension UserDefaults: @unchecked @retroactive Sendable {} From 1bee78e1d60f292a28ebe7d11eda9fae51c98a50 Mon Sep 17 00:00:00 2001 From: uhooi Date: Sat, 29 Jun 2024 03:53:28 +0900 Subject: [PATCH 02/17] Bump Xcode from 15.4 to 16.0 --- .github/workflows/ci.yml | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79928a2..6186d90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ permissions: contents: read env: - DEVELOPER_DIR: /Applications/Xcode_15.4.app + DEVELOPER_DIR: /Applications/Xcode_16.0.app jobs: build: diff --git a/README.md b/README.md index d499d6c..2819d0c 100644 --- a/README.md +++ b/README.md @@ -40,8 +40,8 @@ Loki(ロキ)は、サ活の記録に特化したアプリです。 ### 必要条件 -- macOS 14.0+ -- Xcode 15.4 (Swift 5.10) +- macOS 14.5+ +- Xcode 16.0 (Swift 6.0) - Make - Mint From 7255393ed8ad01253a728e32765dca2946cc1178 Mon Sep 17 00:00:00 2001 From: uhooi Date: Sat, 29 Jun 2024 03:55:49 +0900 Subject: [PATCH 03/17] Bump swift-tools-version from 5.10 to 6.0 --- LokiPackage/Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LokiPackage/Package.swift b/LokiPackage/Package.swift index e7d415b..5093bf2 100644 --- a/LokiPackage/Package.swift +++ b/LokiPackage/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 5.10 +// swift-tools-version: 6.0 // swiftlint:disable:previous file_name import PackageDescription From 7e38c759716a3fcee38cbcec6fe92df377ed479c Mon Sep 17 00:00:00 2001 From: uhooi Date: Mon, 1 Jul 2024 01:15:13 +0900 Subject: [PATCH 04/17] Add .editorconfig --- .editorconfig | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..b906dc3 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +max_line_length = 140 +end_of_line = lf +charset = utf-8 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.swift] +indent_size = 4 + +[Makefile] +indent_style = tab + +[*.md] +trim_trailing_whitespace = false +max_line_length = unset From 5cba6042d40075ed20b09a6a37912976aa72854a Mon Sep 17 00:00:00 2001 From: uhooi Date: Sat, 13 Jul 2024 21:47:36 +0900 Subject: [PATCH 05/17] Fix build error for production --- .../Sources/Apps/Develop/DevelopRootScreen.swift | 4 ---- .../Apps/Production/ProductionRootScreen.swift | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/LokiPackage/Sources/Apps/Develop/DevelopRootScreen.swift b/LokiPackage/Sources/Apps/Develop/DevelopRootScreen.swift index 1812f25..18dd95d 100644 --- a/LokiPackage/Sources/Apps/Develop/DevelopRootScreen.swift +++ b/LokiPackage/Sources/Apps/Develop/DevelopRootScreen.swift @@ -62,10 +62,6 @@ private extension DevelopRootScreen { } content: { makeLicenseListScreen() } - .sheet(isPresented: $isLicenseListScreenPresented) { - } content: { - makeLicenseListScreen() - } } #endif diff --git a/LokiPackage/Sources/Apps/Production/ProductionRootScreen.swift b/LokiPackage/Sources/Apps/Production/ProductionRootScreen.swift index 475cc56..babf786 100644 --- a/LokiPackage/Sources/Apps/Production/ProductionRootScreen.swift +++ b/LokiPackage/Sources/Apps/Production/ProductionRootScreen.swift @@ -29,16 +29,30 @@ private extension ProductionRootScreen { } } + #if DEBUG @MainActor func makeSettingsScreen() -> some View { SettingsScreen(onLicensesButtonClick: { isLicenseListScreenPresented = true + }, onDebugButtonClick: { }) .sheet(isPresented: $isLicenseListScreenPresented) { } content: { makeLicenseListScreen() } } + #else + @MainActor + func makeSettingsScreen() -> some View { + SettingsScreen(onLicensesButtonClick: { + isLicenseListScreenPresented = true + }) + .sheet(isPresented: $isLicenseListScreenPresented) { + } content: { + makeLicenseListScreen() + } + } + #endif func makeLicenseListScreen() -> some View { LicenseListScreen() From 493d365d588362ed927b0c0f2058e5ece47afba8 Mon Sep 17 00:00:00 2001 From: uhooi Date: Sat, 13 Jul 2024 21:48:20 +0900 Subject: [PATCH 06/17] Bump Swift Language Version from 5 to 6 --- App/Develop.xcodeproj/project.pbxproj | 4 ++-- App/Production.xcodeproj/project.pbxproj | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/App/Develop.xcodeproj/project.pbxproj b/App/Develop.xcodeproj/project.pbxproj index 4528642..070c838 100644 --- a/App/Develop.xcodeproj/project.pbxproj +++ b/App/Develop.xcodeproj/project.pbxproj @@ -345,7 +345,7 @@ SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 6.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -383,7 +383,7 @@ SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 6.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/App/Production.xcodeproj/project.pbxproj b/App/Production.xcodeproj/project.pbxproj index d6d0e31..c7f27a3 100644 --- a/App/Production.xcodeproj/project.pbxproj +++ b/App/Production.xcodeproj/project.pbxproj @@ -326,7 +326,7 @@ SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_STRICT_CONCURRENCY = targeted; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 6.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -370,7 +370,7 @@ SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_STRICT_CONCURRENCY = targeted; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 6.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; From 8c58e743ca51592ef392c7812935047f35714444 Mon Sep 17 00:00:00 2001 From: uhooi Date: Sat, 13 Jul 2024 22:06:09 +0900 Subject: [PATCH 07/17] Change Strict Concurrency Checking from targeted to complete --- App/Production.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/App/Production.xcodeproj/project.pbxproj b/App/Production.xcodeproj/project.pbxproj index c7f27a3..1f837a2 100644 --- a/App/Production.xcodeproj/project.pbxproj +++ b/App/Production.xcodeproj/project.pbxproj @@ -325,7 +325,7 @@ SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_STRICT_CONCURRENCY = targeted; + SWIFT_STRICT_CONCURRENCY = complete; SWIFT_VERSION = 6.0; TARGETED_DEVICE_FAMILY = "1,2"; }; @@ -369,7 +369,7 @@ SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_STRICT_CONCURRENCY = targeted; + SWIFT_STRICT_CONCURRENCY = complete; SWIFT_VERSION = 6.0; TARGETED_DEVICE_FAMILY = "1,2"; }; From 6fd0e16c78310a105e11ee045fb186cd2d17c67c Mon Sep 17 00:00:00 2001 From: uhooi Date: Sun, 14 Jul 2024 15:58:37 +0900 Subject: [PATCH 08/17] Change Swift Concurrency Checking from Minimal(default) to Complete --- App/Production.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/App/Production.xcodeproj/project.pbxproj b/App/Production.xcodeproj/project.pbxproj index 1f837a2..2bb597f 100644 --- a/App/Production.xcodeproj/project.pbxproj +++ b/App/Production.xcodeproj/project.pbxproj @@ -229,6 +229,7 @@ ONLY_ACTIVE_ARCH = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_STRICT_CONCURRENCY = complete; }; name = Debug; }; @@ -284,6 +285,7 @@ MTL_FAST_MATH = YES; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_STRICT_CONCURRENCY = complete; }; name = Release; }; From 5a29bd05bb5e82d4015657b55d25a161af4c7d00 Mon Sep 17 00:00:00 2001 From: uhooi Date: Sun, 14 Jul 2024 16:01:58 +0900 Subject: [PATCH 09/17] Update SWIFT_STRICT_CONCURRENCY --- App/Develop.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/App/Develop.xcodeproj/project.pbxproj b/App/Develop.xcodeproj/project.pbxproj index 070c838..ea99551 100644 --- a/App/Develop.xcodeproj/project.pbxproj +++ b/App/Develop.xcodeproj/project.pbxproj @@ -252,6 +252,7 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_STRICT_CONCURRENCY = complete; }; name = Debug; }; @@ -307,6 +308,7 @@ SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_STRICT_CONCURRENCY = complete; VALIDATE_PRODUCT = YES; }; name = Release; From 08fc47c57dafc3b5e4bc0fe2ab1b8610495ffbf5 Mon Sep 17 00:00:00 2001 From: uhooi Date: Sun, 14 Jul 2024 16:47:50 +0900 Subject: [PATCH 10/17] Fix build error --- LokiPackage/Package.resolved | 90 +++-------------------- LokiPackage/Package.swift | 34 ++------- LokiPackage/Sources/Core/Log/Logger.swift | 4 +- 3 files changed, 18 insertions(+), 110 deletions(-) diff --git a/LokiPackage/Package.resolved b/LokiPackage/Package.resolved index e18d46b..dd6b23b 100644 --- a/LokiPackage/Package.resolved +++ b/LokiPackage/Package.resolved @@ -1,14 +1,6 @@ { + "originHash" : "bb6c5795966de4e05096c73b6cd92718594b769072ebbf694b00bd26290184ce", "pins" : [ - { - "identity" : "collectionconcurrencykit", - "kind" : "remoteSourceControl", - "location" : "https://github.com/JohnSundell/CollectionConcurrencyKit.git", - "state" : { - "revision" : "b4f23e24b5a1bff301efc5e70871083ca029ff95", - "version" : "0.2.0" - } - }, { "identity" : "licensesplugin", "kind" : "remoteSourceControl", @@ -19,21 +11,21 @@ } }, { - "identity" : "playbook-ios", + "identity" : "logdog", "kind" : "remoteSourceControl", - "location" : "https://github.com/playbook-ui/playbook-ios.git", + "location" : "https://github.com/uhooi/Logdog.git", "state" : { - "revision" : "3320069508e677858a5dbfac72622b885f3b351e", - "version" : "0.3.3" + "revision" : "bc02bf2122f9da59e99710d1abb5e55fe40c950b", + "version" : "0.3.0" } }, { - "identity" : "sourcekitten", + "identity" : "playbook-ios", "kind" : "remoteSourceControl", - "location" : "https://github.com/jpsim/SourceKitten.git", + "location" : "https://github.com/playbook-ui/playbook-ios.git", "state" : { - "revision" : "fc12c0f182c5cf80781dd933b17a82eb98bd7c61", - "version" : "0.33.1" + "revision" : "3320069508e677858a5dbfac72622b885f3b351e", + "version" : "0.3.3" } }, { @@ -45,15 +37,6 @@ "version" : "1.0.0" } }, - { - "identity" : "swift-argument-parser", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-argument-parser.git", - "state" : { - "revision" : "fddd1c00396eed152c45a46bea9f47b98e59301d", - "version" : "1.2.0" - } - }, { "identity" : "swift-numerics", "kind" : "remoteSourceControl", @@ -62,60 +45,7 @@ "revision" : "0a5bc04095a675662cf24757cc0640aa2204253b", "version" : "1.0.2" } - }, - { - "identity" : "swift-syntax", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-syntax.git", - "state" : { - "revision" : "a2d31e8880224f5a619f24bf58c122836faf99ff" - } - }, - { - "identity" : "swiftgenplugin", - "kind" : "remoteSourceControl", - "location" : "https://github.com/SwiftGen/SwiftGenPlugin", - "state" : { - "revision" : "879b85a470cacd70c19e22eb7e11a3aed66f4068", - "version" : "6.6.2" - } - }, - { - "identity" : "swiftlint", - "kind" : "remoteSourceControl", - "location" : "https://github.com/uhooi/SwiftLint.git", - "state" : { - "branch" : "feature/add_command_plugin", - "revision" : "05048f87831117747467d520c69de879c63daf4a" - } - }, - { - "identity" : "swiftytexttable", - "kind" : "remoteSourceControl", - "location" : "https://github.com/scottrhoyt/SwiftyTextTable.git", - "state" : { - "revision" : "c6df6cf533d120716bff38f8ff9885e1ce2a4ac3", - "version" : "0.9.0" - } - }, - { - "identity" : "swxmlhash", - "kind" : "remoteSourceControl", - "location" : "https://github.com/drmohundro/SWXMLHash.git", - "state" : { - "revision" : "4d0f62f561458cbe1f732171e625f03195151b60", - "version" : "7.0.1" - } - }, - { - "identity" : "yams", - "kind" : "remoteSourceControl", - "location" : "https://github.com/jpsim/Yams.git", - "state" : { - "revision" : "01835dc202670b5bb90d07f3eae41867e9ed29f6", - "version" : "5.0.1" - } } ], - "version" : 2 + "version" : 3 } diff --git a/LokiPackage/Package.swift b/LokiPackage/Package.swift index 5093bf2..c2ed699 100644 --- a/LokiPackage/Package.swift +++ b/LokiPackage/Package.swift @@ -1,19 +1,7 @@ // swift-tools-version: 6.0 -// swiftlint:disable:previous file_name import PackageDescription -private extension PackageDescription.Target.Dependency { - static let algorithms: Self = .product(name: "Algorithms", package: "swift-algorithms") - static let logdogUI: Self = .product(name: "LogdogUI", package: "Logdog") - static let playbook: Self = .product(name: "Playbook", package: "playbook-ios") - static let playbookUI: Self = .product(name: "PlaybookUI", package: "playbook-ios") -} - -private extension PackageDescription.Target.PluginUsage { - static let licenses: Self = .plugin(name: "LicensesPlugin", package: "LicensesPlugin") -} - let debugOtherSwiftFlags = [ "-Xfrontend", "-warn-long-expression-type-checking=500", "-Xfrontend", "-warn-long-function-bodies=500", @@ -23,17 +11,8 @@ let debugOtherSwiftFlags = [ let debugSwiftSettings: [PackageDescription.SwiftSetting] = [ .unsafeFlags(debugOtherSwiftFlags, .when(configuration: .debug)), - .enableUpcomingFeature("ConciseMagicFile", .when(configuration: .debug)), // SE-0274 - .enableUpcomingFeature("ForwardTrailingClosures", .when(configuration: .debug)), // SE-0286 .enableUpcomingFeature("ExistentialAny", .when(configuration: .debug)), // SE-0335 - .enableUpcomingFeature("BareSlashRegexLiterals", .when(configuration: .debug)), // SE-0354 - .enableUpcomingFeature("DeprecateApplicationMain", .when(configuration: .debug)), // SE-0383 - .enableUpcomingFeature("ImportObjcForwardDeclarations", .when(configuration: .debug)), // SE-0384 - .enableUpcomingFeature("DisableOutwardActorInference", .when(configuration: .debug)), // SE-0401 - .enableUpcomingFeature("IsolatedDefaultValues", .when(configuration: .debug)), // SE-0411 - .enableUpcomingFeature("GlobalConcurrency", .when(configuration: .debug)), // SE-0412 .enableExperimentalFeature("AccessLevelOnImport", .when(configuration: .debug)), // SE-0409 - .enableExperimentalFeature("StrictConcurrency", .when(configuration: .debug)), ] let productionFeatures: [PackageDescription.Target.Dependency] = [ @@ -81,8 +60,8 @@ let package = Package( name: "CatalogApp", dependencies: productionFeatures + [ "UICore", - .playbook, - .playbookUI, + .product(name: "Playbook", package: "playbook-ios"), + .product(name: "PlaybookUI", package: "playbook-ios"), ], path: "./Sources/Apps/Catalog"), @@ -92,7 +71,7 @@ let package = Package( dependencies: [ "SakatsuData", "UICore", - .algorithms, + .product(name: "Algorithms", package: "swift-algorithms"), ], path: "./Sources/Features/Sakatsu"), .testTarget( @@ -112,12 +91,12 @@ let package = Package( ], path: "./Sources/Features/Licenses", plugins: [ - .licenses, + .plugin(name: "LicensesPlugin", package: "LicensesPlugin"), ]), .target( name: "DebugFeature", dependencies: [ - .logdogUI, + .product(name: "LogdogUI", package: "Logdog"), ], path: "./Sources/Features/Debug"), @@ -150,7 +129,8 @@ let package = Package( name: "UICore", dependencies: [], path: "./Sources/Core/UI"), - ] + ], + swiftLanguageVersions: [.v6] ) for target in package.targets { diff --git a/LokiPackage/Sources/Core/Log/Logger.swift b/LokiPackage/Sources/Core/Log/Logger.swift index 129fd52..c4f2c0a 100644 --- a/LokiPackage/Sources/Core/Log/Logger.swift +++ b/LokiPackage/Sources/Core/Log/Logger.swift @@ -2,9 +2,7 @@ import Foundation import os package enum Logger { - // The Logger class is thread-safe. - // ref: https://developer.apple.com/forums/thread/747816 - nonisolated(unsafe) package static let standard: os.Logger = .init( + package static let standard: os.Logger = .init( subsystem: Bundle.main.bundleIdentifier!, category: LogCategory.standard.rawValue ) From 43e1bd4b7b3e854e0f9716bc0b80c5b35af610b9 Mon Sep 17 00:00:00 2001 From: uhooi Date: Sat, 3 Aug 2024 00:56:20 +0900 Subject: [PATCH 11/17] Enable InternalImportsByDefault flag --- LokiPackage/Package.swift | 2 +- LokiPackage/Sources/Apps/Develop/DevelopRootScreen.swift | 2 +- LokiPackage/Sources/Core/Log/Logger.swift | 2 +- LokiPackage/Sources/Core/UI/Extensions/View+Alert.swift | 2 +- LokiPackage/Sources/Data/Sakatsu/Models/DefaultSaunaTimes.swift | 2 +- LokiPackage/Sources/Data/Sakatsu/Models/Sakatsu.swift | 2 +- LokiPackage/Sources/Data/Sakatsu/Models/SaunaSet.swift | 2 +- LokiPackage/Sources/Data/Sakatsu/Models/SaunaTemperature.swift | 2 +- .../Sources/Data/Sakatsu/Validators/SakatsuValidator.swift | 2 +- LokiPackage/Sources/Features/Debug/Debug/DebugScreen.swift | 2 +- .../Features/Licenses/LicenseList/LicenseListScreen.swift | 2 +- .../Features/Sakatsu/SakatsuList/SakatsuListScreen.swift | 2 +- .../Sources/Features/Settings/Settings/SettingsScreen.swift | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/LokiPackage/Package.swift b/LokiPackage/Package.swift index c2ed699..9ff1d67 100644 --- a/LokiPackage/Package.swift +++ b/LokiPackage/Package.swift @@ -12,7 +12,7 @@ let debugOtherSwiftFlags = [ let debugSwiftSettings: [PackageDescription.SwiftSetting] = [ .unsafeFlags(debugOtherSwiftFlags, .when(configuration: .debug)), .enableUpcomingFeature("ExistentialAny", .when(configuration: .debug)), // SE-0335 - .enableExperimentalFeature("AccessLevelOnImport", .when(configuration: .debug)), // SE-0409 + .enableUpcomingFeature("InternalImportsByDefault", .when(configuration: .debug)), // SE-0409 ] let productionFeatures: [PackageDescription.Target.Dependency] = [ diff --git a/LokiPackage/Sources/Apps/Develop/DevelopRootScreen.swift b/LokiPackage/Sources/Apps/Develop/DevelopRootScreen.swift index 18dd95d..1364be9 100644 --- a/LokiPackage/Sources/Apps/Develop/DevelopRootScreen.swift +++ b/LokiPackage/Sources/Apps/Develop/DevelopRootScreen.swift @@ -1,4 +1,4 @@ -import SwiftUI +public import SwiftUI import SakatsuFeature import SettingsFeature import LicensesFeature diff --git a/LokiPackage/Sources/Core/Log/Logger.swift b/LokiPackage/Sources/Core/Log/Logger.swift index c4f2c0a..54def1e 100644 --- a/LokiPackage/Sources/Core/Log/Logger.swift +++ b/LokiPackage/Sources/Core/Log/Logger.swift @@ -1,5 +1,5 @@ import Foundation -import os +package import struct os.Logger package enum Logger { package static let standard: os.Logger = .init( diff --git a/LokiPackage/Sources/Core/UI/Extensions/View+Alert.swift b/LokiPackage/Sources/Core/UI/Extensions/View+Alert.swift index bd7d7b5..a98e9a4 100644 --- a/LokiPackage/Sources/Core/UI/Extensions/View+Alert.swift +++ b/LokiPackage/Sources/Core/UI/Extensions/View+Alert.swift @@ -1,4 +1,4 @@ -import SwiftUI +package import SwiftUI extension View { /// - Important: After this alert disappears, should set `error` to `nil` diff --git a/LokiPackage/Sources/Data/Sakatsu/Models/DefaultSaunaTimes.swift b/LokiPackage/Sources/Data/Sakatsu/Models/DefaultSaunaTimes.swift index 4432d79..876f9aa 100644 --- a/LokiPackage/Sources/Data/Sakatsu/Models/DefaultSaunaTimes.swift +++ b/LokiPackage/Sources/Data/Sakatsu/Models/DefaultSaunaTimes.swift @@ -1,4 +1,4 @@ -import Foundation +package import Foundation package struct DefaultSaunaTimes { package var saunaTime: TimeInterval? diff --git a/LokiPackage/Sources/Data/Sakatsu/Models/Sakatsu.swift b/LokiPackage/Sources/Data/Sakatsu/Models/Sakatsu.swift index 87364cc..0303fa8 100644 --- a/LokiPackage/Sources/Data/Sakatsu/Models/Sakatsu.swift +++ b/LokiPackage/Sources/Data/Sakatsu/Models/Sakatsu.swift @@ -1,4 +1,4 @@ -import Foundation +package import Foundation package struct Sakatsu: Identifiable { package let id: UUID diff --git a/LokiPackage/Sources/Data/Sakatsu/Models/SaunaSet.swift b/LokiPackage/Sources/Data/Sakatsu/Models/SaunaSet.swift index 6475df1..b2d5d98 100644 --- a/LokiPackage/Sources/Data/Sakatsu/Models/SaunaSet.swift +++ b/LokiPackage/Sources/Data/Sakatsu/Models/SaunaSet.swift @@ -1,4 +1,4 @@ -import Foundation +package import Foundation package protocol SaunaSetItemProtocol { var emoji: String { get } diff --git a/LokiPackage/Sources/Data/Sakatsu/Models/SaunaTemperature.swift b/LokiPackage/Sources/Data/Sakatsu/Models/SaunaTemperature.swift index 6085cfc..3684ec3 100644 --- a/LokiPackage/Sources/Data/Sakatsu/Models/SaunaTemperature.swift +++ b/LokiPackage/Sources/Data/Sakatsu/Models/SaunaTemperature.swift @@ -1,4 +1,4 @@ -import Foundation +package import Foundation package struct SaunaTemperature: Identifiable { package let id: UUID diff --git a/LokiPackage/Sources/Data/Sakatsu/Validators/SakatsuValidator.swift b/LokiPackage/Sources/Data/Sakatsu/Validators/SakatsuValidator.swift index b065f9e..8642e2d 100644 --- a/LokiPackage/Sources/Data/Sakatsu/Validators/SakatsuValidator.swift +++ b/LokiPackage/Sources/Data/Sakatsu/Validators/SakatsuValidator.swift @@ -1,4 +1,4 @@ -import Foundation +package import Foundation package protocol SakatsuValidator { func validate(facilityName: String) -> Bool diff --git a/LokiPackage/Sources/Features/Debug/Debug/DebugScreen.swift b/LokiPackage/Sources/Features/Debug/Debug/DebugScreen.swift index cd21957..3dab88d 100644 --- a/LokiPackage/Sources/Features/Debug/Debug/DebugScreen.swift +++ b/LokiPackage/Sources/Features/Debug/Debug/DebugScreen.swift @@ -1,4 +1,4 @@ -import SwiftUI +package import SwiftUI import LogdogUI import LogCore diff --git a/LokiPackage/Sources/Features/Licenses/LicenseList/LicenseListScreen.swift b/LokiPackage/Sources/Features/Licenses/LicenseList/LicenseListScreen.swift index 6b436ac..de16461 100644 --- a/LokiPackage/Sources/Features/Licenses/LicenseList/LicenseListScreen.swift +++ b/LokiPackage/Sources/Features/Licenses/LicenseList/LicenseListScreen.swift @@ -1,4 +1,4 @@ -import SwiftUI +package import SwiftUI import LogCore package struct LicenseListScreen: View { diff --git a/LokiPackage/Sources/Features/Sakatsu/SakatsuList/SakatsuListScreen.swift b/LokiPackage/Sources/Features/Sakatsu/SakatsuList/SakatsuListScreen.swift index 81ab4ee..30eb3dd 100644 --- a/LokiPackage/Sources/Features/Sakatsu/SakatsuList/SakatsuListScreen.swift +++ b/LokiPackage/Sources/Features/Sakatsu/SakatsuList/SakatsuListScreen.swift @@ -1,4 +1,4 @@ -import SwiftUI +package import SwiftUI import SakatsuData import LogCore import UICore diff --git a/LokiPackage/Sources/Features/Settings/Settings/SettingsScreen.swift b/LokiPackage/Sources/Features/Settings/Settings/SettingsScreen.swift index 111ee35..727c722 100644 --- a/LokiPackage/Sources/Features/Settings/Settings/SettingsScreen.swift +++ b/LokiPackage/Sources/Features/Settings/Settings/SettingsScreen.swift @@ -1,4 +1,4 @@ -import SwiftUI +package import SwiftUI import LogCore import UICore From 88aeaa42885b1cce34c1489d5bfb9f4542a6f1c9 Mon Sep 17 00:00:00 2001 From: uhooi Date: Sat, 3 Aug 2024 01:01:56 +0900 Subject: [PATCH 12/17] Fix build error for production --- LokiPackage/Sources/Apps/Production/ProductionRootScreen.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LokiPackage/Sources/Apps/Production/ProductionRootScreen.swift b/LokiPackage/Sources/Apps/Production/ProductionRootScreen.swift index babf786..3d2756c 100644 --- a/LokiPackage/Sources/Apps/Production/ProductionRootScreen.swift +++ b/LokiPackage/Sources/Apps/Production/ProductionRootScreen.swift @@ -1,4 +1,4 @@ -import SwiftUI +public import SwiftUI import SakatsuFeature import SettingsFeature import LicensesFeature From d0a091e8ec6dbd9e819a5445de58e90f12d844d5 Mon Sep 17 00:00:00 2001 From: uhooi Date: Mon, 5 Aug 2024 11:41:55 +0900 Subject: [PATCH 13/17] Remove swiftLanguageVersions --- LokiPackage/Package.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/LokiPackage/Package.swift b/LokiPackage/Package.swift index 9ff1d67..bb90e1d 100644 --- a/LokiPackage/Package.swift +++ b/LokiPackage/Package.swift @@ -129,8 +129,7 @@ let package = Package( name: "UICore", dependencies: [], path: "./Sources/Core/UI"), - ], - swiftLanguageVersions: [.v6] + ] ) for target in package.targets { From 322bbdc71cd8ca8d860473a956fdfae02f130c66 Mon Sep 17 00:00:00 2001 From: uhooi Date: Fri, 9 Aug 2024 01:08:40 +0900 Subject: [PATCH 14/17] Bump LicensesPlugin from 0.1.5 to 0.2.0 --- Loki.xcworkspace/xcshareddata/swiftpm/Package.resolved | 6 +++--- LokiPackage/Package.swift | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Loki.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Loki.xcworkspace/xcshareddata/swiftpm/Package.resolved index 0fb3f15..1715ff7 100644 --- a/Loki.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Loki.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,13 +1,13 @@ { - "originHash" : "c8222e67b71e52ad42dbe97f9f64a00f8f9ca10eb16c103f0fcf6981ae37efd9", + "originHash" : "22a2102118aa255eed3187cf83740c85cc01b36b1d2d89683f34d4326b0a743a", "pins" : [ { "identity" : "licensesplugin", "kind" : "remoteSourceControl", "location" : "https://github.com/maiyama18/LicensesPlugin", "state" : { - "revision" : "e7dbcda9f67fdd747c16244f97070a009205e814", - "version" : "0.1.5" + "revision" : "3061787a7eca7ba801d7a3abccfc077053e79d73", + "version" : "0.2.0" } }, { diff --git a/LokiPackage/Package.swift b/LokiPackage/Package.swift index bb90e1d..34ef8de 100644 --- a/LokiPackage/Package.swift +++ b/LokiPackage/Package.swift @@ -42,7 +42,7 @@ let package = Package( .package(url: "https://github.com/playbook-ui/playbook-ios.git", from: "0.3.2"), // Plugins - .package(url: "https://github.com/maiyama18/LicensesPlugin", from: "0.1.5"), + .package(url: "https://github.com/maiyama18/LicensesPlugin", from: "0.2.0"), ], targets: [ // App layer From 306629a72de9704622c8aaaed0a13434ee21a9a0 Mon Sep 17 00:00:00 2001 From: uhooi Date: Fri, 9 Aug 2024 01:37:08 +0900 Subject: [PATCH 15/17] Fix catalog build error --- Loki.xcworkspace/xcshareddata/swiftpm/Package.resolved | 6 +++--- LokiPackage/Package.swift | 2 +- LokiPackage/Sources/Apps/Catalog/CatalogRootScreen.swift | 2 +- LokiPackage/Sources/Apps/Catalog/PlaybookScreen.swift | 2 ++ .../Sources/Apps/Catalog/Scenarios/LicensesScenarios.swift | 2 +- .../Sources/Apps/Catalog/Scenarios/SakatsuScenarios.swift | 2 +- .../Sources/Apps/Catalog/Scenarios/SettingsScenarios.swift | 7 +++++-- 7 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Loki.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Loki.xcworkspace/xcshareddata/swiftpm/Package.resolved index 1715ff7..90a9f15 100644 --- a/Loki.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Loki.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "22a2102118aa255eed3187cf83740c85cc01b36b1d2d89683f34d4326b0a743a", + "originHash" : "76301bbafa9f6cfd02d1e6150838fbc5e05b9af00fe59801e1cc80a1ddba6bb6", "pins" : [ { "identity" : "licensesplugin", @@ -24,8 +24,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/playbook-ui/playbook-ios.git", "state" : { - "revision" : "b2f25b15e82bc9aca59d60e79695f0c338e0e2e9", - "version" : "0.3.2" + "revision" : "da86a1a533e7ab5b1203908dfbb33aa38b782421", + "version" : "0.4.1" } }, { diff --git a/LokiPackage/Package.swift b/LokiPackage/Package.swift index 34ef8de..9557811 100644 --- a/LokiPackage/Package.swift +++ b/LokiPackage/Package.swift @@ -39,7 +39,7 @@ let package = Package( // Libraries .package(url: "https://github.com/apple/swift-algorithms.git", from: "1.0.0"), .package(url: "https://github.com/uhooi/Logdog.git", from: "0.3.0"), - .package(url: "https://github.com/playbook-ui/playbook-ios.git", from: "0.3.2"), + .package(url: "https://github.com/playbook-ui/playbook-ios.git", from: "0.4.1"), // Plugins .package(url: "https://github.com/maiyama18/LicensesPlugin", from: "0.2.0"), diff --git a/LokiPackage/Sources/Apps/Catalog/CatalogRootScreen.swift b/LokiPackage/Sources/Apps/Catalog/CatalogRootScreen.swift index e3734f1..e24ed07 100644 --- a/LokiPackage/Sources/Apps/Catalog/CatalogRootScreen.swift +++ b/LokiPackage/Sources/Apps/Catalog/CatalogRootScreen.swift @@ -1,4 +1,4 @@ -import SwiftUI +public import SwiftUI import PlaybookUI public struct CatalogRootScreen: View { diff --git a/LokiPackage/Sources/Apps/Catalog/PlaybookScreen.swift b/LokiPackage/Sources/Apps/Catalog/PlaybookScreen.swift index cd48abd..9fc80b8 100644 --- a/LokiPackage/Sources/Apps/Catalog/PlaybookScreen.swift +++ b/LokiPackage/Sources/Apps/Catalog/PlaybookScreen.swift @@ -16,6 +16,7 @@ struct PlaybookScreen: View { .tabItem { Image(systemName: "rectangle.grid.3x2") .accessibilityHidden(true) + Text("Gallery") } @@ -24,6 +25,7 @@ struct PlaybookScreen: View { .tabItem { Image(systemName: "doc.text.magnifyingglass") .accessibilityHidden(true) + Text("Catalog") } } diff --git a/LokiPackage/Sources/Apps/Catalog/Scenarios/LicensesScenarios.swift b/LokiPackage/Sources/Apps/Catalog/Scenarios/LicensesScenarios.swift index 13eb62e..dd7798a 100644 --- a/LokiPackage/Sources/Apps/Catalog/Scenarios/LicensesScenarios.swift +++ b/LokiPackage/Sources/Apps/Catalog/Scenarios/LicensesScenarios.swift @@ -2,7 +2,7 @@ import Playbook import LicensesFeature @MainActor -struct LicensesScenarios: ScenarioProvider { +struct LicensesScenarios: @preconcurrency ScenarioProvider { static func addScenarios(into playbook: Playbook) { playbook.addScenarios(of: "Licenses") { Scenario("LicenseList", layout: .fill) { diff --git a/LokiPackage/Sources/Apps/Catalog/Scenarios/SakatsuScenarios.swift b/LokiPackage/Sources/Apps/Catalog/Scenarios/SakatsuScenarios.swift index 98f68ad..c840b02 100644 --- a/LokiPackage/Sources/Apps/Catalog/Scenarios/SakatsuScenarios.swift +++ b/LokiPackage/Sources/Apps/Catalog/Scenarios/SakatsuScenarios.swift @@ -3,7 +3,7 @@ import Playbook import SakatsuFeature @MainActor -struct SakatsuScenarios: ScenarioProvider { +struct SakatsuScenarios: @preconcurrency ScenarioProvider { static func addScenarios(into playbook: Playbook) { playbook.addScenarios(of: "Sakatsu") { Scenario("SakatsuList", layout: .fill) { diff --git a/LokiPackage/Sources/Apps/Catalog/Scenarios/SettingsScenarios.swift b/LokiPackage/Sources/Apps/Catalog/Scenarios/SettingsScenarios.swift index 783085c..143de92 100644 --- a/LokiPackage/Sources/Apps/Catalog/Scenarios/SettingsScenarios.swift +++ b/LokiPackage/Sources/Apps/Catalog/Scenarios/SettingsScenarios.swift @@ -3,12 +3,15 @@ import Playbook import SettingsFeature @MainActor -struct SettingsScenarios: ScenarioProvider { +struct SettingsScenarios: @preconcurrency ScenarioProvider { static func addScenarios(into playbook: Playbook) { playbook.addScenarios(of: "Settings") { Scenario("Settings", layout: .fill) { NavigationStack { - SettingsScreen(onLicensesButtonClick: {}) + SettingsScreen( + onLicensesButtonClick: {}, + onDebugButtonClick: {} + ) } } } From 76156ede89d36d93da3abfe829357066727a1f01 Mon Sep 17 00:00:00 2001 From: uhooi Date: Thu, 29 Aug 2024 23:16:40 +0900 Subject: [PATCH 16/17] Remove `@MainActor` --- LokiPackage/Sources/Apps/Develop/DevelopRootScreen.swift | 3 --- LokiPackage/Sources/Apps/Production/ProductionRootScreen.swift | 3 --- .../Features/Sakatsu/SakatsuInput/SakatsuInputScreen.swift | 1 - .../Features/Sakatsu/SakatsuList/SakatsuListScreen.swift | 2 -- .../Sources/Features/Settings/Settings/SettingsScreen.swift | 2 -- 5 files changed, 11 deletions(-) diff --git a/LokiPackage/Sources/Apps/Develop/DevelopRootScreen.swift b/LokiPackage/Sources/Apps/Develop/DevelopRootScreen.swift index 1364be9..8accb4a 100644 --- a/LokiPackage/Sources/Apps/Develop/DevelopRootScreen.swift +++ b/LokiPackage/Sources/Apps/Develop/DevelopRootScreen.swift @@ -23,7 +23,6 @@ public struct DevelopRootScreen: View { // MARK: - Screen factory private extension DevelopRootScreen { - @MainActor func makeSakatsuListScreen() -> some View { SakatsuListScreen(onSettingsButtonClick: { isSettingsScreenPresented = true @@ -34,7 +33,6 @@ private extension DevelopRootScreen { } #if DEBUG - @MainActor func makeSettingsScreen() -> some View { SettingsScreen(onLicensesButtonClick: { isLicenseListScreenPresented = true @@ -53,7 +51,6 @@ private extension DevelopRootScreen { } } #else - @MainActor func makeSettingsScreen() -> some View { SettingsScreen(onLicensesButtonClick: { isLicenseListScreenPresented = true diff --git a/LokiPackage/Sources/Apps/Production/ProductionRootScreen.swift b/LokiPackage/Sources/Apps/Production/ProductionRootScreen.swift index 3d2756c..1df0716 100644 --- a/LokiPackage/Sources/Apps/Production/ProductionRootScreen.swift +++ b/LokiPackage/Sources/Apps/Production/ProductionRootScreen.swift @@ -19,7 +19,6 @@ public struct ProductionRootScreen: View { // MARK: - Screen factory private extension ProductionRootScreen { - @MainActor func makeSakatsuListScreen() -> some View { SakatsuListScreen(onSettingsButtonClick: { isSettingsScreenPresented = true @@ -30,7 +29,6 @@ private extension ProductionRootScreen { } #if DEBUG - @MainActor func makeSettingsScreen() -> some View { SettingsScreen(onLicensesButtonClick: { isLicenseListScreenPresented = true @@ -42,7 +40,6 @@ private extension ProductionRootScreen { } } #else - @MainActor func makeSettingsScreen() -> some View { SettingsScreen(onLicensesButtonClick: { isLicenseListScreenPresented = true diff --git a/LokiPackage/Sources/Features/Sakatsu/SakatsuInput/SakatsuInputScreen.swift b/LokiPackage/Sources/Features/Sakatsu/SakatsuInput/SakatsuInputScreen.swift index 0004701..0eb163e 100644 --- a/LokiPackage/Sources/Features/Sakatsu/SakatsuInput/SakatsuInputScreen.swift +++ b/LokiPackage/Sources/Features/Sakatsu/SakatsuInput/SakatsuInputScreen.swift @@ -43,7 +43,6 @@ struct SakatsuInputScreen: View { } } - @MainActor init( sakatsuEditMode: SakatsuEditMode, onSakatsuSave: @escaping () -> Void, diff --git a/LokiPackage/Sources/Features/Sakatsu/SakatsuList/SakatsuListScreen.swift b/LokiPackage/Sources/Features/Sakatsu/SakatsuList/SakatsuListScreen.swift index 30eb3dd..317e48f 100644 --- a/LokiPackage/Sources/Features/Sakatsu/SakatsuList/SakatsuListScreen.swift +++ b/LokiPackage/Sources/Features/Sakatsu/SakatsuList/SakatsuListScreen.swift @@ -72,7 +72,6 @@ package struct SakatsuListScreen: View { } } - @MainActor package init(onSettingsButtonClick: @escaping () -> Void) { Logger.standard.debug("\(#function, privacy: .public)") @@ -124,7 +123,6 @@ private extension View { .environment(\.editMode, editMode) } - @MainActor func sakatsuInputSheet( shouldShowSheet: Bool, selectedSakatsu: Sakatsu?, diff --git a/LokiPackage/Sources/Features/Settings/Settings/SettingsScreen.swift b/LokiPackage/Sources/Features/Settings/Settings/SettingsScreen.swift index 727c722..e357122 100644 --- a/LokiPackage/Sources/Features/Settings/Settings/SettingsScreen.swift +++ b/LokiPackage/Sources/Features/Settings/Settings/SettingsScreen.swift @@ -48,7 +48,6 @@ package struct SettingsScreen: View { } #if DEBUG - @MainActor package init( onLicensesButtonClick: @escaping () -> Void, onDebugButtonClick: @escaping () -> Void @@ -61,7 +60,6 @@ package struct SettingsScreen: View { )) } #else - @MainActor package init( onLicensesButtonClick: @escaping () -> Void ) { From 4b9fabd901490c375c6b9a916e358b635a93fb5b Mon Sep 17 00:00:00 2001 From: uhooi Date: Tue, 17 Sep 2024 12:14:47 +0900 Subject: [PATCH 17/17] Bump swift-algorithms from 1.0.0 to 1.2.0 --- Loki.xcworkspace/xcshareddata/swiftpm/Package.resolved | 6 +++--- LokiPackage/Package.swift | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Loki.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Loki.xcworkspace/xcshareddata/swiftpm/Package.resolved index 90a9f15..3b0617c 100644 --- a/Loki.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Loki.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "76301bbafa9f6cfd02d1e6150838fbc5e05b9af00fe59801e1cc80a1ddba6bb6", + "originHash" : "46d4a894610dea88c6f16090667e2703eb6ad07b5f0aaae8e556d491297df223", "pins" : [ { "identity" : "licensesplugin", @@ -33,8 +33,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-algorithms.git", "state" : { - "revision" : "b14b7f4c528c942f121c8b860b9410b2bf57825e", - "version" : "1.0.0" + "revision" : "f6919dfc309e7f1b56224378b11e28bab5bccc42", + "version" : "1.2.0" } }, { diff --git a/LokiPackage/Package.swift b/LokiPackage/Package.swift index 9557811..4c74036 100644 --- a/LokiPackage/Package.swift +++ b/LokiPackage/Package.swift @@ -37,7 +37,7 @@ let package = Package( ], dependencies: [ // Libraries - .package(url: "https://github.com/apple/swift-algorithms.git", from: "1.0.0"), + .package(url: "https://github.com/apple/swift-algorithms.git", from: "1.2.0"), .package(url: "https://github.com/uhooi/Logdog.git", from: "0.3.0"), .package(url: "https://github.com/playbook-ui/playbook-ios.git", from: "0.4.1"),