edgedb-js
edgedb-js copied to clipboard
Error visibility in query file generation
Describe the proposed feature A clear and concise description of the syntax, what you want to happen, and why it's needed.
Query files generated from @edgedb/generate queries seem to generate in alphabetical order. With several hundred queries, any errors from the particular file you're iterating on are buried somewhere in pages of output. It would be helpful if errors could somehow be surfaced at the bottom of the output. Maybe in conjunction with https://github.com/edgedb/edgedb-js/issues/865, write all the output for successful queries first and then all errors at the end.
I have a crazy idea: what if the output was TAP? That way users would be able to use one of the many TAP reporters to format the output here? Then you could also have a different output format for CI, etc.
Feels like a bit of a stretch to use a testing-specific format for this, but when I was thinking about this problem from a data structure perspective (({ path } | { path, error })[]) it started to look suspiciously like TAP.
Wasn't familiar with TAP but indeed that data structure sounds exactly right!