-
Notifications
You must be signed in to change notification settings - Fork 264
Add Arbitrary Trait To RecordBuilder #531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is an optional dependency, enabled with cargo flag `--feature arbitrary,std` that allows for fuzzing of loggers with much less boilerplate than was previously required.
Personally I don't think the log crate should add any dependencies, even optional ones. The implementation seems pretty small, so it can be easily implemented outside of the crate. |
Thanks @Thomasdezeeuw for the feedback. Implementing outside of the crate is certainly possible. I was hoping to avoid the extra boilerplate stemming from the orphan rules. If I split into a separate crate I can't derive |
I'm another engineer in Android who reviewed Gil's patch to Android. I suggested trying to upstream it, so I'm curious to hear the reasoning for not taking the patch. Would you care to elaborate? As I'm sure you know, it would be similar to how many crates have a You're right that the code in question is small, the |
The reason is that the
We could add the code as an example. |
I agree that lots of crates depend on |
Bumps [cargo-bins/release-pr](https://github.com/cargo-bins/release-pr) from 1 to 2. - [Release notes](https://github.com/cargo-bins/release-pr/releases) - [Commits](cargo-bins/release-pr@v1...v2) --- updated-dependencies: - dependency-name: cargo-bins/release-pr dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This is an optional dependency, enabled with cargo flag
--feature arbitrary,std
that allows for fuzzing of loggers with much less boilerplate than was previously required.An example of usage would be
Note that if there is ever progress on a more flexible
format_args!
as described in rust-lang/rust#92698 (reference) then this could be simplified even further and we could provide anArbitrary
implementation ofRecord
itself.