Releases: pointfreeco/swift-case-paths
Releases · pointfreeco/swift-case-paths
1.5.1
What's Changed
- Fixed: Suppress warning generated by
@CasePathable
enums that have cases with aNever
associated type (#179). - Fixed: Temporarily work around a Swift bug in Xcode 16 related to forming case key paths in Swift 6 language mode (#181).
Full Changelog: 1.5.0...1.5.1
1.5.0
What's Changed
- Added:
CasePathIterable
andCasePathReflectable
protocols for abstracting over all of a type's case paths, as well as an enum's given case path (#173). - Changed: Bumped to Swift 6 Language Mode support, dropping support for <5.9 (#168; #172; #174).
- Fixed: Update Package.swift for SwiftSyntax 601-prerelease via new swiftlang organization (#175; thanks @NachoSoto, #177).
- Infrastructure: Make
Optional
/Result
more consistent with macro-generated code (#166). - Infrastructure: Added
.editorconfig
for consistent code formatting (thanks @Matejkob, #176).
New Contributors
- @Matejkob made their first contribution in #176
- @NachoSoto made their first contribution in #177
Full Changelog: 1.4.2...1.5.0
1.4.2
What's Changed
- Fixed: Address a
@CasePathable
regression that produced warnings when@CasePathable
was applied to enums with no cases (#162 ; thanks @jpsim, #164). - Fixed: Address a
@CasePathable
regression that broke the macro when applied to enums with comments on cases without associated values (thanks @twocentstudios, #163). - Fixed: Support swift-syntax from 600.0.0-latest (#165).
New Contributors
- @twocentstudios made their first contribution in #163
- @jpsim made their first contribution in #164
Full Changelog: 1.4.1...1.4.2
1.4.1
What's Changed
- Fixed: New macro code introduced in 1.4.0 could cause a regression in compilation for
@CasePathable
enums with trailing comments. This has been fixed (#160).
Full Changelog: 1.4.0...1.4.1
1.4.0
What's Changed
-
Added: A
@CasePathable
instance can now be used to look up its associated case path (#158).@CasePathable enum Foo { case bar(Int) case baz(String) } let baz = Foo.baz("Blob") let bazCase = Foo.allCasePaths[baz] // PartialCaseKeyPath<Foo> baz.is(bazCase) // true
-
Added: A
@CasePathable
enum can now iterate over all of its case key paths (#159).@CasePathable enum Foo { case bar(Int) case baz(String) } let baz = Foo.baz("Blob") for casePath in Foo.allCasePaths { print(baz.is(casePath)) } // false // true let casePaths = Array(Foo.allCasePaths) // [PartialCaseKeyPath<Foo>] casePaths == [\.bar, \.baz] // true
-
Infrastructure: Strict concurrency has been enabled in preparation for Swift 6 (#156).
Full Changelog: 1.3.3...1.4.0
1.3.3
What's Changed
- Fixed: Addressed an issue in which
optionalValue.is(\Wrapped.Cases.case)
would returntrue
for non-matching cases due to an optional promotion bug (#157).
Full Changelog: 1.3.2...1.3.3
1.3.2
What's Changed
- Fixed: Leading, unindented comments to an enum case should no longer break a
@CasePathable
enum (thanks @djangovanderheijden, #154).
New Contributors
- @djangovanderheijden made their first contribution in #154
Full Changelog: 1.3.1...1.3.2
1.3.1
What's Changed
- Fixed: Macro overloaded case diagnostics are now displayed in Xcode at the expected source (#152).
- Fixed:
\.never
case path autocomplete now shows a warning on non-@CasePathable
enums to help call out that enums are expected to be case-pathable for their cases to be accessible via key path syntax (#153). - Fixed:
@CasePathable
now preserves documentation for each generated case path (#153).
Full Changelog: 1.3.0...1.3.1
1.3.0
What's Changed
- Added: Allow writability when chaining into a dynamic case (#150).
- Fixed: Bump swift-syntax to allow targeting 5.10.0 (#151).
Full Changelog: 1.2.4...1.3.0
1.2.4
What's Changed
- Fixed:
@CasePathable
can now be applied to enums inpublic
extensions (#149). - Fixed:
@CasePathable
can now be applied to enums with@available
annotations (#149).
Full Changelog: 1.2.3...1.2.4