Hive
refactor: architectural review pass and add –quiet flag
GitHub issue · Closed
Source
tuist/once #43
Updated
Jun 24, 2026
Domains
Once
Summary
Architectural review pass across the workspace, plus a global --quiet flag. Lands in three commits:
chore: serialize daemon env-mutating tests via explicitXdg. The two daemon path tests infabrik-elixirwere mutatingXDG_RUNTIME_DIR/XDG_DATA_HOMEwithout serialization, so concurrentcargo testruns could race. Extractedsocket_path_in(&Xdg)/script_path_in(&Xdg)so tests exercise the layout against an explicit value instead of process env.refactor: dedupe planner scaffolding, splitlib.rs, tighten ownership. Lifted the identical DFS + cycle detection +workspace_output_dirformatter from each language crate into a newfabrik-frontend::plan_builder. Replaced the per-verbif fabrik_apple::supports_kind ... else if ...ladder in the CLI with aPLANNERSslice in a newfabrik-cli/src/planner.rs. Moved the ~200-line directory-blob encoder out offabrik-core/src/lib.rsinto its own module (1283 to ~1090 lines).Action::resource_requestreturns&ResourceRequestinstead of cloning;WorkspacePathgainsAsRef<str>/AsRef<Path>; apple plan stops carryingCow<[String]>. Target-not-found and wrong-kind errors now suggest “Runfabrik targets”.feat(cli): add--quietflag and bundle output options. New global-q/--quietthat suppresses human-mode “fabrik: built …” / per-node hit/miss / “fabrik: ran …” trailers. Errors and--format json/toonoutput are untouched. Introduces acli::Output { format, quiet }struct with ashow_human_trailers()helper so command handlers take one value instead of two parallel params.
Testing
mise exec -- cargo build --workspacemise exec -- cargo test --workspace(290+ tests, all pass)mise exec -- cargo clippy --workspace --all-targets -- -D warningsmise exec -- cargo fmt --all -- --check- Manual smoke:
fabrik exec -- /bin/echo xprints the trailer;fabrik --quiet exec -- /bin/echo xdoes not.
No GitHub comments yet.