Build commands and dependency resolution

R-BUILD-V4-2medium

Plan the build order

The shipping team is adding a CI impact preview for its label-printing job. It accepts exported unit dependencies on stdin, plus target and edited lines, and reports a stable plan and the units affected by the edit. This is a conservative unit-graph model; it does not execute compiler commands, install packages or predict a native cache. Input graphs are acyclic and declare every dependency.

What needs to change

Implement buildOrder so a reviewer sees one stable plan containing every unit the selected job needs.

Reproduce

  1. Use go run with the sample export for label and compare the resulting build order with the expected stdout.

Acceptance criteria

Your review marks · Saved in this browser. Test acceptance is tracked separately.

Notes

The file contains Graph, parseGraph, show and main. Input graphs have no cycles; each imported name also has a unit line.

Sign in to open this exercise

The ticket brief is public. Sign in to access the exercise. Paid exercises require Pro.

Sign in