Expand description
Package update & synchronization layer for the Soroban DevKit (sdkt), .
After sdkt package fetch materializes dependencies into .sdkt-cache and
records them in sdkt.lock, sdkt package update reconciles the lock with
what is currently available upstream and refreshes the on-disk checkouts.
Design goals (reuse, no duplication):
GitFetcher/git_cache_key/git_bindo all git I/O — this module only decides what to fetch and what to write.lock_dependencies_resolved(inlock.rs) is the single writer ofDependencyLockentries, shared withsdkt package fetch.read_lock/write_lockkeepsdkt.lockstable; contract artifacts and deploy order are never touched.validate_manifestis reused for manifest sanity before any work.
Reference semantics:
rev— immutable, already pinned; never updated.tag— resolve the tag’s current commit; if it differs from the lock, update.branch— fetch the latest branch head; if it differs from the lock, update.
Offline-first: available commits are resolved via git ls-remote against
the declared git URL. For a local-path “remote” (used in tests and for
local mirrors) this needs no network; reaching a real remote does, and a
failure is reported as a clear network/git error rather than a panic.
Structs§
- Update
Change - One dependency’s update result.
- Update
Report - Aggregate report for
sdkt package update(check / dry-run / apply).
Enums§
- Sync
Error - Errors that abort an update before producing a partial result.
- Update
Status - Outcome state for a single dependency during an update plan/apply.
Functions§
- apply_
updates - Apply updates: fetch/refresh every git dependency whose available commit
differs from the lock (tag/branch only;
revis skipped as pinned), then rewritesdkt.lockwith the new commit, cache location, and integrity — preserving contract artifacts and deploy order. - plan_
updates - Compute the read-only update plan: what would change, without touching the
cache or the lock. This powers both
--checkand--dry-run.