Repository navigation
Conversation
Signed-off-by: Roman Ondráček <mail@romanondracek.cz>
Roman3349
force-pushed
the
report-errors-and-version
branch
from
December 3, 2026 00:16
df4051c to
3532962
Compare
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.
The harness was compiled without
VALIJSON_USE_EXCEPTIONS, so valijson calledabort()whenever it could not parse a schema, for example when a reference cannot be resolved. As the harness did not catch exceptions either, a single such test case terminated it, and Bowtie then reported the other test cases of the same run as errored as well. On the current report, 22 test cases are errored for each of draft 4 and draft 7, of which only three are actual failures of valijson; the others, such as those forif/then/elseanditems, pass when run on their own.Changes
-DVALIJSON_USE_EXCEPTIONS=1, and report an exception thrown while parsing the schema or validating an instance as an error for that test case, with its message as context. This also enables theregexformat, which valijson only enforces when exceptions are enabled.RAPIDJSON_ASSERTto throw rather than to abort.VALIJSON_VERSIONbuild argument, and report it as the implementation version, which the report currently shows as unknown. The harness previously built whichever commit was onmasterwhen the image happened to be rebuilt.SchemaParser::kDraft3.Testing
Ran the test cases of the latest JSON-Schema-Test-Suite through the harness with the Bowtie protocol, restarting it after a crash, against valijson 1.1.5:
The test case "anchor within remote ref" is now reported as errored, instead of terminating the harness. The two remaining crashes, for tag URIs and URIs with arbitrary schemes, are stack overflows in valijson that cannot be caught, and are fixed by tristanpenman/valijson#271, which is not released yet.
The Docker image builds, reports version 1.1.5 and the three dialects, and answers a test case with an unresolvable reference with an error.