Skip to main content

Module spaces

Module spaces 

Source
Expand description

Spaces: a main code space plus members it calls and other spaces it imports, declared in an @imports header (// @imports a, b, space:other). This module has the parts that don’t need the application’s storage: reading and rewriting the header, the line-up hash an owner approves, and the cycle and depth check over a Graph the application provides.

Structs§

Imports
What main declares it calls.
Lineup
What a space’s approval covers: main, the kind, the members (alias, code id, pin) and the spaces main imports. Aliases and imported names are compared without case.

Constants§

MAX_DEPTH
The deepest chain of spaces calling spaces.

Traits§

Graph
The spaces as the application stores them, for check_cycles.

Functions§

check_cycles
Refuse loops through main’s space: imports (a → b → a), and chains deeper than MAX_DEPTH.
imports
Read main’s @imports header lines (// @imports a, b, space:other).
lineup_hash
The line-up hash under a profile (its lineup_domain).
rename_space_import
source with space from imported as to instead (space:from becomes space:to as from, so main still calls it from); None when it doesn’t import it.