Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small changes regarding fy-tool's new --tsv-format #71

Open
ingydotnet opened this issue Feb 13, 2023 · 0 comments
Open

Small changes regarding fy-tool's new --tsv-format #71

ingydotnet opened this issue Feb 13, 2023 · 0 comments

Comments

@ingydotnet
Copy link

Currently to use fy-tool --tsv-event you also need --testsuite.

When I asked for the tsv output, it had nothing to do with the test suite, even
though that output is also one event per line.

The purpose of tsv was for writing a loader/composer using fyaml by just
reading stdin rather than needing to do a formal C binding.
This could be useful for all sorts of things, and honestly we might do well to
make this into a separate binary called bin/yaml-parse-events at some point.

Also it's a bit wrong to have --testsuite as the option for events formatted
for testing with the suite. In the future we will likely have other tests in
the suite besides parse events.

My suggestions at this point would be:

  • --mode=events-tsv
  • --mode=events-testsuite

You can keep --testsuite as an alias for --mode=events-testsuite.


I'd also like the events-tsv output to add a =ERR output line when a parse
error occurs. It should contain the line position numbers and the error
message.

That way a loader built over it could handle/format the error as it sees fit.
This would be cleaner than the loader having to capture an actual parse error
from fy-tool.

Note: This =ERR should not be added to the events-testsuite output.

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

No branches or pull requests

1 participant