Repository navigation
Collect all element errors in YAML sequences (honoring rfl::FailFast) - #43
Closed
clockblocker wants to merge 1 commit into
Closed
clockblocker wants to merge 1 commit into
clockblocker wants to merge 1 commit into
Conversation
This was referenced Nov 25, 2026
clockblocker
force-pushed
the
yaml-error-source-locations
branch
from
November 25, 2026 11:39
fdea5d6 to
a7e7ccd
Compare
clockblocker
force-pushed
the
yaml-sequence-error-aggregation
branch
2 times, most recently
from
November 25, 2026 12:06
0278569 to
b6856f7
Compare
clockblocker
force-pushed
the
yaml-error-source-locations
branch
from
November 25, 2026 12:06
a7e7ccd to
3e01422
Compare
clockblocker
changed the base branch from
yaml-error-source-locations
to
wave-base-13
November 25, 2026 12:07
clockblocker
force-pushed
the
yaml-sequence-error-aggregation
branch
from
November 25, 2026 12:08
b6856f7 to
44034c7
Compare
Update rfl::yaml::Reader::read_array to continue past failing elements and aggregate all element errors via to_single_error(), matching object field error aggregation while stopping at the first error under rfl::FailFast. Track num_failed_ only on the error path in VectorReader (keeping zero extra instructions on the std::vector happy path for JSON and binary formats), guard std::inplace_vector against emitting duplicate capacity errors on excess elements, and track num_failed_ alongside num_set_ in ArrayReader and TupleReader so indices stay accurate and partial destruction remains safe.
clockblocker
force-pushed
the
yaml-sequence-error-aggregation
branch
from
November 25, 2026 12:10
44034c7 to
930c3db
Compare
clockblocker
force-pushed
the
wave-base-13
branch
from
November 25, 2026 12:10
3e01422 to
cbc8ed8
Compare
Owner
Author
|
Branch is preserved on |
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.
Part 2 of 4 (split from #40; stacked on #42).
Summary
rfl::yaml::Reader::read_arrayto collect all failing sequence element errors viato_single_error()(stopping at the first error whenrfl::FailFastis passed), matching object field error aggregation.num_failed_only on the[[unlikely]]error path inVectorReader(keeping zero extra instructions on thestd::vectorhappy path for JSON/binary formats) and guardsstd::inplace_vectorso excess elements report a single capacity error rather than spamming duplicates.num_failed_alongsidenum_set_inArrayReaderandTupleReaderso error indices stay accurate and partial destruction remains safe.docs/content/processors.md(underrfl::FailFast) anddocs/content/supported_formats/yaml.md, and adds sequence aggregation,FailFast, and container tests intests/yaml/test_error_details.cpp.Why YAML first?
Human-authored YAML config files benefit most from seeing all invalid list entries (with line/column locations) in a single pass. Preparing
VectorReader,ArrayReader, andTupleReaderwith zero-overhead happy-path error-index tracking allows other formats (such as JSON or TOML) to opt in incrementally in follow-up PRs without changing existing fast-format behavior today.Verification
-DREFLECTCPP_BUILD_SHARED=ON -DREFLECTCPP_JSON=ON -DREFLECTCPP_YAML=ON -DREFLECTCPP_STRICT_WARNINGS=ONwith-fvisibility=hidden): 631/631 passed, plus C++20/C++23 header checks.