Makes Serial Config an Open Standard #53
Merged
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.
Previously
serial_config()
performed validation and created a specially-formatted object (constructable only through the R C API). The advantage of this was this didn't need to be re-validated at the point of being set.However this prevents a 3rd party being able to simply create a configuration as a list without using the special constructor. This is somewhat inconsistent with what
mirai
(which this function supports) uses as a design concept elsewhere e.g. SSH configs created bymirai::ssh_config()
are just simple lists).Now validation occurs upon option setting as well, which is more robust behaviour as well as addressing the above.