Document `.quarto-source.yml` as a format other tools can rely on

Aperta
#1,177 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
json, rust
Ambito
documentation

Direzione di ricerca

Start by reading the SourceRecord struct and the user guide line that describes .quarto-source.yml; the issue does not give their file paths. Document each field, version handling, preservation of unknown keys, and the specified hash rules, then add a JSON Schema beside the specification. Done means another tool can follow the documented contract and validate records against the schema.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description
Context

q2 add writes .quarto-source.yml next to each extension.
Today the format lives in the SourceRecord struct and one line of the user guide.

Other tools can work with the same file.
The development version of Quarto Wizard, the VS Code extension for Quarto extensions, already writes it in the q2 format, so that an extension installed by one tool can be updated by the other.
To follow the format, it has to read the q2 source.

Proposal

Publish a short specification of the record, with a JSON Schema next to it.
It would cover:

  • each field and what it means;
  • the schema version policy: what bumps it, and what a reader does with a newer one;
  • the rule for keys a tool doesn't know: kept as they are on rewrite;
  • the hash rules: sha256 of the bytes of each file as they are on disk, / paths relative to the extension folder, the record itself left out.
Why

Without a written contract, every other tool has to guess, and a change in q2 can break it without notice.
The two following come from that gap:

Benefits

People using q2 can mix tools on one project: install from the command line, update from the editor, or the other way round.
Local edit detection keeps working whichever tool wrote the record.
Tools such as Quarto Wizard can validate against the published schema and follow its changes.
A future official q2 extension for Positron and VS Code could rely on the same specification.
A future q2 update gets a stable base too.

Lingua principale
Rust
Stelle
302
Fork
22
Merge medio
5h 2m
PR unite (30g)
213

Preparare l'ambiente

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.

Altre issue di quarto-dev/q2

Tutte le issue di quarto-dev/q2

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.