-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Upgrade to ron
to 0.9
#476
base: main
Are you sure you want to change the base?
Conversation
- Ron `0.9` refactored the `Number` value variant to be lossless, which requires more thorough matching. - 128 integer support in Ron requires feature opt-in via `Cargo.toml`, (_as `ValueKind` implements an equivalent type, `config-rs` could opt-in_). - Ron `0.9` also introduces a new `Bytes` value variant to support rusty byte strings (`Vec<u8>`). This was to resolve a roundtrip serialization bug with base64 strings when serde `deserialize_any` is used (_which lacks a type hint and would deserialize as a literal string to bytes, instead of base64 decoded string to bytes_). - Clarified that the option value variant dereferences a boxed ron value. Signed-off-by: Brennan Kinney <[email protected]>
There is a YAML test with keys that are strings or numbers since the format supports that. Ron also supports this, but no equivalent test is present: #432 The YAML equivalent isn't exactly supported, Awareness of the lossy deserialization could probably be better documented 🤷♂️ (similar is done for |
Ron finally released I have only updated the branch to resolve conflicts. Still lacking time to revisit my PRs here and get them in sync with any changes since that may need to be revised. Reminder (to self) that the PR description highlights this as an alternative PR for |
Pull Request Test Coverage Report for Build 13932004879Details
💛 - Coveralls |
@@ -129,7 +129,7 @@ toml = { version = "0.8", optional = true, default-features = false, features = | |||
serde_json = { version = "1.0", optional = true } | |||
yaml-rust2 = { version = "0.10", optional = true } | |||
rust-ini = { version = "0.21", optional = true } | |||
ron = { version = "0.8", optional = true } | |||
ron = { version = "0.9", optional = true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
128 integer support in Ron requires feature opt-in via Cargo.toml, (as ValueKind supports an equivalent type, config-rs could opt-in).
This actually has a significant problem and we might want to wait to see how ron-rs/ron#563 gets resolved before upgrading.
Changes
0.9
refactored theNumber
value variant to be lossless, which requires more thorough matching.Cargo.toml
, (asValueKind
supports an equivalent type,config-rs
could opt-in).0.9
also introduces a newBytes
value variant to support rusty byte strings (Vec<u8>
). This was to resolve a roundtrip serialization bug with base64 strings when serdedeserialize_any
is used (which lacks a type hint and would deserialize as a literal string to bytes, instead of base64 decoded string to bytes).Relevance
I've had this sitting around for a while and meaning to push a PR before I forget 😅
This PR is an alternative to #472 and a sibling of #474
In particular Ron
0.9
is intended to be more robust withValue
better supporting untagged enums and similar compatibility issues.from_value
method #472 , but forconfig-rs
is passing the Ron tests successfully regardless of Ron0.8
or0.9
release used.0.9
support there asdeserialize_any
to the untagged enum will fallback to theNil
variant when a variant is unsupported byconfig-rs
.config-rs
is generic across formats, that's less important so long as functionally the format meets test expectations.Ron
0.10
will continue to improve on theValue
type, which may be relevant forconfig-rs
.