quarto-dev / quarto-dev/quarto-cli

YAML error messages are inconsistent across format boundaries

オープン
#369 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

@cscheid がすでに取り組んでいます。

2022年2月28日 から。

enhancement yaml-validation
主要言語
JavaScript
スター
6k
フォーク
458
平均マージ
1日 9時間
マージ済み PR(30日)
41

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。