Skip to content

Commit a9ea136

Browse files
committed
[nop] Maintain new type id info
1 parent d415a2b commit a9ea136

File tree

1 file changed

+22
-15
lines changed

1 file changed

+22
-15
lines changed

src/taoensso/nippy/impl.clj

+22-15
Original file line numberDiff line numberDiff line change
@@ -157,19 +157,27 @@
157157
(set! *print-length* nil)
158158
(vec (sort (keys taoensso.nippy/public-types-spec)))
159159

160-
;; To help support release targeting, we keep track of when new type ids are added
160+
;; To help support release targeting, we track new type ids added over time
161161
(let [id-history ; {<release> #{type-ids}}
162-
{340 ; v3.4.0 (2024-04-30), added 2
163-
;; New: map-entry meta-protocol-key
162+
{350 ; v3.5.0 (YYYY-MM-DD), added 5x
163+
;; #{string-array-lg long-array-lg int-array-lg double-array-lg float-array-lg}
164+
#{0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
165+
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
166+
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
167+
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
168+
105 106 107 108 109 110 111 112 113 114 115 116 117}
169+
170+
340 ; v3.4.0 (2024-04-30), added 2x
171+
;; #{map-entry meta-protocol-key}
164172
#{0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
165173
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
166174
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
167175
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
168176
105 106 110 111 112 113 114 115}
169177

170-
330 ; v3.3.0 (2023-10-11), added 11
171-
;; New: long-pos-sm long-pos-md long-pos-lg long-neg-sm long-neg-md long-neg-lg
172-
;; str-sm* vec-sm* set-sm* map-sm* sql-date
178+
330 ; v3.3.0 (2023-10-11), added 11x
179+
;; #{long-pos-sm long-pos-md long-pos-lg long-neg-sm long-neg-md long-neg-lg
180+
;; str-sm* vec-sm* set-sm* map-sm* sql-date}
173181
#{0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
174182
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
175183
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
@@ -182,8 +190,8 @@
182190
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
183191
81 82 83 84 85 86 90 91 100 101 102 105 106 110 111 112 113 114 115}
184192

185-
313 ; v3.1.3 (2022-06-23), added 5
186-
;; New: time-instant time-duration time-period kw-md sym-md
193+
313 ; v3.1.3 (2022-06-23), added 5x
194+
;; #{time-instant time-duration time-period kw-md sym-md}
187195
#{0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
188196
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
189197
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
@@ -193,16 +201,15 @@
193201
#{0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
194202
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
195203
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80
196-
81 82 90 91 100 101 102 105 106 110 111 112 113 114 115}}]
204+
81 82 90 91 100 101 102 105 106 110 111 112 113 114 115}}
197205

198-
(defn diff [new-release old-release]
199-
(vec (sort (clojure.set/difference (id-history new-release) (id-history old-release))))))
206+
diff
207+
(fn [new-release old-release]
208+
(vec (sort (clojure.set/difference (id-history new-release) (id-history old-release)))))]
200209

201-
(diff 340 330))
210+
(diff 350 340)))
202211

203-
(let [;; Initially target compatibility with v3.2.0 (2020-07-18)
204-
;; Next release will target v3.4.0 (2024-04-30), etc.
205-
target-release
212+
(let [target-release
206213
(enc/get-env {:as :edn, :default 320}
207214
:taoensso.nippy.target-release)
208215

0 commit comments

Comments
 (0)