quarto-dev / quarto-dev/quarto-cli

YAML error messages are inconsistent across format boundaries

Abierto
#369 2 comentarios 0 reacciones 1 asignado Ver en GitHub

@cscheid ya está trabajando en esto.

Desde el 28/2/2022.

enhancement yaml-validation
Lenguaje dominante
JavaScript
Estrellas
6k
Forks
458
Merge medio
1 d 9 h
PR fusionados (30 d)
41

Descripción

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:

  1. disabled for the format they're rendering on
  2. 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.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.