Skip to content

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

Merged
adammharris merged 2 commits into
mainfrom
cc/modest-mendel-tw57ql
Oct 15, 2026
Merged

adammharris merged 2 commits into
mainfrom
cc/modest-mendel-tw57ql

Conversation

@adammharris

Copy link
Copy Markdown
Member

Moves flower from fig 5.1.2 and fig-schema 0.4 to fig 7, which is pure Rust, and fig-schema 0.5. provui builds flower together with prov, which is already on fig 7 (diaryx-org/prov#12), so both have to be on the same fig.

Changes

  • Dependencies: fig = "7" plus the fig-json, fig-yaml, fig-toml, fig-zon and fig-figl language crates (without serde). fig-schema is version = "0.5" with default features off.
  • Format lookup: fig 7's Format is a handle, not an enum. New flower_core::format::from_extension maps an extension or format name to that handle and registers the language on first use. detect and flower-ffi's parse_format both go through it, and FigBackend recognises strict JSON by its format name.
  • flower-ffi: the unsafe impl Send is gone. fig 6's Editor is Send, so the mutex only has to supply Sync.
  • No more Zig: removed from ci.yml, mac-app.yml, the Homebrew workflow (needs-zig), flake.nix (now the rust dev shell), .config/ship.figl, the README and scripts/build-xcframework.sh's comments. fig-sys leaves Cargo.lock.
  • ZON: docs/tasks/open-zon.md now records the Rust half as done; it stays open for the Mac app.

Public API changes

  • Every fig type in flower's API is now fig 7's: FigBackend::open, the model's fig::Value, and the fig-schema re-exports. Callers (provui) need fig 7.
  • flower_core::detect keeps its signature, but fig::Format can't be matched on anymore.
  • Added flower_core::format::from_extension.
  • flower-ffi's Swift-facing interface is unchanged.

Behavioural changes

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

  • .zon files now open in flower-tui, through detect, and through flower-ffi. Under fig 5 they were refused.
  • flower-tui's title shows the format in lowercase, by fig's name for it: [toml] rather than [Toml], and a .fig file shows [figl].

Checks

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

  • fmt
  • clippy (-D warnings)
  • test
  • package-isolation
  • bindings check (the Swift binding is unchanged)
  • app-version
  • MSRV 1.88

Not done here: ZON support in the Mac app (it's in the open task), and anything that needs Xcode, lipo or Swift to run.


Generated by Claude Code

fig 6 made every format a language a program registers, so a
`fig::Format` is a per-process handle a language crate hands back, not
an enum; fig 7 is pure Rust, with no Zig and no fig-sys. fig-schema 0.5
is its release on fig 7. flower's public API names fig's types
(`FigBackend::open` takes a `fig::Format`, the model hands out
`fig::Value`, the fig-schema re-exports), so those are now fig 7's and a
consumer moves its own fig pin to 7 alongside.

- flower-core depends on fig-json, fig-yaml, fig-toml, fig-zon and
  fig-figl (without serde) and `format::from_extension` maps an
  extension or format name onto the handle, registering the language on
  first use. `detect` and flower-ffi's `parse_format` both go through it.
- `FigBackend` tells strict JSON by the handle's name.
- flower-ffi drops its `unsafe impl Send`: fig's `Editor` is `Send`
  since fig 6, so the model is `Send` on its own and the mutex supplies
  `Sync`.
- CI, the Mac app workflow, the Homebrew release and the flake stop
  installing Zig (and cctools, and the Zig cache and fig-sys repack
  workarounds); the dev shell is diaryx-nix's `rust`.
- The ZON task's Rust half is done; the Mac app's document type remains.

Behavioural-change: `.zon` files open: flower-tui, `flower_core::detect`
  and flower-ffi accept ZON, which fig 5's default features compiled
  out, so opening one failed.
Behavioural-change: flower-tui's title names the format as fig does,
  lowercase (`config.toml  [toml]`), where it printed the enum's Debug
  form (`[Toml]`); a `.fig` file shows `[figl]`.
fig 6's Editor is Send, so the impl went with the move to fig 7.
@adammharris
adammharris merged commit 6d82c4d into main Oct 15, 2026
8 checks passed
@adammharris
adammharris deleted the cc/modest-mendel-tw57ql branch October 15, 2026 23:49
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