Repository navigation
build(deps)!: move to fig 7 and twig 6 - #12
Merged
Merged
Conversation
fig 6 made every format a language a program registers and took
embedding out of fig; fig 7 and twig 6 are both pure Rust, and twig 6
took embedding in, as `twig::meta`, behind its default `fig` feature.
- `prov_graph::MetaFormat` (Yaml, Json, Toml, Figl) is prov's closed
name for the four metadata languages, in place of `fig::Format`,
which is a per-process handle now. It turns into fig's handle,
registering the language crate, only where fig parses or prints.
- A document's frontmatter is located by twig, and `MetaCarrier::Fenced`
carries its `MetaFormat` where it carried fig's `EmbedType`.
`MetaEditor` edits through `twig::meta::Embed`; `reformat_block` and
`retype_block` (convert's re-fence) write the block themselves, since
twig has no retype yet.
- `EmbedStyle` is `Delimited` or `Separate`. `CodeBlock`, `HtmlScript`
and `HtmlCode` are gone with the archetypes twig does not read.
- The per-format features (`yaml`, `json`, `toml`, `fig-lang`) are gone:
twig's `fig` feature compiles all four in, and with no Zig left there
was nothing for them to trim. CI, the release workflow and the flake
stop installing Zig.
- fig-schema comes from git until its fig 7 release is on crates.io.
Behavioural-change: Only frontmatter is read as metadata: `---` YAML,
`+++` TOML and `---<lang>` (`---json`, `---toml`, `---figl`, `---fig`).
A document whose metadata is a `;;;` JSON block, a fenced code block
(```` ```yaml ````, ```` ```fig ````, ```` ```endmatter ````), or an
HTML `<script>` or `<pre><code>` island reads as having no metadata,
its whole text the body. Convert such a document before upgrading.
Behavioural-change: New JSON frontmatter is written `---json` … `---`,
where it was `;;;` … `;;;`, and new figl frontmatter `---figl` … `---`,
where it was a ```` ```fig ```` block. `metadata.format: json` with
`embed: delimited` therefore writes `---json`, and `metadata.format:
figl` with `embed: delimited`, refused before, is accepted.
Behavioural-change: `metadata.embed: code_block`, `html_script` and
`html_code` are no longer values: a config naming one reads as the
default (`delimited`), with the config finding an unknown value gets,
and `prov init --embed` no longer offers them.
Behavioural-change: `prov init --content djot` and `--content html`
default to `--embed separate`. They defaulted to a fenced code block
and an HTML `<script>` island, which are gone; a leading `---` would
read as a thematic break to a Djot renderer and as text to a browser.
Behavioural-change: figl is spelled `figl`: `metadata.format` is
written `figl` (`fig` still reads), `prov init --meta` and `prov meta
--format` take `figl` (and `fig` as an alias), and `prov about`
calls the language figl.
Behavioural-change: Removing a key from a YAML list item leaves the
item's next key at the item's head (`- title: Gone`) where fig 5 kept
its indent, and a mapping spliced into a figl list is written in flow
form (`[{content=/a.svg …}]`). The values are unchanged.
This was referenced Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves prov from fig 5 / twig-doc 4 to fig 7 / twig-doc 6. fig 6 moved embedding out of fig and into twig, so this is a redesign of how prov reads and writes a document's metadata block, not just a version bump.
Design decisions
---YAML,+++TOML and---<lang>(---json,---toml,---figl, and---figstill reads). twig locates the block (twig::meta), andMetaEditoredits throughtwig::meta::Embed.;;;JSON blocks, fenced code blocks (including```endmatter), and HTML<script>/<pre><code>islands are no longer read. A document using one of them reads as having no metadata.EmbedStyleis now justDelimited | Separate.prov_graph::MetaFormat { Yaml, Json, Toml, Figl }replacesfig::Formatacross the API. fig 7'sFormatis a handle looked up by name, not an enum.MetaFormat::fig()converts to that handle, registering the language on first use.yaml,json,toml,fig-lang). twig'sfigfeature always builds all four languages, and with no Zig left there was nothing for the features to trim. xtask's package-isolation list changes to match.figl: inmetadata.format, in new fences, and in CLI flags.figis still accepted when reading.reformat_block/retype_blockwrite the fences themselves (---,+++,---json,---figl), because twig has no retype yet. An empty JSON body doesn't parse, so a new---jsonblock starts with{}.init --content djot|htmlnow defaults to--embed separate. The old defaults (a fenced code block and a script island) are gone, and a leading---reads as a thematic break in Djot and as visible text in a browser.ci.yml,homebrew.yml,flake.nix, the README and getting-started.Blockers before merge
version = "0.5". The flake setsallowBuiltinFetchGitfor that git dependency; drop it at the same time.Behavioural changes
These are listed as
Behavioural-change:trailers on the commit. In short:---json, and new figl frontmatter---figl;code_block,html_scriptandhtml_codeare no longer accepted asmetadata.embedvalues;initnow default toseparate;figl;Checks
All pass locally:
cargo fmt --checkcargo clippy --workspace --all-targets -D warningscargo test --workspace(all 46 targets)cargo xtask package-isolation