Repository navigation
build(deps)!: move to fig 7, whose JSON is Rust - #2
Merged
Merged
Conversation
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
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.
What changed
fig = { version = "7", default-features = false }plusfig-json = { version = "7", default-features = false, features = ["fig"] }.Inventory::parseandInventory::to_jsonusefig_json::format()in place ofFormat::Json. The lock no longer contains anyfig-sys.as_chunks. Stable clippy (1.99) addedchunks_exact_to_as_chunks, and it fails CI's-D warningson the threechunks_exactcalls indigest.rs.as_chunkshas been stable since 1.88, mocfl's MSRV. This is its own commit.status: done.Why
Every CI job on
mainhas 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'sbuild.zigdoesn'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
ErrorimplementsFrom<fig::Error>for fig 7's error type, and the detail text inError::Jsonis now fig 7's parser message.Verified
Run on hbox, with every
zigremoved fromPATH(before the change,cargo buildfailed in fig-sys's build script exactly as the task describes):cargo fmt --all --checkcargo clippy --all-targets -- -D warnings(stable 1.99)cargo test --all-targetswithOCFL_FIXTURESset to a fresh clone of OCFL/fixtures (the fixture tests ran, not skipped), andcargo test --doccargo install rocfl --no-default-features --locked, emitted the object, androcfl validatereportedInvalid objects: 0. Its one storage issue is the missing storage-root declaration, which the workflow already expects.rustup run 1.88 cargo check --all-targetsNot checked: whether fig 7's pretty-printer writes
inventory.jsonbyte-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 throughInventory::parse.