Releases: fktn-k/fkYAML
fkYAML version 0.4.0
Summary
This release adds new features: parsing multi-line plain scalars & reverse iterations over sequence/mapping node elements.
See the related pull requests and documentations for more details.
A number of bugs (mostly in the deserialization feature) have also been resolved.
Note that a breaking change has been made in the way of error handling when deserializing an int or float scalar fail. The library now emits no error on such a scalar and treats it as a string scalar instead.
What's Changed
💥 Breaking Changes
- Stop throwing parse_error on string-to-int/float conversion failures if not forced with tag (#431, @fktn-k)
- reported by @tomwpid in the issue #428
- The library used to throw a
fkyaml::parse_error
upon conversion failures from a scalar to an integer or floating point value while parsing a YAML like this:id: 6E-578 # "6E-578" is interpreted as a floating point value but not expressible as a `double` # --> `fkyaml::parse_error` gets thrown due to the conversion failure.
- Such a conversion failure is now internally recovered by treating the scalar as a string scalar instead.
✨ New Features
- Support parsing multiline plain scalars (#432, @fktn-k)
- Parsing a YAML which contains multi-line plain (unquoted) scalars are now supported.
foo: this is a multi-line plain scalar # interpreted as "this is a multi-line plain scalar"
- Parsing a YAML which contains multi-line plain (unquoted) scalars are now supported.
- Support reverse iterations over sequence/mapping nodes (#440, @fktn-k)
- You can now iterate over sequence/mapping elements in a reversed order like this:
// node is [1, 2, 3] for (auto rit = node.rbegin(); rit != node.rend(); ++rit) { std::cout << *rit << std::endl; } // output: // 3 // 2 // 1
- You can now iterate over sequence/mapping elements in a reversed order like this:
⚡ Improvements
- Resolve the C4800 warning when compiled with MSVC (#430, @fktn-k)
- Make node iterators compatible with different value type const-ness (#438, @fktn-k)
fkyaml::node::iterator
andfkyaml::node::const_iterator
are compatible in constructions, assignments and comparisons.
🐛 Bug Fixes
- Emit error if an anchor is specified to an alias (#434, @fktn-k)
- Fixed bugs in parsing block scalars (#435, @fktn-k)
- Fix parsing input which begins with a newline & indentation (#437, @fktn-k)
- Fix round-trip issue in float serialization using scientific notation (#439, @fktn-k)
🤖 CI
- Update GitHub Actions workflow jobs using macOS related runner images (#433, @fktn-k)
- Add more GCC & Clang versions to use in GitHub Actions workflows (#436, @fktn-k)
Full Changelog
fkYAML version 0.3.14
Summary
This release adds the new header file fkyaml_fwd.hpp which provides the library's namespace macros and forward declarations of the library's API classes. With the file, you can reduce the compile time cost of including the full library header if some source files do not actually use the library features.
Furthermore, conversions of YAML nodes into arbitrary types have been much improved and a lot more STL container and scalar types have been supported for that purpose. See the API documentation page for more details.
Other changes are related to minor bug fixes in YAML scalar parsing and maintenance fixes for CI.
What's Changed
✨ New Features
- Numeric scalar conversions inside basic_node::get_value API (#419, @fktn-k)
- Suggested by @ARessegetesStery in the issue #366
- Automatic value conversions among null, boolean, integer and floating-point scalar values inside fkyaml::basic_node::get_value() API calls
- Add forward declaration header (#422, @fktn-k)
- Suggested by @abcminiuser in the duscussion #420
- This new header provides the fkYAML namespace macros and forward declarations of fkYAML API classes.
- This file is available both in the include and single_include directories.
⚡ Improvements
- Support more STL types in from_node (#421, @fktn-k)
- YAML node objects can now be converted into a lot more STL container types.
- See the API documentation page for more details.
- Clarify type restrictions of get_value() & get_value_ref() APIs (#424, @fktn-k)
- get_value calls with unsupported types (reference, pointer and C-style array types) now emits an explicit error message.
- Use std::unreachable() or similar compiler specific extensions for dead but necessary code (#425, @fktn-k)
🐛 Bug Fixes
- Fix wrong scalar value type detection from floating point value token (#414, @fktn-k)
- reported by @ebertolazzi in the issue #413
- Disable -Wdeprecated-literal-operator warnings (#417, @fktn-k)
- reported by @ebertolazzi in the issue #413
🤖 CI
- Update GA workflow jobs for ubuntu24.04 (#415, @fktn-k)
- GA workflow jobs with more AppleClang versions on macOS (#416, @fktn-k)
- Fix somehow shadowed clang-tidy warnings (#418, @fktn-k)
- Fix duplicate include error if clang-tidy helper file already exists (#423, @fktn-k)
Full Changelog
fkYAML version 0.3.13
Summary
This release includes performance improvements in parsing YAML documents and many bug fixes in both serialization and deserialization functions.
In addition, benchmarking has been improved to facilitate comparison with existing YAML libraries by adding variations in data file content.
No changes are required for migration.
What's Changed
⚡ Improvements
- Refine benchmarking (#397, @fktn-k)
- replaced data files for benchmarking for better comparison against existing YAML libraries
- Optimized scalar parsing (#409, @fktn-k)
- increased parse speed by about 5MiB/s
🐛 Bug Fixes
- Accept % as first scalar character (#399, @fktn-k)
- Fix compile warnings/errors when benchmarker app is compiled with msvc (#401, @fktn-k)
- Updated natvis file (#402, @fktn-k)
- fixed broken natvis file contents
- Fix URI validation for tag shorthands (#403, @fktn-k)
- Fix float scalar serialization when a float is actually an integer (#407, @fktn-k)
- reported by @ARessegetesStery in the issue #405
- Fix infinite loops after parsing final empty block scalar (#410, @fktn-k)
- Fix wrong parse result from single scalar document (#411, @fktn-k)
📝 Documentation
- Remove header lines for Doxygen (#398, @fktn-k)
- Fix some typos in strings and comments (#408, @sndth)
Full Changelog: v0.3.12...v0.3.13
fkYAML version 0.3.12
Summary
This release adds some basic_node APIs to get/set node attributes for more secure backwards compatibilities in future releases. Because of that, some existing APIs have been deprecated (see the list down below). It's recommended for users to replace deprecated API usages with new APIs.
Furthermore, relatively large refactoring has been made for better performance and more flexible node attribute configurations (just preparation for now, but will be added within a few coming releases). As a result, deserialization performance has increased. See the Benchmarking section in README.md for details.
Last but not least, several bugs have also been resolved in deserialization, and active C++ standard is now correctly detected at compile time when using MSVC compilers where __cplusplus
macro doesn't hold a correct value by default.
What's Changed
✨ New Features
- Add node_type/yaml_version_type enum class APIs by @fktn-k in #388
- In this PR, the following APIs has been deprecated. Although they still work as before except for compile-time deprecation warnings, it's highly recommended to replace their usages with new APIs since they are planned to be removed in v0.4.0. See the Deprecation notes in each deprecated API reference page for migration guides.
fkyaml::basic_node::node_t
- Replace with:
fkyaml::node_type
- Replace with:
fkyaml::basic_node::basic_node(const fkyaml::basic_node::node_t)
- Replace with:
fkyaml::basic_node::basic_node(const fkyaml::node_type)
- Replace with:
fkyaml::basic_node::node_t fkyaml::basic_node::type()
- Replace with:
fkyaml::basic_node::get_type()
- Replace with:
fkyaml::basic_node::yaml_version_t
- Replace with:
fkyaml::yaml_version_type
- Replace with:
fkyaml::basic_node::yaml_version_t fkyaml::basic_node::get_yaml_version()
void fkyaml::basic_node::set_yaml_version(const fkyaml::basic_node::yaml_version_t)
- In this PR, the following APIs has been deprecated. Although they still work as before except for compile-time deprecation warnings, it's highly recommended to replace their usages with new APIs since they are planned to be removed in v0.4.0. See the Deprecation notes in each deprecated API reference page for migration guides.
⚡ Improvements
- Improve UTF encoding detection by @fktn-k in #386
- Refactor node attributes management by @fktn-k in #389
- Refactor lexical analysis by @fktn-k in #390
- Improve conversion from scalars to native types by @fktn-k in #391
- Reduce string copies in parse by @fktn-k in #394
- Use likely/unlikely if available by @fktn-k in #395
🐛 Bug Fixes
- Fix detecting invalid contents of block scalar headers by @fktn-k in #387
- Use _MSVC_LANG macro when compiled with MSVC for C++ standard detection by @fktn-k in #392(#392)
- Parse +.inf as the positive float infinity by @fktn-k in #393
Full Changelog: v0.3.11...v0.3.12
fkYAML version 0.3.11
Summary
This release fixes bugs in the deserialization feature including input handling.
Furthermore, CI workflow errors when a PR from fork repository tries to acquire write permission/secrets access are also resolved, which was introduced when code formatting & coverage report sharing were made executed during the GitHub Actions workflows running for PR reviews.
What's Changed
🐛 Bug Fixes
- Allow the document end marker omitted by @fktn-k in #374
- #375 Fix newline code normalization in UTF-8 encoded file input by @fktn-k in #376, reported by @sndth in #375
- Fix wrong parse result from a block sequence as a nested block mapping value by @fktn-k in #377
- Throw exception when loading a nonexistent stream by @sndth in #379, reported by @sndth in #378
- Fix error on parsing a floating point value which ends with a dot by @fktn-k in #382, reported by @realysy in #380
🤖 CI
- Fix workflow errors on PRs from fork repos by @fktn-k in #383
- Fix conditional branching for pull_request_target events by @fktn-k in #384
Full Changelog: v0.3.10...v0.3.11
fkYAML version 0.3.10
Summary
This release adds the new support for deserializing/serializing multiple YAML documents by adding new APIs (fkyaml::node::deserialize_docs()
and fkyaml::node::serialize_docs()
respectively). You can still call the existing APIs for deserializing/serializing a single YAML document. See the linked API document pages for details.
In addition, from this version on, Intel icpx compiler is supported and used in the CI processes. Some compiler flags are added in building the unit testing app, but no compiler specific swiches are required for the library itself.
Moreover, because the GitHub Actions runner image for macOS11 has been deprecated, the CI jobs which uses the runner image and some compiler support which depend on the runner image have been removed.
For other changes like bug fixes, see descriptions in each related issues and PRs.
What's Changed
✨ New Features
- Support Intel icpx compiler by @fktn-k in #360
- Support parssing multiple YAML documents by @fktn-k in #362
- Support serializing multiple YAML docs by @fktn-k in #363
🐛 Bug Fixes
- Detect missing the end of directives markers (---) by @fktn-k in #361
- Fix bug in serializing alias keys by @fktn-k in #364
- Allow trailing comma in flow mapping/sequence by @fktn-k in #365
- #368 Fix line advancement after node props by @fktn-k in #369, reported by @alienczf in #368
- Apply node properties for the root node by @fktn-k in #370
- #366 Fix node-to-float conversion error if node's value is <= 0 by @fktn-k in #371, reported by @ARessegetesStery in #366
🤖 CI
- Remove CI jobs running with macOS 11 by @fktn-k in #367
- update configs for reuse v4 by @fktn-k in #372
Full Changelog: v0.3.9...v0.3.10
fkYAML version 0.3.9
Summary
This release adds the benchmarking tool for fkYAML and other C++ libraries for YAML.
The tool is quite experimental and will be modified and expanded in future releases.
See the benchmarking section of the README.md file for the current benchmarking scores.
Moreover, several bugs in deserialization and Windows builds have been fixed.
What's Changed
✨ New Features
⚡ Improvements
🐛 Bug Fixes
- fixed parse error on explicit mappings as a block sequence entry by @fktn-k in #353
- Fix parse error on smal negative integer keys by @fktn-k in #355
- Fix compile errors on Windows by @fktn-k in #358, reported by @Michael-Lafreniere in #357
Full Changelog: v0.3.8...v0.3.9
fkYAML version 0.3.8
Summary
This release contains the new support of multiline scalars in the deserialization feature.
As described in the PR #344, the support is limited to single/double quoted styles and multiline scalar keys are being permitted as opposed to the YAML specification.
The above limitations will, of course, be resolved in future releases.
Furthermore, a number of bugs in the deserialization feature have been resolved as shown in the Bug Fixes section down below.
Last but not least, gcc14 and clang18 have been added to the supported compilers list and are now used in the GitHub Actions workflows for testing.
What's Changed
✨ New Features
⚡ Improvements
🐛 Bug Fixes
- Fix parse error on flow containers containing child flow containers by @fktn-k in #345
- Fix parse error on flow container keys by @fktn-k in #346
- Fix wrong parse result from mappings containing the non-first block sequence by @fktn-k in #348 reported by @adjbcbc in #347
- Detect errors on missing flow value separators by @fktn-k in #350
- Fix parse error on empty flow containers by @fktn-k in #351 reported by @adjbcbc in #347
🤖 CI
Full Changelog: v0.3.7...v0.3.8
fkYAML version 0.3.7
Summary
This release includes refactoring of YAML escaping and improvement of the way of managing anchor/alias nodes.
Furthermore, several bugs found in the deserializer are resolved.
For contributors, the results of executing clang-format and amalgamation in the GitHub Actions workflows are now automatically applied to the source files.
You can, of course, still run those tools locally but that's not required from this release on.
For more details, see the CONTRIBUTING.md file.
What's Changed
⚡ Improvements
- Separate YAML escaping/unescaping functionalities by @fktn-k in #337
- Improve anchor alias node management by @fktn-k in #340
🐛 Bug Fixes
- Fix false error on anchor names containing colons (:) by @fktn-k in #335
- Escape backslash(\) + 0x09 to a horizontal tab (\t) by @fktn-k in #336
- Fixed error on node properties for child block sequences by @fktn-k in #338
- Fix the C6262 warning on Windows by @fktn-k in #339
🤖 CI
Full Changelog: v0.3.6...v0.3.7
fkYAML version 0.3.6
Summary
This release includes enhancements to the deserializer, improving both performance and readability.
Furthermore, it resolves several issues identified in the deserializer and improves conformance to the YAML specification.
What's Changed
⚡ Improvements
🐛 Bug Fixes
- Fixed parser crashes on a sequence right after the directives end marker by @fktn-k in #327
- Allow backslashes in plain/single-quoted scalars by @fktn-k in #329
- Fixed parse error on root block sequence with child block sequences by @fktn-k in #330
- Fix parse error on block sequences with child flow style container nodes by @fktn-k in #332
- Fixed parse error on block sequences with child block mappings split by a newline code by @fktn-k in #333
🧑🤝🧑 Community
Full Changelog: v0.3.5...v0.3.6