Repository navigation
Fix XML get_field_from_array index increment and write() indent forwarding - #800
Open
clockblocker wants to merge 1 commit into
Open
clockblocker wants to merge 1 commit into
clockblocker wants to merge 1 commit into
Conversation
This was referenced Nov 27, 2026
clockblocker
added a commit
to clockblocker/reflect-cpp
that referenced
this pull request
Nov 29, 2026
… forwarding Fixes two bugs in `rfl::xml`: 1. `rfl::xml::Reader::get_field_from_array` never incremented `i` in its sibling loop, causing any `_idx > 0` to always fail out-of-bounds (also fixes the `"of of bounds."` typo). 2. `rfl::xml::write(obj, _indent)` dropped `_indent` when forwarding to the `std::ostream&` overload. Upstream PR: munich-data-engineering#800
clockblocker
added a commit
to clockblocker/reflect-cpp
that referenced
this pull request
Nov 29, 2026
… forwarding Fixes two bugs in `rfl::xml`: 1. `rfl::xml::Reader::get_field_from_array` never incremented `i` in its sibling loop, causing any `_idx > 0` to always fail out-of-bounds (also fixes the `"of of bounds."` typo). 2. `rfl::xml::write(obj, _indent)` dropped `_indent` when forwarding to the `std::ostream&` overload. Upstream PR: munich-data-engineering#800
clockblocker
added a commit
to clockblocker/reflect-cpp
that referenced
this pull request
Nov 30, 2026
… forwarding Fixes two bugs in `rfl::xml`: 1. `rfl::xml::Reader::get_field_from_array` never incremented `i` in its sibling loop, causing any `_idx > 0` to always fail out-of-bounds (also fixes the `"of of bounds."` typo). 2. `rfl::xml::write(obj, _indent)` dropped `_indent` when forwarding to the `std::ostream&` overload. Upstream PR: munich-data-engineering#800
clockblocker
force-pushed
the
fix-xml-array-and-indent
branch
from
December 1, 2026 06:05
1cd25fa to
46eecd7
Compare
clockblocker
added a commit
to clockblocker/reflect-cpp
that referenced
this pull request
Dec 1, 2026
… forwarding Fixes two bugs in `rfl::xml`: 1. `rfl::xml::Reader::get_field_from_array` never incremented `i` in its sibling loop, causing any `_idx > 0` to always fail out-of-bounds (also fixes the `"of of bounds."` typo). 2. `rfl::xml::write(obj, _indent)` dropped `_indent` when forwarding to the `std::ostream&` overload. Upstream PR: munich-data-engineering#800
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Two one-line bugs affect basic
rfl::xmlhelpers:rfl::xml::Reader::get_field_from_arraynever increments its sibling indexi, so reading any element past index0always fails with an out-of-bounds error (with an"of of bounds."typo).rfl::xml::write(obj, indent)forwards to thestd::ostream&overload without passing_indent, silently falling back to the default 4-space indentation.Summary
iinrfl::xml::Reader::get_field_from_arrayand fixes the"of of bounds."typo to"out of bounds."._indentfrom the string-returningrfl::xml::writeoverload to the stream-based overload.Testing
clockblocker/refl-cpp-workbench/queue-tests/xml/test_array_and_indent_fix.cppcovering multi-element array indexing, out-of-bounds error reporting, custom 2-space indentation, and compact ("") XML output (kept out of the PR diff to keep it minimal; happy to pull them in if preferred).