Skip to content

Conversation

@embray
Copy link
Collaborator

@embray embray commented Jan 15, 2026

Spent a little time over the holidays adding more tests and improving overall coverage. Fixed a few bugs in the process and added new log-formatting features to boot.

…lternate file stream

refactor: allow passing log config through to the parser

test: add test for trace logging of parser events

fix: fix output of YAML scalar events that could potentially overflow

fix: fix printing of filename in logs when the library is built in a
build subdirectory (strip leading ../)
type of the value so it doesn't have to be re-inferred from the raw
fy_node

test: improve test coverage on value.c
Not as flexible as a custom formatter but that's not a path I want to
bother going down right now.

test: fixes the logging test to not include line numbers in the expected
log output considering what a pain in the ass that would be to maintain
… in some pathologically formatted files

test: increase test coverage--these tests exposed some of these bugs
not really noted as a "feature" yet since it's undocumented
@embray
Copy link
Collaborator Author

embray commented Jan 15, 2026

According to git bisect, 17d1a6b introduced a memory leak, though it's not clear to me how. That or it simply exposed one that was already there.

Update: Oh, I just forgot that asdf_parser_parse doesn't automatically free allocated events. Only asdf_event_iterate does that. Should use that instead.

use asdf_event_iterate instead of asdf_parser_parse; the latter is
lower-level--it just parses until the next event and returns the event;
asdf_event_iterate is basically the same but it automatically frees the
previous event on each call
@embray
Copy link
Collaborator Author

embray commented Jan 16, 2026

Wanted to see if I could build coverage reports in the CI but had some trouble. For now I'd like to just get this merged for the fixes it includes and can come back to the CI question later.

@embray embray merged commit 3fe832c into main Jan 16, 2026
12 checks passed
@embray embray deleted the coverage branch January 16, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants