You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If i do #[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] as needed the compiler complains:
error[E0277]: the trait bound `orchard::shielded_data::_::InternalBitFlags: Deserialize<'_>` is not satisfied
--> zebra-chain/src/orchard/shielded_data.rs:211:1
|
211 | / bitflags! {
212 | | /// Per-Transaction flags for Orchard.
213 | | ///
214 | | /// The spend and output flags are passed to the `Halo2Proof` verifier, which verifies
... |
234 | | }
235 | | }
| |_^ the trait `Deserialize<'_>` is not implemented for `orchard::shielded_data::_::InternalBitFlags`
|
= help: the following other types implement trait `Deserialize<'de>`:
&'a Path
&'a [u8]
&'a str
()
(T0, T1)
(T0, T1, T2)
(T0, T1, T2, T3)
(T0, T1, T2, T3, T4)
and 286 others
= note: this error originates in the macro `__declare_public_bitflags` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)
Another thing that worries me is that according to comments above it seems the formatting changed at serialization/deserialization ? This could be a big issue for us as we need to keep the same format as it was before.
It seems that could get resolved by the use of #[repr(transparent)], #[serde(transparent)]?
Thanks in advance.
The text was updated successfully, but these errors were encountered:
There are some fairly major changes in 2.0.0, we're working on improving the release notes to better reflect them in #310. The bitflags! macro no longer derives any traits that you can do so yourself, so that users get a chance to change the semantics of them.
The derived serialization format has changed, so if you want to maintain compatibility with the old format, I've put together a library that does it for you: https://github.com/KodrAus/bitflags-serde-legacy.
Hey, thank you for the hard work. I am having similar issues as described here. Maybe someone can help.
As it was explained there, it seems
Debug
is not derived automatically anymore in the new version, this ends up with a compiler error when building our projectThe flags code is here.
If i do
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
as needed the compiler complains:Another thing that worries me is that according to comments above it seems the formatting changed at serialization/deserialization ? This could be a big issue for us as we need to keep the same format as it was before.
It seems that could get resolved by the use of
#[repr(transparent)]
,#[serde(transparent)]
?Thanks in advance.
The text was updated successfully, but these errors were encountered: