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

未关闭
#1,177 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
72/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
json, rust
领域
documentation

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Rust
星标
302
派生
22
平均合并
5 小时 2 分钟
30 天内合并 PR
213

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

quarto-dev/q2 的其他 Issue

查看 quarto-dev/q2 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。