4.6 KiB
Changelog
Upcoming
v0.0.3
Skipping version v0.0.2
to align this crate's version with that of
saphyr-parser
.
Breaking Changes:
- Move
load_from_*
methods out of theYamlLoader
. Now,YamlLoader
gained a generic parameter. Moving those functions out of it spares having to manually specify the generic inYamlLoader::<Yaml>::load_from_str
. Manipulating theYamlLoader
directly was not common. - Make
LoadError
Clone
by storing anArc<std::io::Error>
instead of the error directly.
Features:
-
(#19)
Yaml
now implementsIndexMut<usize>
andIndexMut<&'a str>
. These functions may not return a mutable reference to aBAD_VALUE
. Instead,index_mut()
will panic if either:- The index is out of range, as per
IndexMut
's requirements - The inner
Yaml
variant doesn't matchYaml::Array
forusize
orYaml::Hash
for&'a str
- The index is out of range, as per
-
Use cargo features
This allows for more fine-grained control over MSRV and to completely remove debug code from the library when it is consumed.
The
encoding
feature, governing theYamlDecoder
, has been enabled by default. Users of@davvid
's fork ofyaml-rust
or ofyaml-rust2
might already use this. Users of the originalyaml-rust
crate may freely disable this feature (cargo <...> --no-default-features
) and lower MSRV to 1.65.0. -
Load with metadata
The
YamlLoader
now supports adding metadata alongside the nodes. For now, the only one supported is theMarker
, pointing to the position in the input stream of the start of the node.This feature is extensible and should allow (later) to add comments.
Fixes:
1fc4692
: Fix trailing newlines when emitting multiline strings.
Older yaml-rust2
changelgos
v0.8.0
Breaking Changes:
- The
encoding
library has been replaced withencoding_rs
. If you use thetrap
ofYamlDecoder
, this change will make your code not compile. An additional enumYamlDecoderTrap
has been added to abstract the underlying library and avoid breaking changes in the future. This additionally lifts theencoding
dependency on your project if you were using that feature.- The signature of the function for
YamlDecoderTrap::Call
has changed: - The
encoding::types::DecoderTrap
has been replaced withYamlDecoderTrap
.
Please refer to the// Before, with `encoding::types::DecoderTrap::Call` fn(_: &mut encoding::RawDecoder, _: &[u8], _: &mut encoding::StringWriter) -> bool; // Now, with `YamlDecoderTrap::Call` fn(_: u8, _: u8, _: &[u8], _: &mut String) -> ControlFlow<Cow<'static str>>;
YamlDecoderTrapFn
documentation for more details.
- The signature of the function for
Features:
-
Tags can now be retained across documents by calling
keep_tags(true)
on aParser
before loading documents. (#10 (#12) -
YamlLoader
structs now have adocuments()
method that returns the parsed documents associated with a loader. -
Parser::new_from_str(&str)
andYamlLoader::load_from_parser(&Parser)
were added.
Development:
- Linguist attributes were added for the
tests/*.rs.inc
files to prevent github from classifying them as C++ files.
v0.7.0
Features:
-
Multi-line strings are now emitted using block scalars.
-
Error messages now contain a byte offset to aid debugging. (#176)
-
Yaml now has
or
andborrowed_or
methods. (#179) -
Yaml::load_from_bytes()
is now available. (#156) -
The parser and scanner now return Err() instead of calling panic.
Development:
-
The documentation was updated to include a security note mentioning that yaml-rust is safe because it does not interpret types. (#195)
-
Updated to quickcheck 1.0. (#188)
-
hashlink
is now used instead oflinked_hash_map
.
v0.6.0
Development:
-
is_xxx
functions were moved into the privatechar_traits
module. -
Benchmarking tools were added.
-
Performance was improved.