quarto-dev / quarto-dev/quarto-cli

YAML error messages are inconsistent across format boundaries

Aperta
#369 2 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@cscheid ci sta già lavorando.

Dal 28/2/2022.

enhancement yaml-validation
Lingua principale
JavaScript
Stelle
6k
Fork
458
Merge medio
1g 9h
PR unite (30g)
41

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.