Builtin Library
README.md
reference_names
Finds the world sources that spell a reference by a name its target no longer has, and writes the current names into them when asked.
A source records the guid of every asset it references. When one of those assets later sits at another path (it was moved, or the engine's library files it somewhere else), the reference keeps resolving through the guid, and the text keeps the old name until someone reconciles it. Nothing rewrites it on its own: engines of different versions can hold one world open at once, and a source rewritten to whichever engine's layout read it last would be rewritten back by the other, each time running the asset's change hooks with nobody having asked.
Each time a world becomes ready, a notice names every owned source that still spells an old name. assets.reconcileReferenceNames writes the current names. Reconciling changes no behaviour: every reference already resolves to the asset its guid names.
Only the author's sources are considered: files the world authors, and installed assets the author has modified since installing them. The engine library, pulled dependencies under /source/deps/, and installed assets still as they were published keep the text they were published with.
local reference_names = require("@builtin::modules.reference_names")
for _, s in ipairs(reference_names.pending()) do
print(s.source, #s.names)
end
reference_names.reconcile({ dryRun = true })