From e80a2ebd4231739633e76aae116ab792bbb47bfe Mon Sep 17 00:00:00 2001 From: dankinsoid <30962149+dankinsoid@users.noreply.github.com> Date: Sun, 17 Mar 2024 15:13:46 +0300 Subject: [PATCH] 4.21.0 --- README.md | 2 +- Sources/VDFlow/StepsCollection.swift | 25 ------------------------- Sources/VDFlowMacros/StepsMacro.swift | 2 +- 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 1a252e9..82b0c65 100644 --- a/README.md +++ b/README.md @@ -207,7 +207,7 @@ import PackageDescription let package = Package( name: "SomeProject", dependencies: [ - .package(url: "https://github.com/dankinsoid/VDFlow.git", from: "4.20.0") + .package(url: "https://github.com/dankinsoid/VDFlow.git", from: "4.21.0") ], targets: [ .target(name: "SomeProject", dependencies: ["VDFlow"]) diff --git a/Sources/VDFlow/StepsCollection.swift b/Sources/VDFlow/StepsCollection.swift index aa9d5d3..a91de6d 100644 --- a/Sources/VDFlow/StepsCollection.swift +++ b/Sources/VDFlow/StepsCollection.swift @@ -4,30 +4,5 @@ public protocol StepsCollection { associatedtype AllSteps: Hashable & Codable & Sendable var selected: AllSteps { get set } - static var _mutateIDs: [AllSteps: WritableKeyPath] { get } var _lastMutateID: MutateID? { get } } - -//extension Optional: CaseIterable where Wrapped: CaseIterable { -// -// public static var allCases: [Wrapped?] { -// [.none] + Wrapped.allCases.map { $0 } -// } -//} -// -//extension Optional: RawRepresentable where Wrapped: RawRepresentable { -// -// public init?(rawValue: Wrapped.RawValue?) { -// switch rawValue { -// case let .some(rawValue): -// guard let wrapped = Wrapped(rawValue: rawValue) else { return nil } -// self = .some(wrapped) -// case .none: -// self = .none -// } -// } -// -// public var rawValue: Wrapped.RawValue? { -// self?.rawValue -// } -//} diff --git a/Sources/VDFlowMacros/StepsMacro.swift b/Sources/VDFlowMacros/StepsMacro.swift index 5630b23..a107154 100644 --- a/Sources/VDFlowMacros/StepsMacro.swift +++ b/Sources/VDFlowMacros/StepsMacro.swift @@ -336,7 +336,7 @@ public struct StepsMacro: MemberAttributeMacro, ExtensionMacro, MemberMacro, Acc let mutateIDs: DeclSyntax = """ - public static var _mutateIDs: [AllSteps: WritableKeyPath] { + private static var _mutateIDs: [AllSteps: WritableKeyPath] { [\(raw: cases.map { ".\($0): \\.$\($0)._mutateID" }.joined(separator: ", "))] } """