Skip to content

build(deps)!: move to fig 7 - #1

Merged
adammharris merged 1 commit into
masterfrom
cc/modest-mendel-tw57ql
Oct 15, 2026
Merged

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

Conversation

@adammharris

Copy link
Copy Markdown
Member

Moves fig-schema to fig 7 so prov can move to fig 7 and twig 6. fig-schema 0.4 depends on fig ^5, and its FieldType/Value are not fig 7's.

What changes

  • Library: still depends on fig alone. Its only API change is fig 6's ExtKind::PlistData → ExtKind::Data, which now displays as data.
  • CLI: fig 7's core registers no languages by itself, so the binary depends on the five it names: json (with jsonc and json5), yaml, toml, zon and figl. It finds a markdown file's frontmatter or endmatter through twig 6 (twig::meta), because fig 6 removed fig::detect/fig::split.
  • New default cli feature: it carries all of the CLI's dependencies, and [[bin]] has required-features = ["cli"], so cargo install fig-schema still works. A library user (prov) sets default-features = false and compiles none of them.
  • Test fix: check_on_standard_input_needs_the_schema_named no longer fails when the binary exits before the test writes to its stdin (a broken-pipe race).

Behavioural changes (in the commit trailers)

  • ExtKind::Data displays as data (was plist-data).
  • .zon files and --input zon are now read. Before, zon was named but refused.
  • --input figl is the spelling; fig still reads.
  • A markdown file's block is found by twig. ;;; JSON blocks and fenced ```yaml blocks are no longer read as the document.

Release

The version is not bumped in this PR. prov depends on this branch from git until a 0.5.0 is on crates.io, so please cut 0.5.0 after merging.

cargo fmt --check, cargo clippy --all-targets -D warnings, cargo test and RUSTDOCFLAGS=-D warnings cargo doc all pass locally.


Generated by Claude Code

fig 6 made every format a language a program registers, and took
embedding out of fig; fig 7 is that core in Rust, with no Zig to build.

The library depends on `fig` alone, as before: it uses the value tree,
never a language. The command line brings the languages it names
(json with jsonc and json5, yaml, toml, zon, figl) and twig, which now
locates a markdown file's frontmatter or endmatter, all behind a default
`cli` feature, so a library caller with `default-features = false`
compiles none of them.

Behavioural-change: `FieldType::Extended(ExtKind::Data)` displays as
  `data`. fig 6 renamed plist's `PlistData` to `Data`, any format's byte
  string, and it displayed as `plist-data`.
Behavioural-change: `fig-schema` reads `.zon` files and `--input zon`.
  It named zon before but refused to read it, since the prebuilt fig it
  linked carried only json, yaml, toml and fig.
Behavioural-change: `--input figl` names figl, as fig 6 does; `--input
  fig` still reads as figl, and a `.fig` file still does.
Behavioural-change: a markdown file's block is found by twig, which
  reads `---` (or `---<lang>`) and `+++` frontmatter and YAML endmatter.
  A `;;;` JSON block or a fenced ```` ```yaml ```` block at the top of a
  file is no longer read as the document; `check` treats such a file as
  having no block.
@adammharris
adammharris merged commit 73f3d02 into master Oct 15, 2026
6 checks passed
@adammharris
adammharris deleted the cc/modest-mendel-tw57ql branch October 15, 2026 23:25
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