chore(deps): update rust crate serde-saphyr to v2 #2413

Open
renovate wants to merge 1 commit from renovate/serde-saphyr-2.x into main
Collaborator

This PR contains the following updates:

Package Type Update Change
serde-saphyr workspace.dependencies major 1.0.0 → 2.0.0

Release Notes

bourumir-wyngs/serde-saphyr (serde-saphyr)

v2.0.0

Compare Source

YAML changes
  • Tags selecting unit enum variants now reject non-null payloads instead of silently
    discarding them (#​236). Use a bare variant name, a tag with empty content, or a
    tag followed by ~ or null; quoted strings and collections are rejected.
  • Composite mapping keys are not compared regardless of entry order (thanks @​yuxi-liu-wired) .
  • Commented now writes its output replacing characters not allowed in comments (non printable) by spaces.
Added
  • Added public path_map::PathKind, PathKey::segments(), and PathMap::locations_for()
    for inspecting validation paths and resolving their YAML use/definition locations,
    including best-effort spelling matches and recorded ancestor/root fallback.
  • Added RenderOptions::line_offset and RenderOptions::source_name for displaying
    embedded YAML diagnostics at their containing document's line numbers and naming
    the root source in snippet headers, including the new
    miette::to_miette_report_with_options entry point. Included files retain their own
    names and coordinates, and stored error locations and spans are unchanged.
  • Added PropertySyntax::DockerCompose for Compose-compatible property interpolation.
  • Added the default-enabled comments feature, forwarding to granit-parser's matching
    feature. Builds with default-features = false must enable it to use Commented<T>,
    CommentPosition, comment options, or comment budget fields and reports. Without it,
    YAML comments are still accepted and validated, but their text is not retained.
  • Added Options::non_finite_float_policy with NonFiniteFloatPolicy::{PassThrough, Reject, AsString}
    to configure non-finite floats delivered through deserialize_any. Explicit policies override
    the legacy boolean; leaving the field unconfigured preserves its behavior.
  • Added the borrowed_context example showing recursive Serialize adapters that borrow
    an existing value tree and per-call formatting context, composing with Tagged<T> and
    style wrappers without building a second container tree or using thread-local state.
  • Added SerializerOptions::no_lang_directive (default false) to suppress the
    %YAML 1.2 directive and its leading --- marker independently of yaml_12's quoting.
  • Added from_str_multiple, from_bytes_multiple, and their _with_options variants to
    deserialize multiple YAML documents into any C: Default + Extend<T>, including vectors,
    queues, sets, and custom accumulators. Values can borrow from the input string or UTF-8 byte
    slice. Explicit type arguments specify both the document and collection types, for example
    from_str_multiple::<String, Vec<_>>(input).
  • Added an error: Box<Error> field to Error::AliasError, which keeps the original error
    when an aliased value fails to deserialize. A custom MessageFormatter or Localizer
    now applies to that error, and std::error::Error::source returns it
    (#​199).
Changed
  • Breaking: from_multiple, from_multiple_with_options, from_slice_multiple, and
    from_slice_multiple_with_options now accept T: Deserialize<'de> so values can borrow from
    the input. They retain their names, single type parameter, and Vec<T> returns and are not
    deprecated. Ordinary calls, including from_multiple::<Config>(input) and generic callers
    with T: DeserializeOwned, continue to work. Function pointers or callbacks accepting arbitrary
    input lifetimes may need forwarding closures, such as |input| from_multiple::<String>(input).
  • Updated to granit-parser 2.0.0 and disabled its default features so comment support follows
    serde-saphyr's comments feature. Serialization-only builds remain independent of
    granit-parser, including when comment emission is enabled.
  • Non-finite floats remain rejected by default in deserialize_any, including overflowing
    literals such as 1e999. Opt into PassThrough to preserve them in float-capable visitors,
    untagged enums, and flattened float fields, or AsString to receive canonical strings.
    With PassThrough, serde_json::Value converts them to Null without an error.
    Direct f32/f64 deserialization is unchanged.
  • Breaking: Error::AliasError has a new mandatory error: Box<Error> field.
    Manual constructors must supply it, and patterns listing every field must add error or ...
    The variant name is unchanged. Rendering and source() use the original error; the
    deserializer still populates msg with an error.to_string() snapshot for existing handlers.
Deprecated
  • Deprecated Options::reject_non_finite_typeless_float in favor of non_finite_float_policy.
    When the new field is unconfigured, the boolean retains its original behavior: true
    (the default) rejects and false converts to strings. Use Reject or AsString, respectively,
    when migrating. Explicit policies override the boolean. Serialized options that omit both
    fields retain the 1.3.0 behavior of converting non-finite floats to strings;
    Options::default() continues to reject them.
  • Deprecated the msg field of Error::AliasError in favor of its structured error field.
    Existing Error::AliasError { msg, .. } patterns still work with a deprecation warning.
Fixed
  • Recognize only the standard plain null spellings: empty, ~, null, Null, and NULL.
    Other capitalization such as NulL remains a string instead of being rejected, converted
    to an empty value, or skipped as a document (#​234).
  • Buffered LastWins values and inline merges no longer produce alias errors when no
    alias was used. Replay preserves per-node origins, including genuine nested aliases,
    ordinary value locations, and merge use-sites for Spanned<T>.
  • strict_booleans: true now recognizes only the six YAML 1.2 Core boolean spellings.
    Other capitalization such as tRuE remains a string during inference, is accepted
    as unquoted text with no_schema, and is rejected for boolean targets.
  • Plain alias diagnostics explicitly label the use location with (used at line X, column Y).
    The new Localizer::alias_used_at hook controls this suffix independently of failure and
    definition locations. Custom localizers that previously used attach_location to format
    or suppress alias-use coordinates should override alias_used_at as well.
  • Miette diagnostics now localize alias labels, validation messages and summaries, and
    include context. Validation messages honor external-message overrides, and multi-document
    summaries honor custom message formatters. English defaults are unchanged.
    Custom Localizer implementations migrating from 1.x must also override
    anchor_defined_here to translate the alias anchor-definition label.
  • Validation snippet headers now show the actual source name instead of (defined) or
    (defined here), including errors in included YAML files.
  • Serde invalid-length failures now return Error::SerdeInvalidLength with separate
    len, expected, and location fields, allowing custom formatters to inspect them.
    Default diagnostic wording is preserved (#​205, item 6).
  • Root validation paths honor Localizer::root_path_label in plain, snippet, and
    miette diagnostics (#​205, item 5c).
  • Plain validation diagnostics separate issues with real newlines while escaping control
    characters inside each issue. Built-in formatters use the new optional
    MessageFormatter::format_validation_issue_lines hook; existing custom whole-message
    overrides retain their behavior (#​205, item 5a).
  • Nested containers reuse the alias error wrapper for the same use site, preserving the
    outer anchor location while exposing the original error directly through error, source(),
    and the legacy msg field (#​205, item 1).
  • Alias diagnostics preserve the precise location of a failing value inside an anchored mapping,
    including fields outside the anchor's snippet window. Plain messages, snippets, and miette
    reports include the distinct failing location; equal locations are not repeated.
  • Alias error rendering passes the original error to the active MessageFormatter, including
    formatters that delegate other variants to the built-in formatter. Plain messages report
    the alias definition and use locations once through the active Localizer; snippet and
    miette diagnostics use location labels without embedding plain-text location suffixes.
    Custom location formatting and suppression now apply throughout aliased values
    (#​199).
  • std::error::Error::source exposes the inner error for both Error::AliasError and
    Error::WithSnippet, preserving the source chain through the default snippet wrapper.
  • Made huge_documents and serde_derived_types enable deserialize, fixing isolated feature
    builds with --no-default-features, including autopkgtests of Debian team (as observed).
Documentation
  • Documented the serde_yaml migration caveat for null values in String fields,
    including when to use Option<String>, quoted strings, or !!str
    (#​229).

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate CLI.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [serde-saphyr](https://github.com/bourumir-wyngs/serde-saphyr) | workspace.dependencies | major | `1.0.0` → `2.0.0` | --- ### Release Notes <details> <summary>bourumir-wyngs/serde-saphyr (serde-saphyr)</summary> ### [`v2.0.0`](https://github.com/bourumir-wyngs/serde-saphyr/blob/HEAD/CHANGELOG.md#200) [Compare Source](https://github.com/bourumir-wyngs/serde-saphyr/compare/1.3.0...2.0.0) ##### YAML changes - Tags selecting unit enum variants now reject non-null payloads instead of silently discarding them ([#&#8203;236](https://github.com/bourumir-wyngs/serde-saphyr/issues/236)). Use a bare variant name, a tag with empty content, or a tag followed by `~` or `null`; quoted strings and collections are rejected. - Composite mapping keys are not compared regardless of entry order (thanks [@&#8203;yuxi-liu-wired](https://github.com/yuxi-liu-wired)) . - Commented<T> now writes its output replacing characters not allowed in comments (non printable) by spaces. ##### Added - Added public `path_map::PathKind`, `PathKey::segments()`, and `PathMap::locations_for()` for inspecting validation paths and resolving their YAML use/definition locations, including best-effort spelling matches and recorded ancestor/root fallback. - Added `RenderOptions::line_offset` and `RenderOptions::source_name` for displaying embedded YAML diagnostics at their containing document's line numbers and naming the root source in snippet headers, including the new `miette::to_miette_report_with_options` entry point. Included files retain their own names and coordinates, and stored error locations and spans are unchanged. - Added `PropertySyntax::DockerCompose` for Compose-compatible property interpolation. - Added the default-enabled `comments` feature, forwarding to granit-parser's matching feature. Builds with `default-features = false` must enable it to use `Commented<T>`, `CommentPosition`, comment options, or comment budget fields and reports. Without it, YAML comments are still accepted and validated, but their text is not retained. - Added `Options::non_finite_float_policy` with `NonFiniteFloatPolicy::{PassThrough, Reject, AsString}` to configure non-finite floats delivered through `deserialize_any`. Explicit policies override the legacy boolean; leaving the field unconfigured preserves its behavior. - Added the `borrowed_context` example showing recursive `Serialize` adapters that borrow an existing value tree and per-call formatting context, composing with `Tagged<T>` and style wrappers without building a second container tree or using thread-local state. - Added `SerializerOptions::no_lang_directive` (default `false`) to suppress the `%YAML 1.2` directive and its leading `---` marker independently of `yaml_12`'s quoting. - Added `from_str_multiple`, `from_bytes_multiple`, and their `_with_options` variants to deserialize multiple YAML documents into any `C: Default + Extend<T>`, including vectors, queues, sets, and custom accumulators. Values can borrow from the input string or UTF-8 byte slice. Explicit type arguments specify both the document and collection types, for example `from_str_multiple::<String, Vec<_>>(input)`. - Added an `error: Box<Error>` field to `Error::AliasError`, which keeps the original error when an aliased value fails to deserialize. A custom `MessageFormatter` or `Localizer` now applies to that error, and `std::error::Error::source` returns it ([#&#8203;199](https://github.com/bourumir-wyngs/serde-saphyr/issues/199)). ##### Changed - **Breaking:** `from_multiple`, `from_multiple_with_options`, `from_slice_multiple`, and `from_slice_multiple_with_options` now accept `T: Deserialize<'de>` so values can borrow from the input. They retain their names, single type parameter, and `Vec<T>` returns and are not deprecated. Ordinary calls, including `from_multiple::<Config>(input)` and generic callers with `T: DeserializeOwned`, continue to work. Function pointers or callbacks accepting arbitrary input lifetimes may need forwarding closures, such as `|input| from_multiple::<String>(input)`. - Updated to granit-parser 2.0.0 and disabled its default features so comment support follows serde-saphyr's `comments` feature. Serialization-only builds remain independent of granit-parser, including when comment emission is enabled. - Non-finite floats remain rejected by default in `deserialize_any`, including overflowing literals such as `1e999`. Opt into `PassThrough` to preserve them in float-capable visitors, untagged enums, and flattened float fields, or `AsString` to receive canonical strings. With `PassThrough`, `serde_json::Value` converts them to `Null` without an error. Direct `f32`/`f64` deserialization is unchanged. - **Breaking:** `Error::AliasError` has a new mandatory `error: Box<Error>` field. Manual constructors must supply it, and patterns listing every field must add `error` or `..`. The variant name is unchanged. Rendering and `source()` use the original error; the deserializer still populates `msg` with an `error.to_string()` snapshot for existing handlers. ##### Deprecated - Deprecated `Options::reject_non_finite_typeless_float` in favor of `non_finite_float_policy`. When the new field is unconfigured, the boolean retains its original behavior: `true` (the default) rejects and `false` converts to strings. Use `Reject` or `AsString`, respectively, when migrating. Explicit policies override the boolean. Serialized options that omit both fields retain the 1.3.0 behavior of converting non-finite floats to strings; `Options::default()` continues to reject them. - Deprecated the `msg` field of `Error::AliasError` in favor of its structured `error` field. Existing `Error::AliasError { msg, .. }` patterns still work with a deprecation warning. ##### Fixed - Recognize only the standard plain null spellings: empty, `~`, `null`, `Null`, and `NULL`. Other capitalization such as `NulL` remains a string instead of being rejected, converted to an empty value, or skipped as a document ([#&#8203;234](https://github.com/bourumir-wyngs/serde-saphyr/issues/234)). - Buffered `LastWins` values and inline merges no longer produce alias errors when no alias was used. Replay preserves per-node origins, including genuine nested aliases, ordinary value locations, and merge use-sites for `Spanned<T>`. - `strict_booleans: true` now recognizes only the six YAML 1.2 Core boolean spellings. Other capitalization such as `tRuE` remains a string during inference, is accepted as unquoted text with `no_schema`, and is rejected for boolean targets. - Plain alias diagnostics explicitly label the use location with `(used at line X, column Y)`. The new `Localizer::alias_used_at` hook controls this suffix independently of failure and definition locations. Custom localizers that previously used `attach_location` to format or suppress alias-use coordinates should override `alias_used_at` as well. - Miette diagnostics now localize alias labels, validation messages and summaries, and include context. Validation messages honor external-message overrides, and multi-document summaries honor custom message formatters. English defaults are unchanged. Custom `Localizer` implementations migrating from 1.x must also override `anchor_defined_here` to translate the alias anchor-definition label. - Validation snippet headers now show the actual source name instead of `(defined)` or `(defined here)`, including errors in included YAML files. - Serde invalid-length failures now return `Error::SerdeInvalidLength` with separate `len`, `expected`, and `location` fields, allowing custom formatters to inspect them. Default diagnostic wording is preserved ([#&#8203;205, item 6](https://github.com/bourumir-wyngs/serde-saphyr/issues/205)). - Root validation paths honor `Localizer::root_path_label` in plain, snippet, and `miette` diagnostics ([#&#8203;205, item 5c](https://github.com/bourumir-wyngs/serde-saphyr/issues/205)). - Plain validation diagnostics separate issues with real newlines while escaping control characters inside each issue. Built-in formatters use the new optional `MessageFormatter::format_validation_issue_lines` hook; existing custom whole-message overrides retain their behavior ([#&#8203;205, item 5a](https://github.com/bourumir-wyngs/serde-saphyr/issues/205)). - Nested containers reuse the alias error wrapper for the same use site, preserving the outer anchor location while exposing the original error directly through `error`, `source()`, and the legacy `msg` field ([#&#8203;205, item 1](https://github.com/bourumir-wyngs/serde-saphyr/issues/205)). - Alias diagnostics preserve the precise location of a failing value inside an anchored mapping, including fields outside the anchor's snippet window. Plain messages, snippets, and `miette` reports include the distinct failing location; equal locations are not repeated. - Alias error rendering passes the original error to the active `MessageFormatter`, including formatters that delegate other variants to the built-in formatter. Plain messages report the alias definition and use locations once through the active `Localizer`; snippet and `miette` diagnostics use location labels without embedding plain-text location suffixes. Custom location formatting and suppression now apply throughout aliased values ([#&#8203;199](https://github.com/bourumir-wyngs/serde-saphyr/issues/199)). - `std::error::Error::source` exposes the inner error for both `Error::AliasError` and `Error::WithSnippet`, preserving the source chain through the default snippet wrapper. - Made `huge_documents` and `serde_derived_types` enable `deserialize`, fixing isolated feature builds with `--no-default-features`, including autopkgtests of Debian team (as [observed](https://dfsg-new-queue.debian.org/reviews/rust-serde-saphyr)). ##### Documentation - Documented the `serde_yaml` migration caveat for null values in `String` fields, including when to use `Option<String>`, quoted strings, or `!!str` ([#&#8203;229](https://github.com/bourumir-wyngs/serde-saphyr/issues/229)). </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNjcuNSIsInVwZGF0ZWRJblZlciI6IjQ0LjE2Ny41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJEZXBlbmRlbmNpZXMiLCJEZXBlbmRlbmNpZXMvUmVub3ZhdGUiXX0=-->
chore(deps): update rust crate serde-saphyr to v2
All checks were successful
Auto Labeler / Apply labels based on changed files (pull_request_target) Successful in 4s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m26s
Checks / Prek / Check changed files (pull_request) Successful in 6s
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m20s
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 6s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 35m23s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 11m50s
547172534e
renovate force-pushed renovate/serde-saphyr-2.x from 547172534e
All checks were successful
Auto Labeler / Apply labels based on changed files (pull_request_target) Successful in 4s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m26s
Checks / Prek / Check changed files (pull_request) Successful in 6s
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m20s
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 6s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 35m23s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 11m50s
to 221fd41bbe
Some checks failed
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 7s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m10s
Checks / Prek / Check changed files (pull_request) Successful in 6s
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m23s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 20m56s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 40m24s
2026-10-26 06:07:05 +00:00
Compare
Some checks failed
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 7s
Required
Details
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m10s
Checks / Prek / Check changed files (pull_request) Successful in 6s
Required
Details
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m23s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 20m56s
Required
Details
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 40m24s
Required
Details
This pull request is blocked because it's outdated.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'renovate/serde-saphyr-2.x:renovate/serde-saphyr-2.x'
git switch 'renovate/serde-saphyr-2.x'
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
continuwuation/continuwuity!2413
No description provided.