# Changelog All notable changes to libfyaml will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [1.0.0-alpha6] - 2026-05-07 The sixth alpha milestone for the 1.0 line. This release expands the generic and document-building feature set, improves atom/text-analysis fidelity, and keeps pushing portability and build-system correctness across more targets and toolchains. ### Added - `generic`: add `fy_generic_document_builder` with builder tests and supporting document-state APIs - `parse`: add relaxed-flow document parsing for JSONL-like inputs, with matching generic and tool flags - `tool`: add `--relaxed-flow-doc` and schema-selection support to `fy-tool` - `test`: add atom text-analysis coverage plus more generic emit/document-builder verification - `ci`: add a Windows 11 ARM runner for broader coverage ### Changed - `generic`: extend iterator/encoder paths to preserve more style, implicit/explicit marker, anchor, and tag behavior - `atom`: rework token and atom text analysis around literals, iterators, and staging buffers - `build`: probe for `libatomic` in CMake and autoconf where required - `build`: fall back to `gnu11` when `c2x` is unavailable and avoid `pthread` probing on Android - `cmake`: align tests and warnings for `-Wextra`, including passing `HAVE_CONFIG_H` into tests - `reflection`: gate libclang tests properly on Windows and clean up warning-prone helper code ### Fixed - `generic`: fix big-endian `FY_STRING_SHIFT3` handling and multiple warning/const-correctness issues - `atom`: clear token analysis on reset and remove text-analysis edge-case failures - `autoconf`: handle `HAVE_GENERIC` and `HAVE_REFLECTION` properly across more platforms - `util`: fix older-compiler overflow-warning handling - `doc`: fix a path-scan helper to use `int` instead of `char` - `misc`: remove assorted unused code and warning-triggering paths in generic, reflection, and core helpers ### Statistics - 73 commits since `v1.0.0-alpha5` - Focus areas: generic/document formatting, atom/text fidelity, and broader platform/build portability ## [1.0.0-alpha5] - 2026-04-18 The fifth alpha milestone for the 1.0 line. This release broadens the build and CI story around the 1.0 work while hardening generic, threading, parser, emitter, and reflection behavior with another round of targeted fixes and regression coverage. ### Added - `build`: add the `pcons` build system and CI workflow - `ci`: enable address sanitizer builds via `ENABLE_ASAN=1` - `test`: add regression coverage for parser/emitter bugs, reflection malformed metadata, thread-pool shutdown/join races, and generic `preduce` behavior ### Changed - `build`: require `pcons >= 0.14.1` to pick up the link-flag fix needed by the new build flow - `generic`: use typedefs for erased `va_arg` callbacks - `thread`: refine steal-mode worker reservation and shutdown behavior - `reflection`: mark stub parameters unused when libclang is unavailable and defer meta document ownership handoff more carefully - `build`: avoid outputting `none required` into `LIBM` when no math linker flags are needed - `configure`: fix a stray `fi` in `configure.ac` ### Fixed - `generic`: fix `preduce` seeding via chunk and final workers - `thread`: tolerate futex shutdown races and remove a bogus test document external-steal join contract - `parse`: correctly handle escaped space followed by newlines - `atom`: rework `fy_atom_text_analyze()` for literals and fix the off-by-one in `fy_accel_resize()` prime table lookup - `reflection`: fix field-data destroy cleanup - `diag`: unref report tokens correctly without a sink ### Statistics - 23 commits since `v1.0.0-alpha4` - Focus areas: new build/CI infrastructure, ASAN coverage, and correctness fixes across generic, thread, parse/emitter, and reflection paths ## [1.0.0-alpha4] - 2026-03-20 The fourth alpha milestone for the 1.0 line. This is a narrow follow-up to `1.0.0-alpha3` focused on repairing the Python packaging and wheel-release story after the `alpha3` release. The core YAML engine and the 1.0 API direction are otherwise unchanged. ### Changed - `python`: stage the full source tree for `sdist` builds so source distributions contain the files needed to build correctly - `python`: detect the staged `sdist` repository root correctly during packaging - `python`: add `cp314` wheel builds to the release matrix ### Fixed - `python`: fix the broken Python wheel / source distribution release flow from `alpha3` ### Statistics - 3 commits since `v1.0.0-alpha3` - Focus area: Python packaging and wheel/sdist release correctness ## [1.0.0-alpha3] - 2026-03-20 The third alpha milestone for the 1.0 line. This release keeps the generic and reflection API direction introduced in the earlier alphas, but makes the Python binding, packaging, and Windows build story much more practical. It also rolls in another round of warning cleanup and a user-visible emitter correctness fix. ### Changed - `python`: build the Windows extension via CMake and use `clang-cl` for wheel builds - `python`: modernize `pyproject.toml` license metadata while keeping package metadata compatible - `python`: rework tests for Windows and fix broken `pytest` detection on macOS Homebrew - `cmake`: make shared-library ABI versioning follow `.libtool-version`, so CMake builds now emit the correct SONAME/versioned library names - `cmake`: disable Python bindings automatically when a matching debug Python is not available - `cmake`: unify the Python debug import fallback and make the Python AST parse use UTF-8 - `cmake`: factor whole-archive static linking and make workflows run on the `devel` branch too - `util`: ensure `alloca` is available on Windows in public-header use - `util`: gate diagnostic pragma helpers on GCC 13+ - `generic`: make `fy_gb_string_vcreate()` more efficient ### Fixed - `emit`: preserve trailing comments after block sequences and mappings when re-emitting YAML (#18) - `emit`: avoid a double `vsprintf()` call in `fy_emit_vprintf()` - `python`: fix a batch of PyPI packaging problems for the binding - `python/windows`: make missing Python binding builds non-fatal where appropriate - `misc`: tighten `-Wextra` cleanup across the library and build configuration ### Statistics - 26 commits since `v1.0.0-alpha2` - Focus areas: Windows support, Python packaging, warning-clean builds, emitter correctness, and CMake ABI-versioning correctness ## [1.0.0-alpha2] - 2026-03-18 The second alpha milestone for the 1.0 line. This release does not change the overall shape of the new generic and reflection APIs introduced in `1.0.0-alpha1`; it focuses on correctness, portability, and release infrastructure so the new subsystems are usable on more platforms and easier to consume. ### Changed - `generic`: harden the generic runtime for 32-bit targets - `reflection`: handle enums according to their underlying enum type - `clang`: fix LLVM 21 fallout in the reflection backend - `walk`: use `FY_DBL_DECIMAL_DIG` for safer double formatting - `doc`: add a GitHub Actions documentation build workflow and publish workflow artifacts - `doc`: add the missing LaTeX/doc build dependencies and refresh canned man pages in CMake - `utils`: add `fy_tmpfile()` and `fy_create_tmpfile()` utility helpers ### Fixed - `emit`: literal `|+` scalars no longer produce an extra newline before the following element - `generic`: fix string access to use `fy_castp()` correctly - `generic`: suppress warnings during generic value printing - `generic`: clamp generic encoding correctly when `size_t < sizeof(int32_t)` - `vlsize`: handle decoding correctly when `size_t < sizeof(uint64_t)` - `utils`: avoid overexpanding on 32-bit builds - `cmake`: enable and tighten 32-bit build coverage, while keeping portable target handling correct for x86 32-bit - `cmake`: only enable tautological warnings on clang - `test`: gate reflection and streaming-alias fuzz tests correctly on unsupported platforms - `test`: fix reflection test coverage on Windows - `misc`: fix a couple of `-Wextra` warnings ### Statistics - 27 commits since `v1.0.0-alpha1` - Focus areas: 32-bit support, reflection/clang compatibility, emitter correctness, and release documentation pipeline ## [1.0.0-alpha1] - 2026-03-16 This is the first alpha milestone toward a stable 1.0 release. The core YAML parsing and emission engine is unchanged and production-ready. The alpha tag applies to the two new subsystems introduced here: the generic runtime and the reflection layer. ### New: Generic runtime (`fy_generic`) A compact, efficient runtime type system for representing arbitrary YAML and JSON values in C, bringing Python/Rust-like dynamically-typed data literals to C programs. **Core type**: `fy_generic` — a single machine word (64-bit or 32-bit) that encodes one of nine value types via pointer tagging: - Scalar: `null`, `bool`, `int`, `float`, `string` - Collection: `sequence`, `mapping` - YAML-specific: `indirect` (anchor/tag/style wrapper), `alias` Small values are stored inline with zero heap allocation: 61-bit signed integers, 7-byte strings, and 32-bit floats all fit in a single word. **Three API tiers** for different storage lifetimes: - *Stack-local* (`fy_mapping()`, `fy_sequence()`, `fy_value()`): values live for the enclosing function scope; C11 `_Generic` dispatch selects the right conversion from native C types automatically - *Low-level* (`fy_sequence_alloca()`, `fy_mapping_alloca()`): caller controls all allocation - *Builder* (`fy_gb_sequence()`, `fy_gb_mapping()`): allocator-backed values that survive beyond the current function **Functional operations**: map, filter, reduce in serial and parallel forms (`fy_pfilter_lambda()`, `fy_pmap_lambda()`, `fy_preduce_lambda()`) via a built-in thread pool. **Document bridge**: `fy_document_to_generic()` / `fy_generic_to_document()` convert between YAML document trees and generic values. **Thread safety**: generics are immutable; concurrent reads are safe without locking. ### New: Reflection subsystem (`fy_reflection`) Schema-driven typed YAML ↔ C struct serdes driven by C type metadata. **Key types**: `fy_reflection` (type registry), `fy_type_info` (per-type descriptor), `fy_field_info` (per-field descriptor including offset, bitfield width, and YAML annotations). **YAML metadata annotations** in C source comments guide the mapping: ```c struct users { struct user *list; // yaml: { counter: count } int count; }; ``` **Two backends**: - *Clang backend* (`--with-libclang`): parses C headers at runtime; no pre-processing step - *Packed backend*: a self-contained binary blob pre-generated at build time via `fy_reflection_export_packed()`; zero runtime libclang dependency for deployment Full C type system coverage: structs, unions, enums, typedefs, pointers, arrays, bitfields, anonymous types, qualifiers. ### New: Python binding (`python-libfyaml/`) A Python package built directly on top of the generic runtime: - `FyGeneric` Python objects are lazy wrappers over C `fy_generic` values - Demonstrates the same dict/list/scalar data model as the C generics API - Shows how Python prototypes can migrate to C without changing the data model - Full test suite (`python-libfyaml/tests/`) and benchmark suite (`docs/benchmark-parse.py`) - API reference at `python-libfyaml/docs/API.md` ### New: Documentation - `doc/generics-guide.rst` — value model, schemas, lifetimes, functional operations - `doc/reflection-guide.rst` — typed serdes, libclang authoring, packed blob workflow - `doc/libfyaml-generics.rst` — generics API reference - `doc/libfyaml-reflection.rst` — reflection API reference - Reorganized documentation index and introduction ### New: Examples New examples in `examples/` covering the full alpha feature set: - `intro-generic-update.c` / `intro-reflection-update.c` — documentation introduction examples - `generic-literals.c` — Python-like data literals in C - `generic-transform.c` — parse, filter, map, reduce over generic values - `generic-lambda-capture.c` — lambdas with local variable capture - `generic-parallel-transform.c` — parallel filter/map/reduce with a thread pool - `generic-roundtrip.c` — schema-sensitive scalar typing (YAML 1.1 vs 1.2) - `generic-adoption-bridge.c` — C/Python data model parity demo - `reflection-libclang.c` / `reflection-packed.c` / `reflection-export-packed.c` — full reflection workflow See `examples/README.md` for the complete list and suggested reading order. ### Fixed (since v0.9.6) - `fix`: Folded scalars no longer emit a spurious trailing blank line in original mode - `parse`: Fix undefined behaviour in `streaming_alias_collection_state()` - `utf8`: Guard against NULL pointer in `fy_utf8_split_posix()` - Fix C11 atomics detection and buggy macros for C++ compatibility - Fix 32-bit build: remove stray parameter from `fy_skip_size32()` ### Statistics - 1198 files changed, 86 259 insertions since v0.9.6 - Generic runtime: ~10 000-line public API header - Reflection subsystem: ~2 000-line public API header - Python binding: complete package with tests and benchmarks ## [0.9.6] - 2026-03-15 ### Major: Public Header Split The monolithic `libfyaml.h` has been split into focused sub-headers under `include/libfyaml/`. The main header still exists and includes everything, so **existing code requires no changes**. Projects can now include only the sub-headers they need for faster compilation: - `libfyaml/libfyaml-core.h` — parser, emitter, document, node, path - `libfyaml/libfyaml-composer.h` — composer interface - `libfyaml/libfyaml-docbuild.h` — document builder - `libfyaml/libfyaml-allocator.h` — allocator API - `libfyaml/libfyaml-atomics.h`, `libfyaml-thread.h`, `libfyaml-util.h`, and more All gaps in the API documentation have been filled as part of this work. ### Added - `fy_node_sequence_sort()`: Sort a single sequence node's items using a custom comparator (mirrors `fy_node_mapping_sort()`) ### Changed - Public API hardened against NULL arguments throughout (`fy_token_*`, `fy_emit_*`, `fy_doc_*`) — fixes #252, #254, #255 - fy-tool: Usage text cleaned up and colorized on TTYs - Walk: Pathological YPath execution is now capped to prevent runaway resource use - Dedup allocator: Improvements for split entries and content tags - `indent_delta` refactored into atom layer for correctness ### Fixed **Emitter:** - Folded block scalar line breaks no longer get lost - Fix comment indentation loss for block sequences inside mappings - Fix memory leak in `fy_emit_mapping()` **Parser:** - Fix failure on empty merge key - Fix `fy_parser_event_resolve_hook_merge_key_start()` error path - Fix extent check in `fy_reader_fetch_flow_scalar_handle()` - Use `HAVE_LLVM_C_CORE_H` to detect LLVM (portability fix) **Walk (YPath):** - Cap pathological YPath execution to prevent runaway resource use - Guard numeric expression conversion against overflow **Document API:** - Avoid rehashing anchors during cleanup - Fix `fy_node_copy_to_scalar()` mess - Fix bogus condition in `fy_node_by_path_internal()` - Keep remove-by-key lookup nodes caller-owned **Threading:** - Fix threading bug triggered when thread count hits 64 **Build / Portability:** - cmake: Install canned man pages when Sphinx is not available - cmake: Respect `DESTDIR` when creating symlinks to fy-tool - cmake: Rework Windows CMake support for correctness - cmake: Fix docs build after public header move - windows: Fix compilation issues - build: Link libm in autotools builds - utils: Fix overflow implementations - `.gitattributes`: Mark all text files as LF-terminated ### Statistics - 49 commits since v0.9.5 - 3 issues closed (#252, #254, #255 — NULL argument hardening) - New contributor: jonathanrainer (`fy_node_sequence_sort`) ## [0.9.5] - 2026-02-26 ### Added - `fy_node_mapping_sort()`: Sort a single mapping's keys without recursing into children (exposed from internal) - `enum fy_collection_style` / `fy_token_collection_style()`: Query the style (block/flow) of a collection token - `fy_token_style_start_mark()` / `fy_token_style_end_mark()`: Get token start/end marks including style indicators - `fy_event_style_start_mark()` / `fy_event_style_end_mark()`: Get event start/end marks including style indicators - `fy_document_state_shorten_tag()`: Shorten a tag using the document state's tag directives - `FYEXCF_INDENTED_SEQ_IN_MAP`: New emitter flag to indent block sequences that are mapping values - `FYEXCF_PRESERVE_FLOW_LAYOUT`: New emitter flag to preserve oneline flow collections in streaming mode - fy-tool: `--indented-seq-in-map` command-line option - fy-tool: `--preserve-flow-layout` command-line option - Extensive fuzz-driven test suite covering parse, emit, walk, and document operations ### Changed - Atom text analysis reworked to introduce manual scalar variants for correctness - Token style markers introduced for more precise source location tracking - Walk set operations removed (dead code) - cmake: `CMAKE_EXPORT_COMPILE_COMMANDS` defaults to ON ### Fixed **Emitter:** - Preserve original indentation of top and bottom comments (was using scope indent instead of original column) - Allow comments before first entry of nested block mapping or sequence - Emit right-comments on flow collection end tokens - Emit top comments in mapping key prolog - Fix duplicate top comment emission in nested containers - Do not reflow oneline flow collections in original mode - Ensure block scalars are not chomped incorrectly - Do not allow illegal plain scalar in flow context - Handle root object with a tag correctly - Fix emitter output on starting tag with ANY flow style - Fix memory leak on emit error path - Fix indent delta calculations - Guard against writing NULL byte at buffer overrun **Parser:** - Correctly reject malformed directives: empty `%YAML`/`%TAG`, bare `%`, invalid tag handles - Require document start indicator where needed - Fix block scalar parsing errors when empty - Correctly reject invalid, partial, or zero bytes in input stream - Fix failure to parse empty block sequence items - Fix `fy_tag_scan` to work with bare tags - Fix leaking input reference on override comment - Do not take duplicate input reference when merging comments **Walk (YPath):** - Fix memory leak on error when executing an expression - Fix two use-after-free bugs on error paths for method calls - Fix mistrack of nodes after deep copy - Fix input ownership issues in `fy_node_by_ypath_result()` - Fix losing track of path execution context - Fix possible uninitialized variable - Better handoff handling; correct input ownership on error path - Ensure diagnostic token has `start.pos < end.pos` **Document API:** - Fix out-of-bounds access in `fy_node_by_path_internal()` - Fix `fy_node_vscanf()` scanning over `\0` - Fix `strtol` out-of-bounds read - `fy_document_load_node()`: clean up node on error - Do not detach accel structure prematurely on error - `fy_node_copy_internal()`: do not free on error path **Atom / Token:** - Correctly handle streams of single-quoted single-quotes - Fix potential out-of-bounds access - Fix size calculations when NEL linebreak is used - Fix NULL dereference - Call `iter_finish` on error in `fy_atom_format_text()` - Guard against error return value in `fy_token_format_text_length()` **UTF-8:** - Fix non-detected invalid 3-byte and 4-byte UTF-8 sequences **Comment:** - Fix double-free error on override comment **Portability / Build:** - Windows: Fix fragile `.def` file generation - cmake: Turn PIC on for the static library build - cmake: Use namespace check target for newer CMake versions - cmake: Replace `CMAKE_SOURCE_DIR` with `CMAKE_CURRENT_SOURCE_DIR` - cmake: Tighten ASAN flags - xxhash: Disable unaligned accesses when running under ASAN - Makefile.am: Fix broken distcheck - thread: Remove bogus assertion ### Statistics - 105 commits since v0.9.4 - Extensive fuzz-driven robustness improvements across parse, emit, walk, and document layers ## [0.9.4] - 2026-02-03 ### Major: Full Windows Support This release adds **full native Windows support**. libfyaml now builds and runs natively on Windows with MSVC, clang-cl, and Clang compilers. **Native Windows builds:** - Full support for building on Windows using MSVC, clang-cl, or GCC - Works with Visual Studio, VSCode, and other Windows development tools - All tests pass on Windows **Cross-compilation from Linux:** - Support for msvc-wine to install MSVC redistributables on Linux - Compile using `cl.exe` via Wine - Compile using `clang-cl` without Wine - Compile using Clang cross-compilation triplet ### Major: Comment Support Now Stable Comment parsing and emission has been moved out of experimental status. Comments can now be reliably preserved and manipulated through the API. ### Added - `fy_node_set_style()`: Set the style of a node (block, flow, plain, etc.) - Fixes #78 - `fy_token_set_comment()`: Attach comments to tokens programmatically - `fy_event_to_string()`: Convert events to string representation - `fy_diag_get_collect_errors()`: Query if error collection is enabled - `fy_atom_lines_containing()`: Get lines containing an atom (for diagnostics) - `fy_memstream`: Portable `open_memstream` alternative for cross-platform support - CMake-based CI workflow with improved matrix coverage - Emscripten platform detection for `endian.h` ### Changed - libclang now defaults to OFF (will be enabled when reflection features are ready) - Document start token is now preserved (may contain comments) - Walk methods now handle error paths more systematically - Removed non-existent experimental function declarations from `libfyaml.h` ### Fixed - **#193**: Token creation now properly clears memory to avoid undefined behavior on invalid input - **#186**: Reference loop nesting now respected when checking link validity - **#185**: Fixed crash when setting document root to NULL; also fixed input size clamping for corrupted input - **#184**: Walk memory leak fix with improved debugging infrastructure - **#183, #191**: Error out early on `FYECF_EXTENDED_CFG` with helper emit methods (prevents crash) - **#182**: Walk expression unref bug fix with debug infrastructure - **#181**: Walk double-free on node delete - **#178, #177**: Walk methods now handle error paths systematically (recursive alias resolution) - **#176**: Off-by-one error in `fy_accel_grow` - **#175**: Parser crash on corrupted UTF-8 at end of file - **#174**: Superfluous document end marker with explicit version/tag directives - **#173, #172**: Depth limit for node copy (prevents stack overflow under fuzzing) - **#143**: Document root now correctly marked as attached - Emit state now properly reset at end of document (fixes multi-document stream markers) - Flow quoting error on ANY style (test was backwards) - Empty file `fdopen` issue on some platforms - Empty stream `realloc(0)` undefined behavior - Removed jarring notice when alias is declared multiple times (valid YAML) ### Platform Support **Supported platforms**: Linux, macOS, FreeBSD, OpenBSD, NetBSD, and **Windows**. **Windows-specific:** - Full native MSVC support (32-bit and 64-bit) - clang-cl and Clang cross-compilation support - msvc-wine support for Linux-based Windows cross-compilation - Proper CRLF (DOS line ending) handling - Fixed 32-bit MSVC intrinsics (`_BitScanForward64`, `_BitScanReverse64`, `__popcnt64`) **Portability fixes:** - Fixed void pointer arithmetic (GCC extension) for strict C compliance - Fixed GCC ternary operator extension (`x ? : y` -> `x ? x : y`) - Fixed `\e` escape sequence (GCC/clang extension) -> `\x1b` - Fixed enum comparison warnings across platforms - Align mremap initial size to page boundary (fixes BSD crashes) **macOS:** - Fixed ASAN support (requires `-fsanitize=address` at link time) - Added extra ASAN flags for Apple's clang (alloca poisoning disabled) **CI/Build:** - New CMake-based GitHub Actions workflow - Improved build matrix coverage - Fixed distcheck breakage ### Internal - Walk expression debug infrastructure for easier debugging - Portable `fy_memstream` wrapper for `open_memstream` - Use `fy_align_alloc/free` wrappers in allocator - Fixed allocator `get_caps` return type (enum, not int) - Atomic counter function instead of macro - General warning cleanup pass ### Statistics - 58 commits since v0.9.3 - 18 bug fix issues closed - Full Windows platform support added ## [0.9.3] - 2026-01-14 ### Added - fy-tool: `-winf` option for infinite width output - fy-tool: `--no-output-newline` option (useful with oneline mode) - Emitter: `FYEXCF_OUTPUT_FILENAME` extended option for direct file output ### Changed - JSON emit mode now works like YAML flow mode (less special-casing) - Compact emit mode now produces truly compact output (no indentation) - Emitter only changes plain scalar style when space or linebreak is present (preserves numeric scalars better) ### Fixed - **#170**: Wrong length return when buffer ends mid UTF-8 sequence - **#167**: Oneline styles now correctly use infinite width - **#139**: Walk path parser now always creates diagnostics (fixes token reference leak) - **#137**: Walk memory leak on parse error path - **#136**: Walk memory leak when no output is generated - **#131**: Walk memory leak when expression error occurs - Composer: Memory leak when back-to-back complex keys exist - Emitter: Broken flow mode output - Emitter: Unnecessary plain scalar style changes ### Platform Support **Supported platforms**: Linux, macOS, FreeBSD, OpenBSD, and NetBSD. - **NetBSD**: Disabled mremap (different semantics than Linux) - **NetBSD**: CMake shared libraries now correctly built with -fPIC - **NetBSD**: Only include alloca.h if it exists - **NetBSD**: Fixed ctype(3) argument casting (unsigned char) - **GNU/Hurd**: Use `` for endianness detection - Use `getopt_long` instead of `getopt_long_only` for portability - Fix test(1) operator in test suite (use POSIX `=` not bash `==`) - Fix `-Wformat` warning (use PRIx64 for uint64_t) ### Statistics - 25 commits since v0.9.2 - 6 bug fix issues closed ## [0.9.2] - 2025-12-29 ### Fixed - **#156**: automake: Respect --disable-static and don't build internals - **#157**: dist tarball now includes the missing CMake files ## [0.9.1] - 2025-12-28 ### CRITICAL: Licensing Change **GPL Code Removed - Library Now Fully MIT Licensed** Replaced GPL-licensed list implementation with clean-room MIT-licensed minimal implementation. The entire library is now consistently MIT licensed without any GPL components. This is a major change for users requiring permissive licensing for commercial or proprietary projects. ### Added - Thread-safe lockless allocator infrastructure (linear, malloc, mremap, dedup, auto) - Parser checkpointing API: `fy_parser_parse_peek()`, `fy_parser_skip()`, `fy_parser_count_sequence_items()`, `fy_parser_count_mapping_items()` - Public composer and document builder interfaces - YPath set operators: `@` for inclusion, `!` for exclusion - Compact emitter formats (flow and JSON) - `fy_emit_body_node()` for emitting single nodes without stream/doc events - `fy_event_report()` methods for error diagnostics in composer interface - `fy_node_get_tag0()` and `fy_node_get_tag_length()` tag utility methods - `fy_node_delete()` method for explicit node removal - `fy_allocator_contains()` for pointer containment checks - `fy_event_get_type()` convenience wrapper - CMake documentation build targets (doc-html, doc-latexpdf, doc-man) - Cross-compilation support for both CMake and autotools build systems - Optional libclang dependency detection for type-aware features - `--enable-static-tools` configuration option - `examples/` directory with library usage examples - Comprehensive allocator and parser tests ### Changed - **fy-tool now uses streaming mode by default** for dump operations (up to 24x faster on large files: 105MB in 0.776s vs 18.3s; document mode available via `--no-streaming`) - Emission performance improved up to 2x through token analysis optimization - UTF-8 handling significantly faster - Plain scalar parsing and fetch reworked for better performance - fy-tool no longer wraps output when stdout is not a TTY - fy-tool now properly calls `fy_shutdown()` at exit for clean valgrind runs - CMake build system now at feature parity with autotools - Stream YAML version handling now per-stream (not per-document) - Split diagnostics into separate modules by type - Reorganized fy-tool directory structure - Renamed `alloca_vsprintf` to `fy_vsprintfa` - Improved block scalar end linebreak and whitespace handling ### Fixed - **#133**: Segmentation fault in `fy_reader_*` when all input processed - **#135**: Use-after-free when document acceleration fails - **#134**: Double-free in `fy_node_setup_path_expr_data` - **#132**: Use-after-free after document resolution - **#123**: Crash when assertions compiled out in release mode - **#122**: Crash when addressing expression as node incorrectly - **#120**: Crash on error during walk evaluation - **#119**: Segmentation fault on garbage input in `evaluate_new()` - **#118**: Segmentation fault when block scalar indicators last in input - **#115**: Assertion preventing node deletion via `fy_document_insert_at()` - **#107**: Crash when comparing mappings with NULL values - **#102**: Portability crash on NEC Aurora (enums in bitfields) - Infinite loop in scan directive for malformed UTF-8 input - Use-after-free in auto allocator (sub-allocator freeing order) - Use-after-free in anchor setup before resolution - Composer halt teardown event pumping - Document state lifecycle in presence of errors - Parser reset queued inputs initialization - Blank/whitespace-only scalar creation via emit event API - Zero-length scalars as plain mapping keys - Prefix-only tags passing scan validation - Plain scalars with linebreaks creation - Pretty mode document end marker forcing - MacOS `LIST_HEAD` warning and linker options - Numerous compiler warnings at high optimization levels - Testsuite failures with latest jq versions ### Performance - fy-tool: Up to 24x faster on large files (streaming mode by default) - Emission: ~2x faster (optimized plain scalar token analysis) - Parsing: Faster plain scalar fetch with inline specialization - UTF-8: Significantly improved validation and processing speed ### Internal - New atomic helpers (fy-atomics) based on C atomics with fallbacks - fy-shutdown mechanism for library cleanup - FY_IMPOSSIBLE_ABORT() macro for impossible conditions - Variable size encoding header (fy-vlsize) - CPP varargs macros for recursive expansion - iovec copy/from/xxhash methods - FY_LAMBDA define for lambda support detection - Enhanced blob infrastructure - Improved utility functions (overflow checks, alloca sprintf, constructors) ### API Compatibility - **Minor breakage**: Added `minimum_bucket_occupancy` to dedup allocator config (no known external users affected) - **Behavioral change**: fy-tool now defaults to streaming mode instead of document mode (24x faster, but loses forward anchor references and strict duplicate key checking; use `--no-streaming` for old behavior) - All other changes are backwards compatible additions ### Contributors Pantelis Antoniou, Alessandro Astone, Kevin Wooten, Henry Qin, Roland Wirth, Yurii Rashkovskii, Alexandre Detiste, Benjamin Rodenberg, Jose Luis Blanco-Claraco, Andrey Somov, Orange_233, Martin Diehl ### Statistics - 171 commits since v0.9 - 12 bug fix issues closed - 12 contributors ## [0.9] - 2023-09-28 Initial public release with comprehensive YAML 1.2 support. [1.0.0-alpha6]: https://github.com/pantoniou/libfyaml/compare/v1.0.0-alpha5...v1.0.0-alpha6 [1.0.0-alpha5]: https://github.com/pantoniou/libfyaml/compare/v1.0.0-alpha4...v1.0.0-alpha5 [1.0.0-alpha4]: https://github.com/pantoniou/libfyaml/compare/v1.0.0-alpha3...v1.0.0-alpha4 [1.0.0-alpha3]: https://github.com/pantoniou/libfyaml/compare/v1.0.0-alpha2...v1.0.0-alpha3 [1.0.0-alpha2]: https://github.com/pantoniou/libfyaml/compare/v1.0.0-alpha1...v1.0.0-alpha2 [1.0.0-alpha1]: https://github.com/pantoniou/libfyaml/compare/v0.9.6...v1.0.0-alpha1 [0.9.6]: https://github.com/pantoniou/libfyaml/compare/v0.9.5...v0.9.6 [0.9.5]: https://github.com/pantoniou/libfyaml/compare/v0.9.4...v0.9.5 [0.9.4]: https://github.com/pantoniou/libfyaml/compare/v0.9.3...v0.9.4 [0.9.3]: https://github.com/pantoniou/libfyaml/compare/v0.9.2...v0.9.3 [0.9.2]: https://github.com/pantoniou/libfyaml/compare/v0.9.1...v0.9.2 [0.9.1]: https://github.com/pantoniou/libfyaml/compare/v0.9...v0.9.1 [0.9]: https://github.com/pantoniou/libfyaml/releases/tag/v0.9