Repository navigation
build(deps)!: move to fig 7 and fig-schema 0.5 - #1
Merged
Merged
Conversation
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.
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 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
fig = "7"plus the fig-json, fig-yaml, fig-toml, fig-zon and fig-figl language crates (without serde). fig-schema isversion = "0.5"with default features off.Formatis a handle, not an enum. Newflower_core::format::from_extensionmaps an extension or format name to that handle and registers the language on first use.detectand flower-ffi'sparse_formatboth go through it, andFigBackendrecognises strict JSON by its format name.unsafe impl Sendis gone. fig 6'sEditorisSend, so the mutex only has to supplySync.ci.yml,mac-app.yml, the Homebrew workflow (needs-zig),flake.nix(now therustdev shell),.config/ship.figl, the README andscripts/build-xcframework.sh's comments. fig-sys leavesCargo.lock.docs/tasks/open-zon.mdnow records the Rust half as done; it stays open for the Mac app.Public API changes
FigBackend::open, the model'sfig::Value, and the fig-schema re-exports. Callers (provui) need fig 7.flower_core::detectkeeps its signature, butfig::Formatcan't be matched on anymore.flower_core::format::from_extension.Behavioural changes
Also recorded as
Behavioural-change:trailers on the commit..zonfiles now open in flower-tui, throughdetect, and through flower-ffi. Under fig 5 they were refused.[toml]rather than[Toml], and a.figfile shows[figl].Checks
Every job in
.config/ship.figlpasses locally:-D warnings)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