Documentation
¶
Overview ¶
Package sdkfiles ships the device library and framework inside the volt binary, so a plain install can build without the IDE. sdk/ is a copy of volt/devices and volt/framework, refreshed by scripts/release.sh.
~/.volt/sdk is the one live library everything reads and writes. A shipped SDK (this binary's, the IDE's, or the repo's via `volt sdk sync`) only updates it, and only on a new version or an explicit sync: a shipped library is added when missing and replaced only while the live copy is still what was last shipped. A library changed locally is reported, never overwritten, until the user takes the update or keeps theirs.
Index ¶
Constants ¶
const Record = ".shipped.json"
Record is <dir>/.shipped.json: each unit's digest as last shipped ("devices/<name>", "framework", "examples/devices"), "kept:<unit>" for a shipped version the user chose not to take, and "_owner" / "_version_<owner>": who keeps the library up to date and the version that last synced it.
Variables ¶
This section is empty.
Functions ¶
func ReadRecord ¶
ReadRecord loads dir's record (empty if none).
Types ¶
type Result ¶
type Result struct {
Added []string `json:"added"`
Updated []string `json:"updated"`
Kept []string `json:"kept"`
Backup string `json:"backup,omitempty"`
NewerBy string `json:"newer_by,omitempty"` // a newer release keeps the library
}
Result is what a Sync did; Kept are units changed locally that it left.
func Ensure ¶
Ensure is the CLI's own upgrade path: when this binary's SDK is new and the library is the CLI's to keep (not a developer's), it syncs the embedded SDK. A release never downgrades: if a newer release already synced the library, an older volt leaves it (Result.NewerBy names that release). It never deletes anything; locally changed libraries come back in Kept.