an.library.lock#
The project lockfile, as the asset library sees it (re-exported from an.stores.library_lock).
The lockfile is a project store — mall["library_lock"], registered by
an.stores.build_project_mall() (an#240) — so its class lives with the other
project stores and building a project never imports the library. This module
keeps the import path the library and its callers already use.
>>> LOCKFILE_NAME, lock_key("characters", "alice")
('assets.lock.json', 'characters/alice')
Functions
|
The lockfile key of one project store entry. |
Classes
|
|
- class an.library.lock.ProjectLock(project_dir)[source]#
Bases:
MutableMapping<store>/<key> -> pinover a project’sassets.lock.json.Every write rewrites the whole (small) file, sorted, so the lockfile diffs cleanly under version control. The mapping is the
assetssection;kitsis thekitssection, and a write to either keeps the other.