Repository navigation
fix(deps): update rust crate serde-saphyr to v2 - #730
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This PR contains the following updates:
1→2Release Notes
bourumir-wyngs/serde-saphyr (serde-saphyr)
v2.1.1Compare Source
Fixed
Performance improvements
v2.1.0Compare Source
–
Added
PropertySyntax::DockerComposeWithNulls: Compose interpolation where a value that issolely a reference to an unset property, or whose expansion is
null/~, becomes YAML null.Explicitly empty properties and empty defaults stay empty strings, and
DockerComposeitselfis unchanged.
Options::reject_tagged_field_namesto catch misplaced tags onstruct field names, with
Error::TaggedStructFieldNamediagnostics. Struct field names canonly be strings,
!!stris still accepted. As other tags can only be ignored, tag on a structurefield name is almost for sure placed wrongly. This setting will be default in next major release.
Options::leading_zero_numbers_as_stringsandOptions::underscored_numbers_as_stringsto preserve numeric spellings such as0755and1_000as strings in untyped values, including untagged enums andflattened fields (#225).
Both default to
false; direct typed parsing, explicit numeric tags, andmapping-key comparison keep their existing behavior.
Error::render_toto append diagnostics to anystd::fmt::WriteusingRenderOptions, without collecting the complete output in an intermediate string(#221).
DuplicateKeyPolicy::PassThroughto delegate repeated explicit mapping entriesto Serde visitors, matching
serde_yaml's handling for structs, standard maps, and custommultimap visitors (#226).
The default remains
Error; merge expansion retains its precedence rules. See the READMEmigration note for the scope of this option.
Deprecated
SerializerOptions::empty_as_braces. Setting it tofalseemits YAML nullfor empty block collections without tags or anchors. These values do not round-trip into
collection types. Omit the setting to keep the default
trueand emit[]or{}.Existing serialization behavior remains supported for compatibility.
Fixed
the
gardeandvalidatorintegrations. A document such as!Maybe nullnow reachesenum dispatch instead of being skipped. This also affects default options: an
Option<String>target receives aNoneitem for!Foo null, while aStringtargetreports
NullIntoString. Untagged null documents and explicit!!nullare still skipped.no_schema:!Number 42can deserialize into a numeric payload, while a string payload stillrequires quoting, as in
!Text "42". This applies independently of property interpolation.and interpolation work budgets. Reader iterators stop after an interpolation-budget
breach, including breaches reported through an alias.
avoiding trailing whitespace while preserving whitespace in the string content
(#249).
std::io::Errorfrom deserialization failures throughstd::error::Error::source(). The outer message isIO error, so error chainsinclude 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.Error::WithSnippetwhen followingstd::error::Error::source()by forwarding the wrapped error's source.Use
without_snippet()to inspect the wrapped error. Alias errors retain theircomplete source chain, including snippet wrappers, for compatibility.
and enum targets, including externally tagged enum mapping keys (#235).
Incompatible tags and tagged null-like payloads no longer bypass validation.
flattened values. The local
!timeduration tag is distinct from standard YAML!!timestamp; robotics tags require the feature andangle_conversions: true.of silently constructing empty values (#233).
Blank values and the plain spellings
~,null,Null, andNULLare handled consistently.Write
[]for an empty sequence or{}for an empty mapping.Option<T>null handlingand defaults for absent fields are unchanged; see the README migration notes.
v2.0.0Compare Source
YAML changes
discarding them (#236). Use a bare variant name, a tag with empty content, or a
tag followed by
~ornull; quoted strings and collections are rejected.Added
path_map::PathKind,PathKey::segments(), andPathMap::locations_for()for inspecting validation paths and resolving their YAML use/definition locations,
including best-effort spelling matches and recorded ancestor/root fallback.
RenderOptions::line_offsetandRenderOptions::source_namefor displayingembedded 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_optionsentry point. Included files retain their ownnames and coordinates, and stored error locations and spans are unchanged.
PropertySyntax::DockerComposefor Compose-compatible property interpolation.commentsfeature, forwarding to granit-parser's matchingfeature. Builds with
default-features = falsemust enable it to useCommented<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.
Options::non_finite_float_policywithNonFiniteFloatPolicy::{PassThrough, Reject, AsString}to configure non-finite floats delivered through
deserialize_any. Explicit policies overridethe legacy boolean; leaving the field unconfigured preserves its behavior.
borrowed_contextexample showing recursiveSerializeadapters that borrowan existing value tree and per-call formatting context, composing with
Tagged<T>andstyle wrappers without building a second container tree or using thread-local state.
SerializerOptions::no_lang_directive(defaultfalse) to suppress the%YAML 1.2directive and its leading---marker independently ofyaml_12's quoting.from_str_multiple,from_bytes_multiple, and their_with_optionsvariants todeserialize 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).error: Box<Error>field toError::AliasError, which keeps the original errorwhen an aliased value fails to deserialize. A custom
MessageFormatterorLocalizernow applies to that error, and
std::error::Error::sourcereturns it(#199).
Changed
from_multiple,from_multiple_with_options,from_slice_multiple, andfrom_slice_multiple_with_optionsnow acceptT: Deserialize<'de>so values can borrow fromthe input. They retain their names, single type parameter, and
Vec<T>returns and are notdeprecated. Ordinary calls, including
from_multiple::<Config>(input)and generic callerswith
T: DeserializeOwned, continue to work. Function pointers or callbacks accepting arbitraryinput lifetimes may need forwarding closures, such as
|input| from_multiple::<String>(input).serde-saphyr's
commentsfeature. Serialization-only builds remain independent ofgranit-parser, including when comment emission is enabled.
deserialize_any, including overflowingliterals such as
1e999. Opt intoPassThroughto preserve them in float-capable visitors,untagged enums, and flattened float fields, or
AsStringto receive canonical strings.With
PassThrough,serde_json::Valueconverts them toNullwithout an error.Direct
f32/f64deserialization is unchanged.Error::AliasErrorhas a new mandatoryerror: Box<Error>field.Manual constructors must supply it, and patterns listing every field must add
erroror...The variant name is unchanged. Rendering and
source()use the original error; thedeserializer still populates
msgwith anerror.to_string()snapshot for existing handlers.Deprecated
Options::reject_non_finite_typeless_floatin favor ofnon_finite_float_policy.When the new field is unconfigured, the boolean retains its original behavior:
true(the default) rejects and
falseconverts to strings. UseRejectorAsString, 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.msgfield ofError::AliasErrorin favor of its structurederrorfield.Existing
Error::AliasError { msg, .. }patterns still work with a deprecation warning.Fixed
~,null,Null, andNULL.Other capitalization such as
NulLremains a string instead of being rejected, convertedto an empty value, or skipped as a document (#234).
LastWinsvalues and inline merges no longer produce alias errors when noalias was used. Replay preserves per-node origins, including genuine nested aliases,
ordinary value locations, and merge use-sites for
Spanned<T>.strict_booleans: truenow recognizes only the six YAML 1.2 Core boolean spellings.Other capitalization such as
tRuEremains a string during inference, is acceptedas unquoted text with
no_schema, and is rejected for boolean targets.(used at line X, column Y).The new
Localizer::alias_used_athook controls this suffix independently of failure anddefinition locations. Custom localizers that previously used
attach_locationto formator suppress alias-use coordinates should override
alias_used_atas well.include context. Validation messages honor external-message overrides, and multi-document
summaries honor custom message formatters. English defaults are unchanged.
Custom
Localizerimplementations migrating from 1.x must also overrideanchor_defined_hereto translate the alias anchor-definition label.(defined)or(defined here), including errors in included YAML files.Error::SerdeInvalidLengthwith separatelen,expected, andlocationfields, allowing custom formatters to inspect them.Default diagnostic wording is preserved (#205, item 6).
Localizer::root_path_labelin plain, snippet, andmiettediagnostics (#205, item 5c).characters inside each issue. Built-in formatters use the new optional
MessageFormatter::format_validation_issue_lineshook; existing custom whole-messageoverrides retain their behavior (#205, item 5a).
outer anchor location while exposing the original error directly through
error,source(),and the legacy
msgfield (#205, item 1).including fields outside the anchor's snippet window. Plain messages, snippets, and
miettereports include the distinct failing location; equal locations are not repeated.
MessageFormatter, includingformatters that delegate other variants to the built-in formatter. Plain messages report
the alias definition and use locations once through the active
Localizer; snippet andmiettediagnostics use location labels without embedding plain-text location suffixes.Custom location formatting and suppression now apply throughout aliased values
(#199).
std::error::Error::sourceexposes the inner error for bothError::AliasErrorandError::WithSnippet, preserving the source chain through the default snippet wrapper.huge_documentsandserde_derived_typesenabledeserialize, fixing isolated featurebuilds with
--no-default-features, including autopkgtests of Debian team (as observed).Documentation
serde_yamlmigration caveat for null values inStringfields,including when to use
Option<String>, quoted strings, or!!str(#229).
Configuration
📅 Schedule: (UTC)
🚦 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.
This PR was generated by Mend Renovate. View the repository job log.