Debian Codegraph @

third_party/rust/arbitrary/CHANGELOG.md

raw
1 ## Unreleased
2
3 Released YYYY-MM-DD.
4
5 ### Added
6
7 * TODO (or remove section if none)
8
9 ### Changed
10
11 * TODO (or remove section if none)
12
13 ### Deprecated
14
15 * TODO (or remove section if none)
16
17 ### Removed
18
19 * TODO (or remove section if none)
20
21 ### Fixed
22
23 * TODO (or remove section if none)
24
25 ### Security
26
27 * TODO (or remove section if none)
28
29 --------------------------------------------------------------------------------
30
31 ## 1.3.2
32
33 Released 2023-10-30.
34
35 ### Added
36
37 * Added `Arbitrary` implementations for `Arc<[T]>` and
38 `Rc<[T]>`. [#160](https://github.com/rust-fuzz/arbitrary/pull/160)
39
40 --------------------------------------------------------------------------------
41
42 ## 1.3.1
43
44 Released 2023-10-11.
45
46 ### Fixed
47
48 * Fixed an issue with generating collections of collections in
49 `arbitrary_take_rest` where `<Vec<Vec<u8>>>::arbitrary_take_rest` would never
50 generate `vec![vec![]]` for example. See
51 [#159](https://github.com/rust-fuzz/arbitrary/pull/159) for details.
52
53 --------------------------------------------------------------------------------
54
55 ## 1.3.0
56
57 Released 2023-03-13.
58
59 ### Added
60
61 * Added the ability to manually specify derived trait bounds for
62 `Arbitrary`. See [#138](https://github.com/rust-fuzz/arbitrary/pull/138) for
63 details.
64
65 ### Fixed
66
67 * Fixed minimal versions correctness for `syn`.
68
69 --------------------------------------------------------------------------------
70
71 ## 1.2.3
72
73 Released 2023-01-20.
74
75 ### Fixed
76
77 * The `derive(Arbitrary)` will now annotate the generated `impl`s with a `#[automatically_derived]`
78 attribute to indicate to e.g. clippy that lints should not fire for the code within the derived
79 implementation.
80
81 ## 1.2.2
82
83 Released 2023-01-03.
84
85 ### Fixed
86
87 * Ensured that `arbitrary` and `derive_arbitrary` versions are synced up so that
88 they don't, e.g., emit generated code that depends on newer versions of
89 `arbitrary` than the one currently in
90 use. [#134](https://github.com/rust-fuzz/arbitrary/issues/134)
91
92 ## 1.2.1
93
94 ### Fixed
95
96 * Fixed an issue where `std::thread_local!` macro invocations in derive code
97 were not fully prefixed, causing confusing build errors in certain situations.
98
99 ## 1.2.0
100
101 Released 2022-10-20.
102
103 ### Added
104
105 * Support custom arbitrary implementation for fields on
106 derive. [#129](https://github.com/rust-fuzz/arbitrary/pull/129)
107
108 --------------------------------------------------------------------------------
109
110 ## 1.1.6
111
112 Released 2022-09-20.
113
114 ### Fixed
115
116 * Fixed a potential panic due to an off-by-one error in the `Arbitrary`
117 implementation for `std::ops::Bound<T>`.
118
119 --------------------------------------------------------------------------------
120
121 ## 1.1.5
122
123 Released 2022-09-08.
124
125 ### Added
126
127 * Implemented `Arbitrary` for `std::ops::Bound<T>`.
128
129 ### Fixed
130
131 * Fixed a bug where `Unstructured::int_in_range` could return out-of-range
132 integers when generating arbitrary signed integers.
133
134 --------------------------------------------------------------------------------
135
136 ## 1.1.4
137
138 Released 2022-08-29.
139
140 ### Added
141
142 * Implemented `Arbitrary` for `Rc<str>` and `Arc<str>`
143
144 ### Changed
145
146 * Allow overriding the error type in `arbitrary::Result`
147 * The `Unstructured::arbitrary_loop` method will consume fewer bytes of input
148 now.
149
150 ### Fixed
151
152 * Fixed a bug where `Unstructured::int_in_range` could return out-of-range
153 integers.
154
155 --------------------------------------------------------------------------------
156
157 ## 1.1.3
158
159 Released 2022-06-23.
160
161 ### Fixed
162
163 * Fixed some potential (but highly unlikely) name-clashes inside
164 `derive(Arbitrary)`'s generated
165 code. [#111](https://github.com/rust-fuzz/arbitrary/pull/111)
166 * Fixed an edge case where `derive(Arbitrary)` for recursive types that detected
167 an overflow would not reset the overflow
168 detection. [#111](https://github.com/rust-fuzz/arbitrary/pull/111)
169
170 --------------------------------------------------------------------------------
171
172 ## 1.1.2
173
174 Released 2022-06-16.
175
176 ### Fixed
177
178 * Fixed a warning inside `derive(Arbitrary)`-generated
179 code. [#110](https://github.com/rust-fuzz/arbitrary/pull/110)
180
181 --------------------------------------------------------------------------------
182
183 ## 1.1.1
184
185 Released 2022-06-14.
186
187 ### Fixed
188
189 * Fixed a stack overflow when using `derive(Arbitrary)` with recursive types and
190 empty inputs. [#109](https://github.com/rust-fuzz/arbitrary/pull/109)
191
192 --------------------------------------------------------------------------------
193
194 ## 1.1.0
195
196 Released 2022-02-09.
197
198 ### Added
199
200 * Added the `Unstructured::ratio` method to generate a boolean that is `true` at
201 the given rate.
202
203 * Added the `Unstructured::arbitrary_loop` method to call a function an
204 arbitrary number of times.
205
206 --------------------------------------------------------------------------------
207
208 ## 1.0.3
209
210 Released 2021-11-20.
211
212 ### Fixed
213
214 * Fixed documentation for `Unstructured::fill_bytes`. We forgot to update this
215 way back in [#53](https://github.com/rust-fuzz/arbitrary/pull/53) when the
216 behavior changed.
217
218 --------------------------------------------------------------------------------
219
220 ## 1.0.2
221
222 Released 2021-08-25.
223
224 ### Added
225
226 * `Arbitrary` impls for `HashMap`s and `HashSet`s with custom `Hasher`s
227 [#87](https://github.com/rust-fuzz/arbitrary/pull/87)
228
229 --------------------------------------------------------------------------------
230
231 ## 1.0.1
232
233 Released 2021-05-20.
234
235 ### Added
236
237 * `Arbitrary` impls for `NonZeroX` types [#79](https://github.com/rust-fuzz/arbitrary/pull/79)
238 * `Arbitrary` impls for all arrays using const generics [#55](https://github.com/rust-fuzz/arbitrary/pull/55)
239 * `Arbitrary` impls for `Ipv4Addr` and `Ipv6Addr` [#84](https://github.com/rust-fuzz/arbitrary/pull/84)
240
241 ### Fixed
242
243 * Use fewer bytes for `Unstructured::int_in_range()` [#80](https://github.com/rust-fuzz/arbitrary/pull/80)
244 * Use correct range for `char` generation [#83](https://github.com/rust-fuzz/arbitrary/pull/83)
245
246 --------------------------------------------------------------------------------
247
248 ## 1.0.0
249
250 Released 2020-02-24.
251
252 See 1.0.0-rc1 and 1.0.0-rc2 for changes since 0.4.7, which was the last main
253 line release.
254
255 --------------------------------------------------------------------------------
256
257 ## 1.0.0-rc2
258
259 Released 2021-02-09.
260
261 ### Added
262
263 * The `Arbitrary` trait is now implemented for `&[u8]`. [#67](https://github.com/rust-fuzz/arbitrary/pull/67)
264
265 ### Changed
266
267 * Rename `Unstructured#get_bytes` to `Unstructured#bytes`. [#70](https://github.com/rust-fuzz/arbitrary/pull/70)
268 * Passing an empty slice of choices to `Unstructured#choose` returns an error. Previously it would panic. [71](https://github.com/rust-fuzz/arbitrary/pull/71)
269
270 --------------------------------------------------------------------------------
271
272 ## 1.0.0-rc1
273
274 Released 2020-11-25.
275
276 ### Added
277
278 * The `Arbitrary` trait is now implemented for `&str`. [#63](https://github.com/rust-fuzz/arbitrary/pull/63)
279
280 ### Changed
281
282 * The `Arbitrary` trait now has a lifetime parameter, allowing `Arbitrary` implementations that borrow from the raw input (e.g. the new `&str` implementaton). The `derive(Arbitrary)` macro also supports deriving `Arbitrary` on types with lifetimes now. [#63](https://github.com/rust-fuzz/arbitrary/pull/63)
283
284 ### Removed
285
286 * The `shrink` method on the `Arbitrary` trait has been removed.
287
288 We have found that, in practice, using [internal reduction](https://drmaciver.github.io/papers/reduction-via-generation-preview.pdf) via approaches like `cargo fuzz tmin`, where the raw input bytes are reduced rather than the `T: Arbitrary` type constructed from those raw bytes, has the best efficiency-to-maintenance ratio. To the best of our knowledge, no one is relying on or using the `Arbitrary::shrink` method. If you *are* using and relying on the `Arbitrary::shrink` method, please reach out by [dropping a comment here](https://github.com/rust-fuzz/arbitrary/issues/62) and explaining how you're using it and what your use case is. We'll figure out what the best solution is, including potentially adding shrinking functionality back to the `arbitrary` crate.
289
290 --------------------------------------------------------------------------------
291
292 ## 0.4.7
293
294 Released 2020-10-14.
295
296 ### Added
297
298 * Added an optimization to avoid unnecessarily consuming bytes from the
299 underlying data when there is only one possible choice in
300 `Unstructured::{int_in_range, choose, etc..}`.
301
302 * Added license files to the derive crate.
303
304 ### Changed
305
306 * The `Arbitrary` implementation for `std::time::Duration` should now be faster
307 and produce durations with a more-uniform distribution of nanoseconds.
308
309 --------------------------------------------------------------------------------
310
311 ## 0.4.6
312
313 Released 2020-08-22.
314
315 ### Added
316
317 * Added the `Unstructured::peek_bytes` method.
318
319 ### Changed
320
321 * Test case reduction via `cargo fuzz tmin` should be much more effective at
322 reducing the sizes of collections now. (See
323 [#53](https://github.com/rust-fuzz/arbitrary/pull/53) and the commit messages
324 for details.)
325
326 * Fuzzing with mutation-based fuzzers (like libFuzzer) should be more efficient
327 now. (See [#53](https://github.com/rust-fuzz/arbitrary/pull/53) and the commit
328 messages for details)
329
330 --------------------------------------------------------------------------------
331
332 ## 0.4.5
333
334 Released 2020-06-18.
335
336 ### Added
337
338 * Implement `Arbitrary` for zero length arrays.
339 * Implement `Arbitrary` for `Range` and `RangeInclusive`.
340
341 --------------------------------------------------------------------------------
342
343 ## 0.4.4
344
345 Released 2020-04-29.
346
347 ### Fixed
348
349 * Fixed the custom derive for enums when used via its full path (like
350 `#[derive(arbitrary::Arbitrary)]` rather than like `#[derive(Arbitrary)]`).
351
352
353 ## 0.4.3
354
355 Released 2020-04-28.
356
357 ### Fixed
358
359 * Fixed the custom derive when used via its full path (like
360 `#[derive(arbitrary::Arbitrary)]` rather than like `#[derive(Arbitrary)]`).
361
362 --------------------------------------------------------------------------------
363
364 ## 0.4.2
365
366 Released 2020-04-17.
367
368 ### Changed
369
370 * We forgot to release a new version of the `derive_arbitrary` crate last
371 release. This release fixes that and so the `synstructure` dependency is
372 finally actually removed in the cargo releases.
373
374 --------------------------------------------------------------------------------
375
376 ## 0.4.1
377
378 Released 2020-03-18.
379
380 ### Removed
381
382 * Removed an internal dependency on the `synstructure` crate when the `derive`
383 feature is enabled. This should not have any visible downstream effects other
384 than faster build times!
385
386 --------------------------------------------------------------------------------
387
388 ## 0.4.0
389
390 Released 2020-01-22.
391
392 This is technically a breaking change, but we expect that nearly everyone should
393 be able to upgrade without any compilation errors. The only exception is if you
394 were implementing the `Arbitrary::size_hint` method by hand. If so, see the
395 "changed" section below and the [API docs for
396 `Arbitrary::shrink`](https://docs.rs/arbitrary/0.4.0/arbitrary/trait.Arbitrary.html#method.size_hint)
397 for details.
398
399 ### Added
400
401 * Added [the `arbitary::size_hint::recursion_guard` helper
402 function][recursion_guard] for guarding against infinite recursion in
403 `size_hint` implementations for recursive types.
404
405 ### Changed
406
407 * The `Arbitrary::size_hint` signature now takes a `depth: usize`
408 parameter. This should be passed along unmodified to any nested calls of other
409 `size_hint` methods. If you're implementing `size_hint` for a recursive type
410 (like a linked list or tree) or a generic type with type parameters, you
411 should use [the new `arbitrary::size_hint::recursion_guard` helper
412 function][recursion_guard].
413
414 ### Fixed
415
416 * Fixed infinite recursion in generated `size_hint` implementations
417 from `#[derive(Arbitrary)]` for recursive types.
418
419 [recursion_guard]: https://docs.rs/arbitrary/0.4.0/arbitrary/size_hint/fn.recursion_guard.html
420
421 --------------------------------------------------------------------------------
422
423 ## 0.3.2
424
425 Released 2020-01-16.
426
427 ### Changed
428
429 * Updated the custom derive's dependencies.
430
431 --------------------------------------------------------------------------------
432
433 ## 0.3.2
434
435 Released 2020-01-15.
436
437 ### Fixed
438
439 * Fixed an over-eager assertion condition in `Unstructured::int_in_range` that
440 would incorrectly trigger when given valid ranges of length one.
441
442 --------------------------------------------------------------------------------
443
444 ## 0.3.1
445
446 Released 2020-01-14.
447
448 ### Fixed
449
450 * Fixed some links and version numbers in README.
451
452 --------------------------------------------------------------------------------
453
454 ## 0.3.0
455
456 Released 2020-01-14.
457
458 ### Added
459
460 * Added the `"derive"` cargo feature, to enable `#[derive(Arbitrary)]` for
461 custom types. Enabling this feature re-exports functionality from the
462 `derive_arbitrary` crate.
463 * The custom derive for `Arbitrary` implements the shrink method for you now.
464 * All implementations of `Arbitrary` for `std` types implement shrinking now.
465 * Added the `Arbitrary::arbitrary_take_rest` method allows an `Arbitrary`
466 implementation to consume all of the rest of the remaining raw input. It has a
467 default implementation that forwards to `Arbitrary::arbitrary` and the custom
468 derive creates a smart implementation for your custom types.
469 * Added the `Arbitrary::size_hint` method for hinting how many raw bytes an
470 implementation needs to construct itself. This has a default implementation,
471 but the custom derive creates a smart implementation for your custom types.
472 * Added the `Unstructured::choose` method to choose one thing among a set of
473 choices.
474 * Added the `Unstructured::arbitrary_len` method to get an arbitrary length for
475 a collection of some arbitrary type.
476 * Added the `Unstructured::arbitrary_iter` method to create an iterator of
477 arbitrary instance of some type.
478
479 ### Changed
480
481 * The `Arbitrary` trait was simplified a bit.
482 * `Unstructured` is a concrete type now, not a trait.
483 * Switched to Rust 2018 edition.
484
485 ### Removed
486
487 * `RingBuffer` and `FiniteBuffer` are removed. Use `Unstructured` instead.
488
489 ### Fixed
490
491 * Better `Arbitrary` implementation for `char`.
492 * Better `Arbitrary` implementation for `String`.
493
494 --------------------------------------------------------------------------------
495
496 ## 0.2.0
497
498 --------------------------------------------------------------------------------
499
500 ## 0.1.0