The entry projects
The exports of the projects service that act for the principal of the caller.
projects module with an entry
- Hash
681f733744d93c908a25050725e3fc9d9ca9ff01a1ae5a7f436596a7eb6d7605- Size
167936 bytes- Exports
7- Imports
0- Imported by
0- License
- MIT
The exports of the projects service that act for the principal of the caller
| Fact | Value |
|---|---|
| Kind | Modules with an entry |
| Source | src/modules/system/projects |
| Boot image | yes: in the boot image, 167936 bytes in this build |
| Build settings | none: the defaults of the source |
| Imports | none |
| Imported by | none |
Neighbours
It imports no module, and no module imports it. The module graph shows it with the other modules that have no edge.
Exports
| Export | What it does |
|---|---|
load(tree_name: Text, project_evaluation: Bytes(Read), pins_lex: Bytes(Read)) -> Integer | reads a project for the principal of the caller: the evaluation of its project.lex, which the evaluation process gave, and its pins.lex |
update(project_name: Text, input_name: Text, target: Pin_Target, summary: Table(Pin_Update_Row, Append), pins_lex: Bytes(Append)) -> Text | moves one input of a loaded project of the principal of the caller to a new tree hash |
pins(project_name: Text) -> Table(Pin_Row) | gives the pinned inputs of a loaded project of the principal of the caller, in the order of pins.lex |
build_recipe(project_name: Text, head: Table(Recipe_Head, Append)) -> Table(Recipe_Input_Row) | gives the recipe of the inputs tree of a project of the principal of the caller: the builder that the recipes service runs itself, and one input for each pin: a tree, by the tree hash that pins.lex gives it, under the name of the pin |
status(out: Projects_Status) -> Integer | writes aggregate projects service counters into out |
active_console_count() -> Integer | returns the number of currently open child consoles |
pin_count() -> Integer | returns the pins of the last pins.lex that a command List_Inputs read whole, or 0 before the first one |
entry() | initializes the delegated projects service ring and serves project input, update, enter, and exit commands until stopped |
load
load(tree_name: , project_evaluation: (Read), pins_lex: (Read)) ->
load reads a project for the principal of the caller: the evaluation of its project.lex, which the evaluation process gave, and its pins.lex.
- tree_name: the name of the project, a Lex name.
- project_evaluation: the canonical output of the evaluation of project.lex, whose value is a project with a field source.
- pins_lex: the text of pins.lex; empty for a project with no input.
The result is the count of pins, or a negative number with an error record: ERROR_NO_CALLER, ERROR_ACTS_FOR_PRINCIPAL, ERROR_NOT_READY, or ERROR_PROJECT with the refusal as the value found.
tree_name:project_evaluation: (Read)pins_lex: (Read)
- When it fails
- a negative result, and the error record
src/modules/system/projects/exports.odin:126
update
update(project_name: , input_name: , target: , summary: (, Append), pins_lex: (Append)) ->
update moves one input of a loaded project of the principal of the caller to a new tree hash.
- project_name: the name that load gave the project.
- input_name: the name of the input in pins.lex.
- target: the new tree hash of the input.
- summary: one row: the count of lines of pins.lex that changed, 0 or 1, the number of that line, and the old and the new tree hash.
- pins_lex: the whole new pins.lex, for the caller to write in the store of the project.
- result: the line that changed, as "-" and the old line, then "+" and the new line, each with its line end; empty when nothing changed.
The result is the count of bytes of the changed line text, or a negative number with an error record: ERROR_NO_CALLER, ERROR_ACTS_FOR_PRINCIPAL, ERROR_NOT_READY, or ERROR_PROJECT with the refusal as the value found.
project_name:input_name:target:summary: (, Append)pins_lex: (Append)
- When it fails
- a negative result, and the error record
src/modules/system/projects/exports.odin:172
pins
pins(project_name: ) -> ()
pins gives the pinned inputs of a loaded project of the principal of the caller, in the order of pins.lex.
The result is the count of pins, or a negative number with an error record: ERROR_NO_CALLER, ERROR_NOT_READY, or ERROR_PROJECT with Unknown_Project as the value found.
project_name:
()- When it fails
- a negative result, and the error record
src/modules/system/projects/exports.odin:249
build_recipe
build_recipe(project_name: , head: (, Append)) -> ()
build_recipe gives the recipe of the inputs tree of a project of the principal of the caller: the builder that the recipes service runs itself, and one input for each pin: a tree, by the tree hash that pins.lex gives it, under the name of the pin. The caller registers it with recipes.register and builds it with recipes.build.
- project_name: the name that load gave the project.
- head: one row: the builder hash and the output kind Tree.
- result: one row for each input, in the order of pins.lex.
The result is the count of inputs, or a negative number with an error record: ERROR_NO_CALLER, ERROR_NOT_READY, or ERROR_PROJECT with the refusal as the value found: Unknown_Project, Pin_Not_Found for a project with no pin, Store_Failed and Store_Damaged for the private store.
project_name:head: (, Append)
()- When it fails
- a negative result, and the error record
src/modules/system/projects/exports.odin:285
status
status(out: ) ->
status writes aggregate projects service counters into out.
out:
- When it fails
- a negative result, and the error record
src/modules/system/projects/main.odin:61
active_console_count
active_console_count() ->
active_console_count returns the number of currently open child consoles.
- none
- When it fails
- a negative result, and the error record
src/modules/system/projects/main.odin:81
pin_count
pin_count() ->
pin_count returns the pins of the last pins.lex that a command List_Inputs read whole, or 0 before the first one. A pins.lex that the service refuses does not change it.
- none
- When it fails
- a negative result, and the error record
src/modules/system/projects/main.odin:92
entry
entry()
entry initializes the delegated projects service ring and serves project input, update, enter, and exit commands until stopped.
- Form
- The entry of the module: one parameter, an address, fixed by the contract.
src/modules/system/projects/main.odin:275
Read from the source of the module, as the build reads it to describe the exports (tools/modustool/build/describe.odin).
What the root service gives it
| What | Value | As the root service says |
|---|---|---|
| Grants | The holder of the role Projects: the pins of each project in its private store. See: Declarations in the repository | |
| Other terms of its start grant set | on_demand = true | |
| Budget that it asks for |
| Working memory budget for the freestanding projects service process. |
The start grant set is read from start_grant_sets in src/modules/system/root/start_grant_sets.odin. The stated budget is read from the constant MODULE_BUDGET of the source of the module (its line); the build adds the counted parts and writes the sum in the module (tools/modustool/build/budget_count.odin); the root service accepts it up to the largest budget of a process, and adds the limits of processor time and of log records (src/modules/system/root/budgets.odin).
Text wire form
A wire form of the module contract: one word of a call. The address of a slice record {address, count} of UTF-8 bytes.
Bytes wire form
A wire form of the module contract: one word of a call. Bytes with no description.
Integer wire form
A wire form of the module contract: one word of a call. A signed integer of 64 bits, in a register.
Error_Record record of a module
A record of the module projects: 56 bytes, aligned on 8 bytes, 0 bytes of padding.
kindi6408 bytesuniti6488 bytesoperationi64168 bytesargumenti64248 bytesvaluei64328 byteslimiti64408 bytesfoundi64488 bytes
Pin_Target record of a module
A record of the module projects: 32 bytes, aligned on 1 bytes, 0 bytes of padding.
tree_hashHash(32)032 bytes
Table wire form
A wire form of the module contract: one word of a call. Records of one description that follow each other (a table).
Pin_Update_Row record of a module
A record of the module projects: 80 bytes, aligned on 8 bytes, 0 bytes of padding.
changed_linesi6408 bytesline_numberi6488 bytesold_tree_hashHash(32)1632 bytesnew_tree_hashHash(32)4832 bytes
Pin_Row record of a module
A record of the module projects: 256 bytes, aligned on 1 bytes, 0 bytes of padding.
tree_hashHash(32)032 bytessource_module_hashHash(32)3232 bytesnameText(64)6464 bytesupstream_refText(128)128128 bytes
Recipe_Head record of a module
A record of the module projects: 56 bytes, aligned on 8 bytes, 0 bytes of padding.
output_kind_wordi6408 bytessource_date_unixi6488 bytesoutput_block_limiti64168 bytesbuilder_hashHash(32)2432 bytes
Recipe_Input_Row record of a module
A record of the module projects: 104 bytes, aligned on 8 bytes, 0 bytes of padding.
kind_wordi6408 byteshashHash(32)832 bytesnameText(64)4064 bytes
Projects_Status record of a module
A record of the module projects: 48 bytes, aligned on 8 bytes, 0 bytes of padding.
total_inputs_queriesi6408 bytestotal_updatesi6488 bytestotal_entersi64168 bytestotal_exitsi64248 bytesactive_consolesi64328 bytestotal_refusalsi64408 bytes
