Skip to content

Commit

Permalink
Boosted build/version; formatting; updating for new Xcode/OS; bugfixe…
Browse files Browse the repository at this point in the history
…s mirrored from GRT
  • Loading branch information
Reed Es committed Oct 14, 2023
1 parent 1a2efa5 commit 2647eca
Show file tree
Hide file tree
Showing 23 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion Sources/Entities/AppSetting-dedupe.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

//
// AppSetting.swift
// AppSetting-dedupe.swift
//
// Copyright 2023 OpenAlloc LLC
//
Expand Down
2 changes: 1 addition & 1 deletion Sources/Entities/AppSetting-encodable.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

//
// AppSetting.swift
// AppSetting-encodable.swift
//
// Copyright 2023 OpenAlloc LLC
//
Expand Down
4 changes: 2 additions & 2 deletions Sources/Entities/MCategory-dedupe.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

//
// MCategory.swift
// MCategory-dedupe.swift
//
// Copyright 2022, 2023 OpenAlloc LLC
//
Expand All @@ -14,7 +14,7 @@ import CoreData
import TrackerLib

extension MCategory {
internal static func dedupe(_ context: NSManagedObjectContext, archiveID: UUID) throws {
static func dedupe(_ context: NSManagedObjectContext, archiveID: UUID) throws {
let pred = getPredicate(archiveID: archiveID)
let sort = byCreatedAt()
var first: MCategory?
Expand Down
2 changes: 1 addition & 1 deletion Sources/Entities/MCategory-encodable.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

//
// MCategory.swift
// MCategory-encodable.swift
//
// Copyright 2022, 2023 OpenAlloc LLC
//
Expand Down
2 changes: 1 addition & 1 deletion Sources/Entities/MCategory-fetch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import CoreData

import TrackerLib

internal extension MCategory {
extension MCategory {
static func getPredicate(archiveID: UUID) -> NSPredicate {
NSPredicate(format: "archiveID == %@", archiveID as NSUUID)
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Entities/MCategory-userOrdered.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// MCategory.swift
// MCategory-userOrdered.swift
//
// Copyright 2022, 2023 OpenAlloc LLC
//
Expand Down
8 changes: 4 additions & 4 deletions Sources/Entities/MFoodGroup-dedupe.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

//
// MFoodGroup.swift
// MFoodGroup-dedupe.swift
//
// Copyright 2023 OpenAlloc LLC
//
Expand All @@ -14,9 +14,9 @@ import CoreData
import TrackerLib

extension MFoodGroup {
internal static func dedupe(_ context: NSManagedObjectContext,
categoryArchiveID: UUID,
groupRaw: Int16) throws
static func dedupe(_ context: NSManagedObjectContext,
categoryArchiveID: UUID,
groupRaw: Int16) throws
{
let pred = getPredicate(categoryArchiveID: categoryArchiveID, groupRaw: groupRaw)
let sort = byCreatedAt()
Expand Down
2 changes: 1 addition & 1 deletion Sources/Entities/MFoodGroup-encodable.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

//
// MFoodGroup.swift
// MFoodGroup-encodable.swift
//
// Copyright 2023 OpenAlloc LLC
//
Expand Down
4 changes: 2 additions & 2 deletions Sources/Entities/MServing-dedupe.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

//
// MServing.swift
// MServing-dedupe.swift
//
// Copyright 2022, 2023 OpenAlloc LLC
//
Expand All @@ -14,7 +14,7 @@ import CoreData
import TrackerLib

extension MServing {
internal static func dedupe(_ context: NSManagedObjectContext, categoryArchiveID: UUID, servingArchiveID: UUID) throws {
static func dedupe(_ context: NSManagedObjectContext, categoryArchiveID: UUID, servingArchiveID: UUID) throws {
let pred = getPredicate(categoryArchiveID: categoryArchiveID, servingArchiveID: servingArchiveID)
let sort = byCreatedAt()
var first: MServing?
Expand Down
2 changes: 1 addition & 1 deletion Sources/Entities/MServing-encodable.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

//
// MServing.swift
// MServing-encodable.swift
//
// Copyright 2022, 2023 OpenAlloc LLC
//
Expand Down
2 changes: 1 addition & 1 deletion Sources/Entities/MServing-userOrdered.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// MServing.swift
// MServing-userOrdered.swift
//
// Copyright 2022, 2023 OpenAlloc LLC
//
Expand Down
4 changes: 2 additions & 2 deletions Sources/Entities/ZCategory-dedupe.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

//
// ZCategory.swift
// ZCategory-dedupe.swift
//
// Copyright 2023 OpenAlloc LLC
//
Expand All @@ -14,7 +14,7 @@ import CoreData
import TrackerLib

extension ZCategory {
internal static func dedupe(_ context: NSManagedObjectContext, categoryArchiveID: UUID, inStore: NSPersistentStore) throws {
static func dedupe(_ context: NSManagedObjectContext, categoryArchiveID: UUID, inStore: NSPersistentStore) throws {
let pred = getPredicate(categoryArchiveID: categoryArchiveID)
let sort = byCreatedAt()
var first: ZCategory?
Expand Down
2 changes: 1 addition & 1 deletion Sources/Entities/ZCategory-encodable.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

//
// ZCategory.swift
// ZCategory-encodable.swift
//
// Copyright 2023 OpenAlloc LLC
//
Expand Down
2 changes: 1 addition & 1 deletion Sources/Entities/ZCategory-fetch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import CoreData

import TrackerLib

internal extension ZCategory {
extension ZCategory {
static func getPredicate(categoryArchiveID: UUID) -> NSPredicate {
NSPredicate(format: "categoryArchiveID == %@", categoryArchiveID as NSUUID)
}
Expand Down
8 changes: 4 additions & 4 deletions Sources/Entities/ZDayRun-dedupe.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

//
// ZDayRun.swift
// ZDayRun-dedupe.swift
//
// Copyright 2023 OpenAlloc LLC
//
Expand All @@ -14,9 +14,9 @@ import CoreData
import TrackerLib

extension ZDayRun {
internal static func dedupe(_ context: NSManagedObjectContext,
consumedDay: String,
inStore: NSPersistentStore) throws
static func dedupe(_ context: NSManagedObjectContext,
consumedDay: String,
inStore: NSPersistentStore) throws
{
let pred = getPredicate(consumedDay: consumedDay)
let sort = byCreatedAt()
Expand Down
2 changes: 1 addition & 1 deletion Sources/Entities/ZDayRun.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public extension ZDayRun {
}
}

internal extension ZDayRun {
extension ZDayRun {
/// Shallow copy of self to specified store, returning newly copied record (residing in dstStore).
/// Does not delete self.
/// Does NOT save context.
Expand Down
10 changes: 5 additions & 5 deletions Sources/Entities/ZServing-dedupe.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

//
// ZServing.swift
// ZServing-dedupe.swift
//
// Copyright 2023 OpenAlloc LLC
//
Expand All @@ -14,10 +14,10 @@ import CoreData
import TrackerLib

extension ZServing {
internal static func dedupe(_ context: NSManagedObjectContext,
categoryArchiveID: UUID,
servingArchiveID: UUID,
inStore: NSPersistentStore) throws
static func dedupe(_ context: NSManagedObjectContext,
categoryArchiveID: UUID,
servingArchiveID: UUID,
inStore: NSPersistentStore) throws
{
let pred = getPredicate(categoryArchiveID: categoryArchiveID, servingArchiveID: servingArchiveID)
let sort = byCreatedAt()
Expand Down
2 changes: 1 addition & 1 deletion Sources/Entities/ZServing-encodable.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

//
// ZServing.swift
// ZServing-encodable.swift
//
// Copyright 2023 OpenAlloc LLC
//
Expand Down
12 changes: 6 additions & 6 deletions Sources/Entities/ZServingRun-dedupe.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

//
// ZServingRun.swift
// ZServingRun-dedupe.swift
//
// Copyright 2023 OpenAlloc LLC
//
Expand All @@ -14,11 +14,11 @@ import CoreData
import TrackerLib

extension ZServingRun {
internal static func dedupe(_ context: NSManagedObjectContext,
servingArchiveID: UUID,
consumedDay: String,
consumedTime: String,
inStore: NSPersistentStore) throws
static func dedupe(_ context: NSManagedObjectContext,
servingArchiveID: UUID,
consumedDay: String,
consumedTime: String,
inStore: NSPersistentStore) throws
{
let pred = getPredicate(servingArchiveID: servingArchiveID,
consumedDay: consumedDay,
Expand Down
2 changes: 1 addition & 1 deletion Sources/Entities/ZServingRun-encodable.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

//
// ZServingRun.swift
// ZServingRun-encodable.swift
//
// Copyright 2023 OpenAlloc LLC
//
Expand Down
18 changes: 9 additions & 9 deletions Sources/Export-utils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ import TrackerLib
archiveStore: NSPersistentStore,
format: ExportFormat = .CSV) throws -> Data?
{
let entries: [(String, Data)] = [
try makeDelimFile(AppSetting.self, context, format: format, inStore: mainStore),
try makeDelimFile(MCategory.self, context, format: format, inStore: mainStore),
try makeDelimFile(MFoodGroup.self, context, format: format, inStore: mainStore),
try makeDelimFile(MServing.self, context, format: format, inStore: mainStore),
let entries: [(String, Data)] = try [
makeDelimFile(AppSetting.self, context, format: format, inStore: mainStore),
makeDelimFile(MCategory.self, context, format: format, inStore: mainStore),
makeDelimFile(MFoodGroup.self, context, format: format, inStore: mainStore),
makeDelimFile(MServing.self, context, format: format, inStore: mainStore),

try makeDelimFile(ZDayRun.self, context, format: format, inStore: archiveStore),
try makeDelimFile(ZCategory.self, context, format: format, inStore: archiveStore),
try makeDelimFile(ZServing.self, context, format: format, inStore: archiveStore),
try makeDelimFile(ZServingRun.self, context, format: format, inStore: archiveStore),
makeDelimFile(ZDayRun.self, context, format: format, inStore: archiveStore),
makeDelimFile(ZCategory.self, context, format: format, inStore: archiveStore),
makeDelimFile(ZServing.self, context, format: format, inStore: archiveStore),
makeDelimFile(ZServingRun.self, context, format: format, inStore: archiveStore),
]

return try createZipArchive(context, entries: entries)
Expand Down
6 changes: 3 additions & 3 deletions Sources/ZTransferUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public func transferToArchive(_ context: NSManagedObjectContext,
/// Does not delete any records.
/// Safe to run on a background context.
/// Does NOT save context.
internal func deepCopy(_ context: NSManagedObjectContext,
fromStore srcStore: NSPersistentStore,
toStore dstStore: NSPersistentStore) throws -> ([ZCategory], [ZDayRun])
func deepCopy(_ context: NSManagedObjectContext,
fromStore srcStore: NSPersistentStore,
toStore dstStore: NSPersistentStore) throws -> ([ZCategory], [ZDayRun])
{
logger.debug("\(#function)")
var copiedZCategories = [ZCategory]()
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestBase.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Testbase.swift
// TestBase.swift
//
// Copyright 2022, 2023 OpenAlloc LLC
//
Expand Down

0 comments on commit 2647eca

Please sign in to comment.