Skip to content

build(deps)!: move to fig 7, whose JSON is Rust - #2

Merged
adammharris merged 2 commits into
mainfrom
agent/backlog-ci-cannot-build-fig-json-only
Oct 26, 2026
Merged

adammharris merged 2 commits into
mainfrom
agent/backlog-ci-cannot-build-fig-json-only

Conversation

@adammharris

Copy link
Copy Markdown
Member

What changed

  • fig 4 → fig 7. fig = { version = "7", default-features = false } plus fig-json = { version = "7", default-features = false, features = ["fig"] }. Inventory::parse and Inventory::to_json use fig_json::format() in place of Format::Json. The lock no longer contains any fig-sys.
  • The SHA-256 compressor uses as_chunks. Stable clippy (1.99) added chunks_exact_to_as_chunks, and it fails CI's -D warnings on the three chunks_exact calls in digest.rs. as_chunks has been stable since 1.88, mocfl's MSRV. This is its own commit.
  • The README and crate docs now name both fig crates. The task is marked status: done.

Why

Every CI job on main has failed since the move to fig 4. A JSON-only fig 4 compiles its core from Zig source, and CI installs no Zig. Installing Zig would not be enough either: fig-sys 4.0.0's build.zig doesn't compile under Zig 0.17. The task's done-when asks for a build on a machine with no Zig, which rules out pinning a Zig in CI.

Closes docs/tasks/ci-cannot-build-fig-json-only.md.

Behavioural change

Error implements From<fig::Error> for fig 7's error type, and the detail text in Error::Json is now fig 7's parser message.

Verified

Run on hbox, with every zig removed from PATH (before the change, cargo build failed in fig-sys's build script exactly as the task describes):

  • cargo fmt --all --check
  • cargo clippy --all-targets -- -D warnings (stable 1.99)
  • cargo test --all-targets with OCFL_FIXTURES set to a fresh clone of OCFL/fixtures (the fixture tests ran, not skipped), and cargo test --doc
  • Interop job: cargo install rocfl --no-default-features --locked, emitted the object, and rocfl validate reported Invalid objects: 0. Its one storage issue is the missing storage-root declaration, which the workflow already expects.
  • MSRV job: rustup run 1.88 cargo check --all-targets

Not checked: whether fig 7's pretty-printer writes inventory.json byte-for-byte as fig 4 did. fig 4 can't be built here to compare against. The output is two-space-indented JSON in field order and round-trips through Inventory::parse.

Stable clippy's chunks_exact_to_as_chunks lint fails CI's -D warnings on
the three chunks_exact calls in the SHA-256 compressor. as_chunks is stable
since 1.88, the crate's MSRV, and takes the unwrap out of the word read.
fig 4 compiles a JSON-only core from Zig source, which CI does not install
and which fig-sys 4.0.0's build.zig no longer accepts under Zig 0.17, so
every CI job on main failed in fig-sys's build script. fig 7 is Rust
throughout and each language is a crate of its own: mocfl now takes `fig`
with no features and `fig-json` with only its `fig` binding, and reads and
writes inventory.json through `fig_json::format()`.

Closes docs/tasks/ci-cannot-build-fig-json-only.md.

Behavioural-change: `Error`'s `From<fig::Error>` is for fig 7's error, and `Error::Json`'s detail is fig 7's message
@adammharris
adammharris merged commit e9960ea into main Oct 26, 2026
2 of 3 checks passed
@adammharris
adammharris deleted the agent/backlog-ci-cannot-build-fig-json-only branch October 30, 2026 01: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