diff --git a/Changelogs/0.17.1.md b/Changelogs/0.17.1.md new file mode 100644 index 00000000..ab61d20b --- /dev/null +++ b/Changelogs/0.17.1.md @@ -0,0 +1,18 @@ +# 0.17.1 + +A patch release on top of `0.17.0`. One fix, and it only affects `dump`. + +1. **Conditional conformances with more than one condition print valid Swift again.** The `where` clause ran its requirements together with no separator — `extension Box: Hashable where A: EquatableA: Hashable` instead of `where A: Equatable, A: Hashable`. A conformance with exactly one condition was never affected, and neither was `interface`, which renders the same clause through a different printer. + +The bug had been there since the conditional-conformance clause was first dumped (August 2025). It survived that long because this repository's own dump snapshot had frozen the malformed line as the expected output; the snapshot is corrected in the same commit and is now the regression test. + +## Compatibility + +- No API additions, removals or renames. No snapshot `formatVersion` change. +- Pinned dependencies are unchanged from `0.17.0`. +- The only output change is the one above: a comma and a space now separate each condition. + +## Requirements + +- Swift 6.2+ +- Xcode 26.0+ diff --git a/Sources/SwiftDump/Dumper/ProtocolConformanceDumper.swift b/Sources/SwiftDump/Dumper/ProtocolConformanceDumper.swift index 0f2c8dc5..2128dce9 100644 --- a/Sources/SwiftDump/Dumper/ProtocolConformanceDumper.swift +++ b/Sources/SwiftDump/Dumper/ProtocolConformanceDumper.swift @@ -48,8 +48,12 @@ package struct ProtocolConformanceDumper: Conforme Space() } - for conditionalRequirement in dumped.conditionalRequirements { + for (offset, conditionalRequirement) in dumped.conditionalRequirements.offsetEnumerated() { try await conditionalRequirement.dump(resolver: demangleResolver, in: machO) + if !offset.isEnd { + Standard(",") + Space() + } } } } diff --git a/Sources/swift-section/Version.swift b/Sources/swift-section/Version.swift index 3fd37350..9b812f0a 100644 --- a/Sources/swift-section/Version.swift +++ b/Sources/swift-section/Version.swift @@ -2,5 +2,5 @@ // When bumping: also add Changelogs/.md, then tag the release with the same string. // Verified by .github/workflows/version-check.yml (PR) and .github/workflows/release.yml (tag). enum BundledVersion { - static let value = "0.17.0" + static let value = "0.17.1" } diff --git a/Tests/SwiftDumpTests/Snapshots/__Snapshots__/SymbolTestsCoreDumpSnapshotTests/conditionalConformanceVariantsSnapshot.1.txt b/Tests/SwiftDumpTests/Snapshots/__Snapshots__/SymbolTestsCoreDumpSnapshotTests/conditionalConformanceVariantsSnapshot.1.txt index 98aeff14..ac930a0c 100644 --- a/Tests/SwiftDumpTests/Snapshots/__Snapshots__/SymbolTestsCoreDumpSnapshotTests/conditionalConformanceVariantsSnapshot.1.txt +++ b/Tests/SwiftDumpTests/Snapshots/__Snapshots__/SymbolTestsCoreDumpSnapshotTests/conditionalConformanceVariantsSnapshot.1.txt @@ -47,5 +47,5 @@ extension SymbolTestsCore.ConditionalConformanceVariants.ConditionalContainerTes method descriptor for static Swift.Comparable.> infix(A, A) -> Swift.Bool } extension SymbolTestsCore.ConditionalConformanceVariants.ConditionalContainerTest: SymbolTestsCore.ConditionalConformanceVariants.ConditionalFirstProtocol where A: SymbolTestsCore.ConditionalConformanceVariants.ConditionalFirstProtocol {} -extension SymbolTestsCore.ConditionalConformanceVariants.ConditionalContainerTest: SymbolTestsCore.ConditionalConformanceVariants.ConditionalSecondProtocol where A: SymbolTestsCore.ConditionalConformanceVariants.ConditionalFirstProtocolA: SymbolTestsCore.ConditionalConformanceVariants.ConditionalSecondProtocol {} -extension SymbolTestsCore.ConditionalConformanceVariants.ConditionalContainerTest: SymbolTestsCore.ConditionalConformanceVariants.ConditionalThirdProtocol where A: SymbolTestsCore.ConditionalConformanceVariants.ConditionalFirstProtocolA: SymbolTestsCore.ConditionalConformanceVariants.ConditionalSecondProtocolA: SymbolTestsCore.ConditionalConformanceVariants.ConditionalThirdProtocol {} \ No newline at end of file +extension SymbolTestsCore.ConditionalConformanceVariants.ConditionalContainerTest: SymbolTestsCore.ConditionalConformanceVariants.ConditionalSecondProtocol where A: SymbolTestsCore.ConditionalConformanceVariants.ConditionalFirstProtocol, A: SymbolTestsCore.ConditionalConformanceVariants.ConditionalSecondProtocol {} +extension SymbolTestsCore.ConditionalConformanceVariants.ConditionalContainerTest: SymbolTestsCore.ConditionalConformanceVariants.ConditionalThirdProtocol where A: SymbolTestsCore.ConditionalConformanceVariants.ConditionalFirstProtocol, A: SymbolTestsCore.ConditionalConformanceVariants.ConditionalSecondProtocol, A: SymbolTestsCore.ConditionalConformanceVariants.ConditionalThirdProtocol {} \ No newline at end of file