Skip to content

build(deps)!: move to fig 7 and twig 6 - #2

Merged
adammharris merged 1 commit into
mainfrom
cc/modest-mendel-tw57ql
Oct 16, 2026
Merged

adammharris merged 1 commit into
mainfrom
cc/modest-mendel-tw57ql

Conversation

@adammharris

Copy link
Copy Markdown
Member

Moves provui to the new stack: prov main (fig 7, twig 6), flower main (fig 7, fig-schema 0.5), and leaf's twig 6 port. The build now has one fig 7.0.0, one twig-doc 6.0.0, one fig-schema 0.5.0 and one leaf-core (cargo tree -d).

Before merging

Two temporary lines in Cargo.toml to undo:

  1. leaf-core and leaf-ratatui point at branch = "cc/modest-mendel-tw57ql", the branch of build(deps)!: move to twig 6 leaf#11. After that merges, set both to branch = "main", remove the TEMPORARY comments, and run cargo update -p leaf-core -p leaf-ratatui.
  2. fig-schema patch. A [patch."https://github.com/diaryx-org/fig-schema"] block at the bottom maps prov's git fig-schema onto 0.5 from crates.io, because prov main still takes it from git while flower uses crates.io. After build(deps): take fig-schema 0.5 from crates.io prov#14 merges, delete that block and run cargo update -p prov.

Changes

  • Dependencies: fig = "7" (was 5). prov and flower are updated on main.
  • ProvBackend:
    • set_body no longer uses fig 5's Embed::replace_body, which is gone. It keeps the text through the closing fence (located with prov::Document::split) and puts the new body after it. New test.
    • The with_fig! macro is replaced by fig_editor/fig_editor_mut, which reach fig's editor through twig's Embed or prov's whole-file editor.
  • session.rs: the headings outline converts leaf's own Format with .twig().
  • Config schema: the metadata.embed picker offers only delimited and separate. metadata.format is now a closed choice of yaml, json, toml and figl. It used to be open only because prov's format features were optional.
  • Tests: fixtures include prov's new FieldSpec.payload and Term.also_reads fields, and the JSON-comments test uses ---json.
  • No more Zig: removed from CI, .config/ship.figl comments and the README.

Behavioural changes

Also recorded as Behavioural-change: trailers on the commit.

  • Metadata blocks: a document whose metadata is a ;;; JSON block, a fenced block or an HTML island opens with no metadata, and its whole text is the body. This matches prov.
  • Config schema: it no longer offers code_block, html_script or html_code. It offers figl in place of fig, and flags any metadata.format outside yaml, json, toml and figl.

Checks

Every job in .config/ship.figl passes locally:

  • fmt
  • clippy (-D warnings)
  • test
  • docs
  • package-isolation
  • MSRV 1.88

Generated by Claude Code

prov, flower and leaf have all moved to fig 7 and twig 6, which are pure
Rust and keep embedding in twig (`twig::meta`) rather than fig. provui
names fig directly and sits on all three, so it moves with them, onto one
fig, one twig and one fig-schema.

- fig 5 -> 7. `ProvBackend::set_body` no longer goes through fig's
  `Embed::replace_body`, which is gone: it keeps the text up to the end
  of the block's closing fence, as prov's `Document::split` finds it, and
  puts the new body after it. The comment ops reach fig's editor through
  prov's `MetaEditor`, whose fenced arm is twig's `Embed` now.
- leaf comes from its twig 6 branch (`cc/modest-mendel-tw57ql`,
  diaryx-org/leaf#11) until that merges; the headings outline converts
  leaf's own `Format` to twig's handle.
- fig-schema is patched to crates.io 0.5 for as long as prov's `main`
  takes it from git and flower from crates.io; otherwise the two
  `FieldType`s are different types.
- The config schema offers what prov reads now: `metadata.embed` is
  `delimited` or `separate`, and `metadata.format` is a closed
  yaml/json/toml/figl, since no prov build lacks a format any more.
- CI and the README stop installing and mentioning Zig.

Behavioural-change: A document whose metadata is a `;;;` JSON block, a
  fenced code block, or an HTML `<script>`/`<pre><code>` island opens
  with no metadata, its whole text the body; only `---`, `+++` and
  `---<lang>` frontmatter is read, as in prov.
Behavioural-change: The config schema no longer offers `code_block`,
  `html_script` or `html_code` for `metadata.embed`, and offers `figl`
  where it offered `fig` for `metadata.format`, which is now a closed
  choice: a value outside yaml/json/toml/figl is flagged.
@adammharris
adammharris merged commit 18799b6 into main Oct 16, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant