Skip to content

deps: move to snafu 0.9 and fjall 3 - #39

Merged
forkwright merged 1 commit into
mainfrom
deps/snafu-and-friends
Aug 25, 2026
Merged

deps: move to snafu 0.9 and fjall 3#39
forkwright merged 1 commit into
mainfrom
deps/snafu-and-friends

Conversation

@forkwright

Copy link
Copy Markdown
Owner

Finding

Two dependabot bumps that needed real migrations, landed together so the lockfile moves once.

snafu 0.8.9 → 0.9.2. snafu::Location is now a type alias for &'static core::panic::Location<'static>, and std's Location has no public constructor. Eight manual Location::default() sites stop compiling with E0599.

Note the existing snafu-location-migrate.py tool found zero matches here — it targets Location::new(file!(), line!(), column!()), a different shape. The fix was applied by hand.

Location::caller() records the identical site: 0.8's default() was itself #[track_caller], and these helper functions are not annotated, so the chain terminated at the same place either way. Zero behaviour change — verified by reading both crate sources, not assumed.

fjall 2.11.2 → 3.1.9. fjall 3 swapped its vocabulary: the whole store is now Database, and what was PartitionHandle is now Keyspace. persist moved from the partition handle to the store. The data API (insert/get/remove) is byte-identical either side — only type names and the open/persist entry points moved. All API shapes were read from the vendored 3.1.9 source, not inferred from error text.

The on-disk question, answered

fjall 3 does change the on-disk format (FormatVersion::V3), and it fails closed.

Database::recover() calls check_version() before any journal or segment-manifest recovery runs. Against a 2.x store it logs an error naming the official migration tool (fjall-rs/migrate-v2-v3) and returns Err(Error::InvalidVersion(...)). The destructive recovery path — the one that deletes segments absent from the levels manifest — is gated behind that check succeeding, so it never runs against a 2.x-written store. Verified at db.rs:538-554.

Practically moot here: thesauros's fjall-backed persistence dates to 2026-08-16, so a live 2.x keyspace is unlikely to exist. But if one does, it errors loudly rather than eating data.

One correction

A WHY comment claimed this pin matched "the same major version kanon's own archeion crate already uses fleet-wide". Checked against kanon origin/main: archeion still pins fjall = "2". That claim is now false, so it is replaced with a NOTE flagging the divergence rather than left as stale prose.

Decision worth making separately: either archeion takes the same bump, or the two diverge deliberately.

Supersedes #35 and #34.

snafu 0.9 makes Location a type alias for std's, which has no public
constructor, so eight manual Location::default() sites stop compiling.
Location::caller() records the identical site: 0.8's default() was itself
track_caller, and these helpers are not, so the chain terminated at the same
place either way.

fjall 3 swapped its vocabulary -- the whole store is now Database, and what was
PartitionHandle is now Keyspace -- and moved persist from the partition handle to
the store. The data API is byte-identical either side; only the type names and
the open and persist entry points moved.

fjall 3 does change the on-disk format, and it fails closed rather than silently:
recover() checks the version marker before any journal or manifest recovery
runs, so the destructive path that drops segments absent from the manifest never
executes against a 2.x store -- it errors and names the migration tool instead.

A comment claiming this pin matched kanon's archeion crate is corrected: archeion
still pins fjall 2, so the two now diverge.
@forkwright
forkwright merged commit 9530066 into main Aug 25, 2026
13 checks passed
@forkwright
forkwright deleted the deps/snafu-and-friends branch August 25, 2026 21:16
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