Uh oh!
There was an error while loading. Please reload this page.
Implement Arbitrary for Certificate - #761
Conversation
tarcieri
commented
Nov 15, 2022
As a gut reaction, this is a surprisingly invasive change |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
tarcieri
commented
Dec 15, 2022
@stormshield-guillaumed you can bump the clippy rustc version, although it might need some code changes |
stormshield-guillaumed
commented
Dec 16, 2022
After a quick check, the Also, I saw that the |
stormshield-guillaumed
commented
Dec 16, 2022
I checked and |
tarcieri
commented
Dec 16, 2022
FWIW we're looking at bumping MSRV to 1.65 in #797 |
tarcieri
commented
Dec 16, 2022
This bumps the |
| /// Nevertheless, this crate defines an `ANY` type as it remains a familiar | ||
| /// and useful concept which is still extensively used in things like | ||
| /// PKI-related RFCs. | ||
| #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] |
There was a problem hiding this comment.
| #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] | |
| #[cfg_attr( | |
| feature = "arbitrary", | |
| derive(arbitrary::Arbitrary), | |
| allow(clippy::integer_arithmetic) | |
| )] |
There was a problem hiding this comment.
I tried this and a few other places for the allow but none suppresses the warning. I don't know how to put attributes on derive generated code and adding the allow to the module seems a bit extreme (suppressing more than wanted).
There was a problem hiding this comment.
I guess the issue is it's annotating the struct and not the associated impl blocks.
You can add it at to the module if it's gated on feature = "arbitrary"
| /// backing data. | ||
| #[cfg(feature = "alloc")] | ||
| #[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] | ||
| #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] |
There was a problem hiding this comment.
| #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] | |
| #[cfg_attr( | |
| feature = "arbitrary", | |
| derive(arbitrary::Arbitrary), | |
| allow(clippy::integer_arithmetic) | |
| )] |
stormshield-guillaumed
commented
Dec 19, 2022
The only remaining errors are on the minimal version check, but I already specify |
tarcieri
commented
Dec 19, 2022
It looks like a bug in This needs to be fixed on the
|
tarcieri
commented
Dec 19, 2022
I opened an issue on If you'd like to get the build passing now you can temporarily disable the check in the crates that are failing, although I'd ask you do that in a separate PR/commit so it's easy to revert when the issue does get fixed. |
tarcieri
commented
Dec 20, 2022
@stormshield-guillaumed can you either PR b4ac2a6 separately or squash all of the commits down to two, one which adds the |
tarcieri
commented
Dec 22, 2022
Thanks! |
Backport release which includes changes from #761, which add optional support for the `arbitrary` crate as a feature
Add an optional dependency on the arbitrary crate to implement Arbitrary for Certificate. This allows to generate arbitrary certificates for fuzzing.