Expose Extensions during ser+de through ron::Options#343
Merged
Conversation
Member
Author
|
@torkleyy Here's my initial attempt at the |
torkleyy
reviewed
Nov 30, 2021
torkleyy
left a comment
Member
There was a problem hiding this comment.
Sorry for the late review. I like where this is going!
Member
Author
@torkleyy If you like the API as it is right now (and you give me the go-ahead), I'll start updating the documentation. |
1 task
Member
Author
|
@torkleyy I've added documentation and the CHANGELOG entry. I also made the following changes to the
I've also made some minor code cleanup adjustments:
|
1 task
torkleyy
reviewed
Dec 3, 2021
torkleyy
approved these changes
Dec 3, 2021
torkleyy
added a commit
to torkleyy/ron
that referenced
this pull request
Jun 6, 2022
Expose `Extensions` during ser+de through `ron::Options`
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 is based on #281 and #339 (with a potential application for #334 as well).
Optionsstruct from which all ser+de utils methods can be called.XXXnow useOptions::default().XXXas their implementation.Optionsstruct can be configured with a set of default RON extensionsa) During deserialization default extensions are automatically enabled, i.e. do not have to be included in the RON.
b) During serialization default extensions are automatically enabled and are not included in the output RON. Additional extensions enabled through the
PrettyConfigwhich are not in the set of default extensions are still included in the output RON. Therefore, this PR supersedes Addoutput_extensionsoption toPrettyConfig#339.c) This now enables programs which always use a set of extensions to enable them programmatically and exclude them from the RON config files.
SerializerandDeserializerand not changing the default behaviour (i.e. no default extensions).Defaultimpl forPrettyConfig.CHANGELOG.md