Commit 6d83d3c
muninkit: remove Sourcery, promote hand-written Equatable
Swift 6.3's Equatable synthesis covers every AutoEquatable conformer
that doesn't need ulp-tolerant Double comparison or explicit field
exclusion. Drop Sourcery, its templates, the Autogenerated/ dir, and
the AutoEquatable / Diffable marker protocols — the stencil had no
exclusion mechanism anyway, and the last two commits (§14 self-heal
and §15 jpegCompression fingerprint) both hand-edited the generated
file. Stop pretending it's generated.
Hand-written Equatable stays for the three types that actually need
it, now living in Sources/MuninKit/Equality.swift:
- Photo: deliberately excludes modifiedDate/fileSize (cache keys) and
next/previous (derived navigation), deliberately includes sourceHash
and encodingFingerprint. Same semantics as before — PhotoEqualityTests
locks every exclusion.
- GPS, LocationDegree: use `==~` (ulp-tolerant) for their Double
fields because EXIF reads can drift bitwise on a photo whose bytes
are otherwise unchanged.
Album, Keyword, LocationData, Parent, ScaledPhoto get synthesized
member-by-member `==` via their declared Hashable / Equatable
conformance. The stencil used to emit a field-by-field guard chain —
semantically identical to synthesis.
Also drops `make generate`, the `sourcery` Brewfile entry, the
`exclude: ["Templates"]` hack on the MuninKit target, and FUTURES.md
§7.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 56c23ad commit 6d83d3c
15 files changed
Lines changed: 117 additions & 339 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
| 109 | + | |
130 | 110 | | |
131 | 111 | | |
132 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 7 | | |
12 | 8 | | |
13 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
| 74 | + | |
76 | 75 | | |
77 | 76 | | |
78 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments