Releases: dlang-community/D-YAML
Releases · dlang-community/D-YAML
v0.8.0
New Features
- Node<->Custom Type conversion is now done on-demand
- May now be compiled on platforms that don't share x86 alignment rules
- Many getter/setter functions are now simple fields
- It is no longer necessary (or recommended) to create your own Resolver - you can now modify the loader's resolver directly
- Manually-created Resolvers no longer have the default resolvers attached to them.
Removed Features
- Loader.loadAll has been removed
Fixes
- Unknown tags are no longer errors
- UTF-8 decoding in URIs now works properly
- Invalid anchor errors should no longer occur
- Outdated documentation has been fixed up
Misc
- Number of template instantiations should be noticeably lower
- More
@trusted
->@safe
upgrades - More internal sanity checks
- Fewer reimplementations of phobos functions
- Official YAML test suite runner
See the detailed changelog.
v0.7.0
New Features
- completely usable in
@safe
code. - major performance gain when reading YAML files.
- major performance gain when writing YAML files.
- new outputrange-based document writer
- Node.add now works with valueless nodes
- added examples as subpackages
- added a json conversion example
- benchmark subpackage now prints detailed times
Removed Features
- removes
dyaml.all
,yaml
package modules
Fixes
- fixes BOMs being written for UTF-8 documents
See the detailed changelog.
v0.7.0-alpha.1
New Features
- completely usable in
@safe
code. - major performance gain when reading YAML files.
- major performance gain when writing YAML files.
- new outputrange-based document writer
- Node.add now works with valueless nodes
- added examples as subpackages
- added a json conversion example
- benchmark subpackage now prints detailed times
Removed Features
- removes
dyaml.all
,yaml
package modules
Fixes
- fixes BOMs being written for UTF-8 documents
See the detailed changelog.
DMD 2.071 compatibility, std.stream now part of D:YAML
- DMD 2.071 fixes by Martin Nowak.
std.stream
thanks to burner's work.
This should be a temporary fix until std.stream is completely replaced by pre-allocated memory or ranges;
that may take a while as I currently lack the time to put serious work into D:YAML.
DMD 2.068 compatibility
Fixed compilation with DMD 2.068 Had to use a lot of @trusted as std.variant.VariantN is again less safe. Will need to change that back once it gets safer, or at least isolate code using it so that half of Node API doesn't need to be @trusted.
Bugfixes and DMD compatibility
- Documentation is now generated by harbored-mod
- Node constructors
nothrow
where possible - Compatible with DMD 2.067
0.4.6: 0.4.5 with a fixed package.json to get code.dlang.org to work.
v0.4.6 Fixed a package.json bug to allow code.dlang.org to detect 0.4.5.
v0.5.0
This release brings decreased GC usage thanks to slices, improved performance, a few minor features, and some
breaking changes.
Breaking changes
As many people have been using D:YAML from git master since the 0.4 release, each change
is prefixed by the year the change was introduced.
2014
Thecdc.d
build script has been removed; dub is now the only 'official'
way to build D:YAML.2014
Broke compatibility with all DMD versions before 2.0662014
Loader
API depending onstd.stream
is now deprecated and will be
removed in the next release.2014
Loader.fromString(string)
is now deprecated and replaced by
Loader.fromString(char[])
, which will reuse and overwrite the input during
parsing. The string overload will be removed in the next release.2012
Values in D:YAML are less 'dynamic-typed'. E.g. removing"42"
won't
also remove42
. Such automatic conversion still happens e.g. in a foreach
over a mapping with a string key. TheNode.as()
method has a template
parameter to disable automatic conversion from strings to other types.
API improvements
Loader
is now, by default, constructed from a non-const buffer containing YAML
data instead of astd.stream.Stream
. D:YAML reuses and overwrites this buffer to
minimize memory allocations during parsing. Convenience API such as theLoader
constructor from a filename is unchanged although it loads the file to a buffer
internally.Node.contains()
method to check if a YAML sequence/mapping contains specified
value (as opposed to a key).Node.containsKey()
method to check if a YAML mapping contains specified key.Node.isNull()
property.Node operator in
analogous to associative arrayin
.Loader.fromString()
method as a quick wrapper to parse YAML from a string.dyaml.hacks
module for potentially useful things YAML specification doesn't allow.- Most of the API is
@safe
or at least@trusted
. Alsopure
andnothrow
where possible. - User-defined constructors can now also construct builtin YAML types.
- Input is now validated at Loader construction to detect invalid UTF sequences early
and to minimize internal exception handling during parsing.
Other improvements
- D:YAML now works with a UTF-8 buffer internally. This decreases memory usage for UTF-8
input, and UTF-32 inputs can be encoded into UTF-8 in-place without allocating.
UTF-16 inputs still need an allocation. This also gets rid of all dchar[]->char[]
conversions which were a significant source of GC allocations. - Various optimizations in
Reader
/Scanner
, especially for mostly-ASCII files
containing plain scalars (most common YAML files). Measured speedup of ~80% when
parsing mostly-ASCII
files, slowdown of ~12% for mostly non-ASCII files (all tested files were UTF-8). - Less GC usage during YAML node construction.
Scanner
is now mostly@nogc
; it never allocates memory for token values, using
slices into the input buffer instead.- Custom,
@nogc
UTF decoding/encoding code based onstd.utf
to enable more use
of@nogc
in D:YAML internals and to improve performance. - Less memory allocations during scanning in general, including manual allocations.
- Default
Constructor
/Resolver
are now only constructed if the user doesn't
specify their own. - Replaced
std.stream.EndianStream
with
tinyendian. - D:YAML is now a DUB package.
- Removed static data structures such as default Constructor and Resolver.
- Compile-time checks for size of data structures that should be small.
- Better error messages.
- Various refactoring changes, using more 'modern' D features, better tests.
- Updated documentation, examples to reflect changes in 0.5.
- Updated the
yaml_bench
example/tool with options to keep the input file in memory
instead of reloading it for repeated parses, and to only benchmark scanning time
instead of the entire parser. - The
yaml_gen
example/tool can now generate strings from user-specified alphabets
which may contain non-ASCII characters.
Bugfixes
- Fixed mappings longer than 65535 lines.
- Removed a lot of
in
parameters that were used due to a misunderstanding of what
in
is supposed to do. - Fixed
real
emitting. - Fixed 32bit compilation (again).
- Various small bugfixes.
v0.4.5 - a snapshot of 'old' DMD 2.065-compatible D:YAML before 0.5
This is not a 'proper' release, hence the weird version name.
This version mainly exists for DMD 2.065 compatibility as v0.5 will require DMD 2.066. As this is just a snapshot of recent state of the git repo, it includes new features since v0.4. A proper changelog will be included with v0.5