~/bend-docscommunity

src/ws/hop.bend checks

raw source on the hub · import ezx@1.16.0.0/src/ws/hop.bend as Hop

ws/hop: where a whole-workspace command runs (laws/WorkspaceRootFound.bend). ez lock, ez fetch and ez doctor act on the whole workspace from any member, so run in a member they run again at the root, with the same words, and end as that run ends. Run at the root, or in a project of its own, they run where they are. Which of the three it is, and the line that runs again, are decided here; ws/run.bend only reads what the search needs and runs what this says.

4 imports
import Base
import ../pkg/path.bend as P
import ./workspace.bend as W
import ./root.bend as R

Types

type Hop source · line 15 · raw

Data

where a command runs: where it is, again at the root's directory, or nowhere, because the search for the root was refused

type Lib source · line 58 · raw

Data

the BEND_LIB a command run in a member uses: the one the environment sets, or, when it sets none, the root's .ez/lib, where the workspace's lock lays its packages

Definitions

def hop.within source · line 21 · raw

@+top:String -> @root:List<&2, String> -> @rel:List<&2, String> -> Hop

the root a member found, once it is known whether that is where ez runs

def hop source · line 30 · raw

@+top:String -> @found:0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/root.Found -> Hop

where a command runs, from what the search found. top is the top of the checkout, as git printed it.

def program source · line 42 · raw

@+pwd:String -> @+prog:String -> String

the program as it was started, found again from another directory: a path with a / in it taken from where ez was started, and a bare name looked up on PATH as it was

def line source · line 48 · raw

@+dir:String -> @+pwd:String -> @+prog:String -> @words:List<&2, String> -> List<&2, String>

the line that runs the same command at the root: a shell that changes to the root's directory and hands every word on as it was, with no word read by the shell, which takes them as its positional parameters

def lib.within source · line 63 · raw

@+top:String -> @root:List<&2, String> -> @rel:List<&2, String> -> Lib

the root a member found, once it is known whether that is where ez runs

def lib.found source · line 71 · raw

@set:Bool -> @+top:String -> @found:0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/root.Found -> Lib

the library, once it is known whether the environment sets one

def lib source · line 86 · raw

@+top:String -> @found:0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/root.Found -> @+env:String -> Lib

the library a member's own command uses: env is BEND_LIB as the environment has it, "" for unset

def lib.line source · line 90 · raw

@+lib:String -> @+pwd:String -> @+prog:String -> @words:List<&2, String> -> List<&2, String>

the line that runs the same command where it is, with BEND_LIB set

def lock.within source · line 98 · raw

@+top:String -> @root:List<&2, String> -> @rel:List<&2, String> -> String

the root a member found, once it is known whether that is where ez runs

def lock source · line 107 · raw

@+top:String -> @found:0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/root.Found -> String

the lock a command run in a directory reads: the root's, which is the only one a workspace has, or its own in a project of its own and at the root