Artifact 3f79af72522caad73d5d864851a3ef6f2f561af50a78d98e00874596cba021be:
- File
src/commands.h
— part of check-in
[5ef6c04ebd]
at
2026-11-13 09:35:59
on branch trunk
— Phase 4c: suit why says which supplier of an asset is in effect, and why
suit why NAME prints, for the folder you are in, every place that supplies an asset and what became of it: placed, dropped because the machine-limited outfit wins, joined, not applied on this machine, no project with that key here, a clash with a real file, or skipped. It uses the resolver's own record of each decision, so why and apply cannot disagree. Where an asset is placed at both personal and User scope it says which the harness reads first.
suit status now prints a line for a machine-limited personal outfit that did not apply, as it did for User ones.
The project tests set a user name. The forge's runner sets none, so on the last check-in the store never opened there and 130 project cases failed. The suites are now also run with no user name before a push.
1011 unit checks, 227 shell cases, 146 store cases, 612 placement cases and 376 project cases, under clang, under gcc 16, and with no user name set. 100% coverage in all 19 source files. (user: dmestas, size: 892) [annotate] [blame] [check-ins using]
#ifndef SUIT_COMMANDS_H #define SUIT_COMMANDS_H // The wardrobe suit applies is named "mine". Its store holds suit.conf. #define WARDROBE_NAME "mine" // Each returns an exit code and reports on stdout and stderr. int cmd_plan(void); int cmd_apply(void); int cmd_status(void); // Every place that supplies the asset NAME for the current folder, and which one is in effect. int cmd_why(const char *name); int cmd_off(void); int cmd_run(void); // NAME is null to show the machine's name. int cmd_machine(const char *name); // VERB is null to list the roots, else "add" or "rm" with ARG the folder. ARG is changed. int cmd_roots(const char *verb, char *arg); // Show the list the last scan wrote, or with SCAN make it. int cmd_projects(bool scan); // Set (KEY given) or unset the remote key of the project at PATH by hand. PATH is changed. int cmd_project(char *path, const char *key); #endif