src/ws/hop.bend checks
raw source on the hub · import ezx@1.11.0.0/src/ws/hop.bend as Hop
ws/hop: where a whole-workspace command runs (EZ-WS-2). 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 14 · 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
HereHop
Hop@dir:String -> Hop
Stop@why:String -> Hop
type Lib source · line 57 · 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
KeepLib
Set@lib:String -> Lib
Definitions
def hop.within source · line 20 · 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 29 · raw
@+top:String -> @found:0x8d817ff76bee5f8a754f0b8cceb7d07a/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 41 · 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 47 · 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 62 · 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 70 · raw
@set:Bool -> @+top:String -> @found:0x8d817ff76bee5f8a754f0b8cceb7d07a/src/ws/root.Found -> Lib
the library, once it is known whether the environment sets one
def lib source · line 85 · raw
@+top:String -> @found:0x8d817ff76bee5f8a754f0b8cceb7d07a/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 89 · 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 97 · 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 106 · raw
@+top:String -> @found:0x8d817ff76bee5f8a754f0b8cceb7d07a/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