quarto-dev / quarto-dev/quarto-cli
YAML error messages are inconsistent across format boundaries
@cscheid is already working on this.
Since Feb 28, 2022.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
When reporting an error message of a validation failure, we use information that belongs to a "different format".
Because we were working hard to minimize the number of total schemas (given the compile-time and file-size constraints we had with AJV), we decided on tagging fields with the formats they're enabled, but not the schemas. As a result, schemas tend to be not exactly what users expect, and this interacts badly with validation.
If someone makes a typo on an object key, it's possible that they will accidentally land on a field that is:
- disabled for the format they're rendering on
- but has a schema that is wildly different than what they're expecting
Because of 1), they get no completions to warn them of the typo they just introduced, and are unlikely to realize that the lack of completions is indicative of the typo. Because of 2), our validation infrastructure will yell at them.
The outcome of all of this are Dreaded Misleading Validation Errors.
This kind of problem will become more important the more we lean on validation/autocompletion as the teaching mechanism for users.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.