pub const LOCKFILE_VERSION: u32 = 2;Expand description
Current lockfile schema version. Bump when the on-disk layout
changes in a way an older knack couldn’t safely interpret.
Backward compatibility is one-way: a new knack reading an old
lockfile should keep working (with default values for new fields).
An old knack reading a new lockfile errors loudly rather than
guessing — that’s what Lockfile::ensure_supported_version
enforces.
Version history
- v1: initial layout.
name,source,resolved,checksum. Lockfiles with noversionfield at all are also v1 (the field only became required when v2 landed). - v2: adds optional
namespaceper locked skill so namespaced registries (public:anthropics/pdf) can round-trip through the lockfile without losing the vendor scope. Old v1 entries with nonamespacefield continue to read fine into v2; new writes emitversion = 2and include the field when scoped.