Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
radicle: fix schemars macro on FetchPackSizeLimit
Merged fintohaps opened 9 months ago

While running cargo-semver-checks, there was an issue that was surfaced regarding serde(into), serde(try_from) and schemars(transparent) being used, and they are incompatible.

This appeared to be a semver issue, on the side of schemars, since the issue would only appear when adding radicle as a fresh dependency. The intuition for this is that once schemars was updated locally, the same error appeared when attempting to build the radicle crate.

To avoid this, schemars provides a ! operator for the macro1:

You can also “unset” serde attributes by including them with a ! prefix in a schemars attribute, which will make schemars ignore the corresponding serde attribute item

1

https://docs.rs/schemars_derive/latest/schemars_derive/derive.JsonSchema.html#attributes

fintohaps opened with revision c2c0243f on base 4e429e44 +13 -9 9 months ago

While running cargo-semver-checks, there was an issue that was surfaced regarding serde(into), serde(try_from) and schemars(transparent) being used, and they are incompatible.

This appeared to be a semver issue, on the side of schemars, since the issue would only appear when adding radicle as a fresh dependency. The intuition for this is that once schemars was updated locally, the same error appeared when attempting to build the radicle crate.

To avoid this, schemars provides a ! operator for the macro1:

You can also “unset” serde attributes by including them with a ! prefix in a schemars attribute, which will make schemars ignore the corresponding serde attribute item

1

https://docs.rs/schemars_derive/latest/schemars_derive/derive.JsonSchema.html#attributes

lorenz merged revision c2c0243f at fe6a11d0 9 months ago