Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit65083fe8f2

README.md

zeromind.update

Bring this world's libraries and installed assets up to date.

  • zeromind.update() updates every unit zeromind.updates lists.
  • zeromind.update("@builtin") or zeromind.update({ "@combat", "/zero/source/Fire.module" }) updates the units named: library names and installed assets' root paths, mixed.

A library moves its pin to the newest commit of the ref it follows; @builtin moves to the version of it this engine runs, and a pin newer than that stays where it is. That is the one call a world pinned to an older @builtin needs: it repins every file of the world to the engine's version, so the world is visible to players again and a package published from it names the engine's parts with no engine version, so an install brings no copies of them. Commit and push what to_commit lists. An installed asset takes its origin's new version, three-way merged with this world's edits; a file whose edit conflicts is written with conflict markers and listed in conflicted, to resolve by taking one side with zm.checkout("", { paths = { path }, ours = true }) (or theirs) or by editing the markers out.

An install an earlier engine landed as one row per file (zeromind.installs lists it with form = "rows") is updated by one record of the new version taking the place of its rows: the rows leave the world and the record is written and materialized, so the install is one entry in Source Control afterwards: zm status lists the record and counts the rows it took the place of, which are deletions the next commit carries, and zeromind.convertInstalls finds nothing to convert there. A file changed since the install stays a row of the world over the record's file (an override). An update of such an install either finishes or leaves the world as it was: one that fails, or whose call is cancelled, writes the rows back and takes the record out. The unit's timings names the seconds each step took.

Units are updated one at a time. A unit that fails is reported in its entry with the reason and the rest still run.

Nothing is committed. to_commit lists every path the updates changed or moved; stage and commit them with zm.add and zm.commit. zeromind.reviewUpdate(unit) shows what an update changes before you apply it, and its modified lists the files you edited (bytes differ from the version installed) and have not committed that the update touches. An update lands only the files whose version differs from what the world holds, text and binary alike, and writes them to source whatever the engine mode.

An update applies over files you changed and have not committed. warnings names each one an update touched, { unit, path, outcome } with outcome merged (your edit and the incoming change are both in the file) or conflicted (the file holds conflict markers to resolve). note says that nothing was committed.

Returns { results, to_commit, skipped, warnings, note }: one { unit, kind, from, to, ok, error?, merged?, conflicted?, added?, pruned?, moving?, timings? } per unit, the paths to commit, the units whose origin could not be reached, the warnings, and the note.