bolero
bolero copied to clipboard
Detangling Driver and DriverMode
So, continuing the discussion started on https://github.com/camshaft/bolero/pull/108#discussion_r1083565909 ; let's chat about driver and driver mode here.
I guess my first question would be, is there any user-facing use case for something other than (DriverMode::Forced, Driver::Rng)
(for proptesting) and (DriverMode::Direct, Driver::ByteSlice)
(for fuzzers)? And is there a non-user-facing use case for anything other than (DriverMode::Forced, Driver::ByteSlice)
, that's I guess used for input shrinking when proptesting?
In particular, do you know why DirectRng
is being exposed?
Also, writing down my current plan for changes of *Generator
while I have it in mind: instead of fn(Driver) -> Generated
, have it be fn(Driver, DriverMode, depth: usize) -> Generated
. Use the depth to generate smaller collections when going deeper in Forced
mode, and to refuse generating too deep data structures like arbitrary
in Direct
mode.