Fork me on GitHub

@metasoarous Testing vega2pdf with invalid files means it produces simply invalid (empty) output. It doesn't validate its input nor does the vega-cli stuff ship with a validator. So vegan, which both provides a validator and always validates its input before it renders it has that advantage...Seems like validating vega is a thing that team doesn't give a care about. So one difference that may actually make a big difference in a production offline rendering workflow is you would actually see errors. I tried validating some invalid files with jsonlint (it can't handle the actual vega-lite schema) for instance and this seems a tough road. The vega editor uses ajv for validation (as does vegan)...


@chris441 Interesting... You said they don't seem to care about validation; Have you seen them reject proposals in this direction, or are you inferring from lack of a feature like this presently? I've generally found the Vega team super receptive to suggestions, but if they're not open to that, it would certainly be some motivation for continuing to put energy into Vegan.


I haven't seen it worked into their system at a meaningful level. So that is what I mean about caring about validation. Fundamentally, I would expect it as an optional step in either compile or parse or both.


I'm pretty sure the way this works is, if you have a schema reference in your spec, it will validate your spec otherwise it skips that step


At least using vg2pdf, an invalid file (with a schema) causes an empty pdf with no command line warnings or output of any kind. The only validation I have found in their system is built into their editor as a separate step using ajv. Here is the file for reference:


Especially considering how confusing or opaque the errors are at those levels when some things go down wrong.

✔️ 1

But you are exactly right on the intent, my next move should be to file a very polite issue and see what happens.

👍 1