Created
June 18, 2018 22:20
-
-
Save belisarius222/c56b1d1227e787adca22042f27b57404 to your computer and use it in GitHub Desktop.
+build-status
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: +build-status: current data for a build, including construction status | |
:: | |
:: +build-status stores the construction status of a build as a finite | |
:: state machine (:state), and it also contains the information needed | |
:: to relate this build to other builds, such as clients and sub-builds. | |
:: | |
+= build-status | |
$: :: listeners: current set of external listeners tracking this build | |
:: | |
listeners=(set listener) | |
:: root-listeners: listeners for whom this build is the root build | |
:: | |
root-listeners=(set listener) | |
:: clients: builds for which this build is a sub-build | |
:: | |
clients=(set build) | |
:: sub-builds: builds this build depends on | |
:: | |
sub-builds=(set build) | |
:: provisional-clients: builds for which this build might be a sub-build | |
:: | |
provisional-clients=(set build) | |
:: provisional-sub-builds: builds this build might depend on | |
:: | |
provisional-sub-builds=(set build) | |
:: blocked-clients: clients that are blocked on us | |
:: | |
blocked-clients=(set build) | |
:: subscribed: did we run this build as a live build? | |
:: | |
subscribed=? | |
:: state: a state machine for tracking the build's progress | |
:: | |
$= state | |
$% $: :: %untried: build has not been started yet | |
:: | |
[%untried ~] | |
== | |
$: :: %blocked: build blocked on either sub-builds or resource | |
:: | |
%blocked | |
:: blocks: unfinished sub-builds (`~` if blocked on resource) | |
:: | |
blocks=(set build) | |
== | |
$: :: %complete: build has finished running and has a result | |
:: | |
%complete | |
:: build-result: the product of the build | |
:: | |
$= result | |
%- unit | |
$: :: last-accessed: last time we looked at the result | |
:: | |
:: This is used for LRU cache reclamation. | |
:: | |
last-accessed=@da | |
:: build-result: the stored value of the build's product | |
:: | |
=build-result | |
== | |
:: listeners: the set of listeners with which the build was run | |
:: | |
:: Note that this is not the same as the set of listeners | |
:: stored at the top level of +build-status, which represent | |
:: the current listeners. | |
:: | |
listeners=(set listener) | |
:: rebuilds: other builds with the same result | |
:: | |
$= rebuilds | |
$: :: new: newer build with the same result | |
:: | |
new=(unit build) | |
:: old: older build with the same result | |
:: | |
old=(unit build) | |
== | |
:: mades: listeners on which we've sent a response | |
:: | |
mades=(set listener) | |
== == == |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment