~/bend-docscommunity

src/tool/run.bend fails

raw source on the hub · import 0x74799d3f846634a3d7461d4336d7c9d4/src/tool/run.bend as Run

tool/run: the interpreter for ez tool run, install, upgrade and sync. It reads the directory it runs in, the variables, the bend on the PATH, and the project's ez.toml and ez.lock.toml into a World, then loops: it asks the planner (tool/plan.bend) what is still open, answers each question by IO, and adds the answers to the World, until nothing is left to ask. Then it runs the plan: the checkout laid, the binary built or reused, then the program started or the link written, and the plan's end. A git question is the lock interpreter's to answer (Run.answer.ups), a file is written by its Run.write, and the command exits with the status the planner gives the plan's end and the program's (TP.code), through Run.end.at. It decides nothing; that it reads and executes faithfully is EZ-TRUST-2.

What it asks and builds on the way is captured, and a build's output is shown on stderr only when the build fails. The program alone is started on ez's own stdin, stdout and stderr (Pass.run), as cargo run hands the terminal to the program once the build is done.

sync asks the planner which pins to install (TP.sync) and installs each in turn as ez tool install <name> would.

16 imports
import Base
import 0xabe575924687afad4cee1a2c1194d639/main.bend as R
import ../io/file.bend as F
import ../lock/run.bend as Run
import ../lock/plan.bend as LP
import ../lock/up.bend as Up
import ../git/git.bend as Git
import ../fetch/run.bend as FetchRun
import ../pkg/path.bend as P
import ../run/bend.bend as Bend
import ../share/cap.bend as Cap
import ../share/say.bend as Say
import ../share/spin.bend as Spin
import ../share/pass.bend as Pass
import ./world.bend as TW
import ./plan.bend as TP