Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jul 18, 2022

Bumps serde_with from 1.14.0 to 2.0.0.

Release notes

Sourced from serde_with's releases.

serde_with_macros v2.0.0

No changes compared to v2.0.0-rc.0.

Changed

  • Make #[serde_as] behave more intuitive on Option<T> fields.

    The #[serde_as] macro now detects if a #[serde_as(as = "Option<S>")] is used on a field of type Option<T> and applies #[serde(default)] to the field. This restores the ability to deserialize with missing fields and fixes a common annoyance (#183, #185, #311, #417). This is a breaking change, since now deserialization will pass where it did not before and this might be undesired.

    The Option field and transformation are detected by directly matching on the type name. These variants are detected as Option.

    • Option
    • std::option::Option, with or without leading ::
    • core::option::Option, with or without leading ::

    If an existing default attribute is detected, the attribute is not applied again. This behavior can be supressed by using #[serde_as(no_default)] or #[serde_as(as = "Option<S>", no_default)].

Fixed

  • Make the documentation clearer by stating that the #[serde_as] and #[skip_serializing_none] attributes must always be placed before #[derive].

serde_with v2.0.0

Added

  • Make JsonString<T> smarter by allowing nesting serde_as definitions. This allows applying custom serialization logic, before the value gets converted into a JSON string.

    // Rust
    #[serde_as(as = "JsonString<Vec<(JsonString, _)>>")]
    value: BTreeMap<[u8; 2], u32>,
    // JSON
    {"value":"[[&quot;[1,2]&quot;,3],[&quot;[4,5]&quot;,6]]"}

Changed

  • Make #[serde_as] behave more intuitive on Option<T> fields.

    The #[serde_as] macro now detects if a #[serde_as(as = "Option<S>")] is used on a field of type Option<T> and applies #[serde(default)] to the field. This restores the ability to deserialize with missing fields and fixes a common annoyance (#183, #185, #311, #417). This is a breaking change, since now deserialization will pass where it did not before and this might be undesired.

    The Option field and transformation are detected by directly matching on the type name. These variants are detected as Option.

    • Option

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [serde_with](https://github.com/jonasbb/serde_with) from 1.14.0 to 2.0.0.
- [Release notes](https://github.com/jonasbb/serde_with/releases)
- [Commits](jonasbb/serde_with@v1.14.0...v2.0.0)

---
updated-dependencies:
- dependency-name: serde_with
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jul 18, 2022
@ahl ahl merged commit 17485e8 into main Jul 18, 2022
@ahl ahl deleted the dependabot/cargo/serde_with-2.0.0 branch July 18, 2022 05:17
leftwo pushed a commit that referenced this pull request Sep 18, 2024
Crucible changes:
    Make crutest use BlockIO trait instead of a Guest (#1452)
    Use new syncfs syscall (#1427)
    Increment write backpressure before deferred encryption (#1444)
    Use RAII handles for backpressure (#1443)
    Fine-tuning backpressure clamping, and API cleanups (#1442)
    Fix outdated comment (#1447)
    Update Rust crate rusqlite to 0.32 (#1418)
    Fix write reordering bug (#1448)
    Remove `history_file` (#1446)
    Remove optionality for `BlockRes` in `DeferredWrite` (#1441)

Propolis changes
    instance spec rework: tighten up component naming (#761)
    instance spec rework: remove most dependencies on `InstanceSpecV0` from propolis-server (#757)
    fix new 1.81.0 warning and clippy error (#760)
    standalone: be more helpful with bad block device configs (#758)
leftwo added a commit that referenced this pull request Sep 18, 2024
Crucible changes:
    Make crutest use BlockIO trait instead of a Guest (#1452)
    Use new syncfs syscall (#1427)
    Increment write backpressure before deferred encryption (#1444)
    Use RAII handles for backpressure (#1443)
    Fine-tuning backpressure clamping, and API cleanups (#1442)
    Fix outdated comment (#1447)
    Update Rust crate rusqlite to 0.32 (#1418)
    Fix write reordering bug (#1448)
    Remove `history_file` (#1446)
    Remove optionality for `BlockRes` in `DeferredWrite` (#1441)

Propolis changes
    instance spec rework: tighten up component naming (#761)
instance spec rework: remove most dependencies on `InstanceSpecV0` from
propolis-server (#757)
    fix new 1.81.0 warning and clippy error (#760)
    standalone: be more helpful with bad block device configs (#758)

Co-authored-by: Alan Hanson <alan@oxide.computer>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants