Skip to content

fix(deps): update rust crate serde-saphyr to v2 - #730

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/serde-saphyr-2.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/serde-saphyr-2.x

Conversation

@renovate

@renovate renovate Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Type Update Change
serde-saphyr dependencies major 1 → 2

Release Notes

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

v2.1.1

Compare Source

Fixed
  • Fixed 2.1.0 regression empty documents producing errors (#​265). Empty document is a valid YAML document.
Performance improvements
  • Significantly reduced allocations when deserializing (#​262)

v2.1.0

Compare Source

–

Added
  • Added PropertySyntax::DockerComposeWithNulls: Compose interpolation where a value that is
    solely a reference to an unset property, or whose expansion is null/~, becomes YAML null.
    Explicitly empty properties and empty defaults stay empty strings, and DockerCompose itself
    is unchanged.
  • Added opt-in Options::reject_tagged_field_names to catch misplaced tags on
    struct field names, with Error::TaggedStructFieldName diagnostics. Struct field names can
    only be strings, !!str is still accepted. As other tags can only be ignored, tag on a structure
    field name is almost for sure placed wrongly. This setting will be default in next major release.
  • Added Options::leading_zero_numbers_as_strings and
    Options::underscored_numbers_as_strings to preserve numeric spellings such as
    0755 and 1_000 as strings in untyped values, including untagged enums and
    flattened fields (#​225).
    Both default to false; direct typed parsing, explicit numeric tags, and
    mapping-key comparison keep their existing behavior.
  • Added Error::render_to to append diagnostics to any std::fmt::Write using
    RenderOptions, without collecting the complete output in an intermediate string
    (#​221).
  • Added DuplicateKeyPolicy::PassThrough to delegate repeated explicit mapping entries
    to Serde visitors, matching serde_yaml's handling for structs, standard maps, and custom
    multimap visitors (#​226).
    The default remains Error; merge expansion retains its precedence rules. See the README
    migration note for the scope of this option.
Deprecated
  • Deprecated SerializerOptions::empty_as_braces. Setting it to false emits YAML null
    for empty block collections without tags or anchors. These values do not round-trip into
    collection types. Omit the setting to keep the default true and emit [] or {}.
    Existing serialization behavior remains supported for compatibility.
Fixed
  • Preserve application-tagged null-like documents in multi-document APIs, including
    the garde and validator integrations. A document such as !Maybe null now reaches
    enum dispatch instead of being skipped. This also affects default options: an
    Option<String> target receives a None item for !Foo null, while a String target
    reports NullIntoString. Untagged null documents and explicit !!null are still skipped.
  • Resolve tagged enum payloads according to their target type under no_schema:
    !Number 42 can deserialize into a numeric payload, while a string payload still
    requires quoting, as in !Text "42". This applies independently of property interpolation.
  • Keep validated and ordinary multi-document APIs consistent for interpolated nulls
    and interpolation work budgets. Reader iterators stop after an interpolation-budget
    breach, including breaches reported through an alias.
  • Emit empty lines in literal and folded block scalars without indentation,
    avoiding trailing whitespace while preserving whitespace in the string content
    (#​249).
  • Expose the original std::io::Error from deserialization failures through
    std::error::Error::source(). The outer message is IO error, so error chains
    include the underlying cause only once. Standalone Miette, Figment, and Figment2
    diagnostics retain the cause in their messages. Custom Miette formatters retain
    control over the complete message through MessageFormatter::format_standalone_message.
  • Avoid duplicate messages from Error::WithSnippet when following
    std::error::Error::source() by forwarding the wrapped error's source.
    Use without_snippet() to inspect the wrapped error. Alias errors retain their
    complete source chain, including snippet wrappers, for compatibility.
  • Validate recognized scalar tags consistently for numeric, boolean, character,
    and enum targets, including externally tagged enum mapping keys (#​235).
    Incompatible tags and tagged null-like payloads no longer bypass validation.
  • Apply enabled robotics conversions to untyped reads, skipped fields, and
    flattened values. The local !time duration tag is distinct from standard YAML
    !!timestamp; robotics tags require the feature and angle_conversions: true.
  • Reject YAML null when deserializing sequences, mappings, and mapping-based structs instead
    of silently constructing empty values (#​233).
    Blank values and the plain spellings ~, null, Null, and NULL are handled consistently.
    Write [] for an empty sequence or {} for an empty mapping. Option<T> null handling
    and defaults for absent fields are unchanged; see the README migration notes.
  • Reject "wrong case" YAML 1.2 Core spellings like NUlL, .NAn or FAlse (PR #​254, #​237).

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 was generated by Mend Renovate. View the repository job log.

@coderabbitai

coderabbitai Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: dallay/agentsync
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 6d4375a
  • Layers: Repository YAML (base), Organization UI (inherited)
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: f5250b30-738f-420d-81a0-a8cdf5cf2d65

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedcargo/​serde-saphyr@​1.3.0 ⏵ 2.1.19510093100100

View full report

@sonarqubecloud

sonarqubecloud Bot commented Nov 7, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Nov 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant