Files
sized/docs/UPGRADING-2.md
T
gamertan e0707447ad
Sized Linux checks / Linux AMD64 / Rust 1.88.0 (pull_request) Successful in 4m54s
Sized Linux checks / Linux AMD64 / Rust 1.88.0 (push) Successful in 4m57s
Adopt pinned public core snapshot and prepare Sized 2.0.0
2026-10-10 13:11:02 -04:00

1.7 KiB

Moving from Sized 1.0 to 2.0

The existing flags and table/CSV/NDJSON workflows remain. Update automation to handle incomplete scans: exit 0 means a complete result; exit 1 means a missing root, an incomplete scan or another operation failure. CLI argument errors use Clap's exit 2. An incomplete scan may still produce useful output. Diagnostics go to stderr, and each JSON report includes complete.

Hard-linked files now contribute allocated blocks once, owned by the first path in deterministic traversal order. Apparent sizes remain per pathname. Totals may be lower than 1.0 for this reason. Ignore rules inherit through directories; --one-file-system explicitly skips other mounted filesystems. Allocation is filesystem-reported blocks, not guaranteed recoverable space.

Rust consumers

The CLI package is version 2.0.0. Its scanner is the exact sized-core revision recorded in CORE-SNAPSHOT.json, also used by SizeQueen. The core snapshot's internal package version remains 0.0.0; the full Git revision and file hashes identify it. It is an included path dependency, so no private forge access or separate core installation is required.

Public scanner types and sized::scan are re-exported from that dependency. EntryType adds Special and Unknown; update exhaustive matches. Node has additional accounting/status fields and internal state; obtain nodes through scan_tree instead of struct literals. Args adds one_file_system, and run returns scan completeness as a boolean. build_tree remains a compatibility helper, but use scan_tree to retain structured errors and diagnostics.

Use a fresh ScanControl per scan. Cancellation is cooperative between filesystem calls. SizeQueen does not launch the CLI; both use the core in process.