-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Description
The motivation behind this proposal is to make it easier to determine what a step does in large build.zig's. A good example of this is with zig itself. It can be difficult to catch a specific command which is executed for a particular step. With this proposal, it would be a matter of pointing the "build inspector" to the specific step via some sort of "path" and zig would dump some metadata on that step. This would simplify debugging build.zig and could make compiler development a little easier.
Possible example usage:
$ zig build --inspect install/xcb-util
Id: compile
Depends:
- xcb
Dependants:
- xcb-image
- ../install
Command: /home/ross/zig/bin/zig build-lib /home/ross/.cache/zig/p/1220096cb9b583a14b307609801d8a018a3babc9e608170afc521a0db4e437165c15/src/atoms.c /home/ross/.cache/zig/p/1220096cb9b583a14b307609801d8a018a3babc9e608170afc521a0db4e437165c15/src/event.c /home/ross/.cache/zig/p/1220096cb9b583a14b307609801d8a018a3babc9e608170afc521a0db4e437165c15/src/xcb_aux.c -ODebug -I /home/ross/MidstallSoftware/xcb.zig/zig-cache/o/cac237db28f5e81076ba1cd591d8db88 -lc --cache-dir /home/ross/MidstallSoftware/xcb.zig/zig-cache --global-cache-dir /home/ross/.cache/zig --name xcb-util -dynamic
The changes wouldn't be too much in std.Build, formatting could be done by adding a new method to the Step VTable but it would require an AnyWriter type.
Requires:
- Add type-erased writer and GenericWriter #17634
- Finding steps by a path
- Format function for steps
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels