- Ford receives a ++sign from Clay containing the ++care of new revisions of some files we subscribed to on a ++path.
- Ford does a bi-jug lookup of the changed dependencies in its state's deps, which will return a set of ++build-indices whose builds they refer to may need to get rebuilt.
- For each of those build indices, Ford calls ++build-up.
- For each root build that comlpleted during this event, grab the keys of its
jug from disk to dependency in dependencies.live, and unify those into one
set of disks representing the set of disks that we'll need to make Clay
requests on. For each disk, look up all of the root builds that depend on
that disk in root-builds.live, and unify those into one set of root builds
that depend on any of the disks. Then, create one Clay request for each disk.
To do this, for each disk, for each root build, look up the dependecies of
the root build that are on this disk in dependencies.live. From those
dependencies, we can create a set of [care path]s, which forms part of the
Clay request. The beak in the Clay request is built from the disk and the time of the Clay file change, which we obtain from the time of any of the root builds that completed during this event (they should all be the same time).
- Ford looks up the ++silk of the old build (looked up by ++build-index) and runs the new build against the updated beak (the new revision that Clay gave us).
- In the case that the build blocks, store the build in builds-in-progress.live in Ford's state, then return.
- If the build completes, add its build index to the set of completed builds, which we will produce at the end of this function.
- Once we have the new build result, we check that build result (some actual noun) against the old build result. If they're the same, return.
- Add this build index to the builds-done.live in Ford's state.
- For each listener for live updates of the old build, enqueue a %made response on that duct to be sent out at the end of this event.
- For each external dependency of this new build, add the mapping from the dependency to the new build index in the dependencies.live of Ford's state. For each sub-build of the new build, add that sub-build's external dependencies to the new build's dependencies in dependencies.live.
- For each build that depended on the old build, recurse and run Step 4 on that build, then take the new parent build and link it with its child in the build graph. Unify the sets of completed builds from each parent with our set of completed builds.
- Remove the old build. This means removing it from every piece of the state.
Notably, this removes the old build from the dependencies.live field, which
is necessary for making the next Clay request.
- ++build-down starts with a ++bilk. First we look up if there's already a build for the silk of the given beak. If so, we try to run that build as far as we can. Otherwise, we create a new ++build.
- Now we actually have a build that we're running. If the build's status is %done, produce the result, and we're done.
- If the build's status is %blocked,
- If the build's status is %not-started, ^ TODO Finish this.