-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[proposal] build inspector #18688
Comments
@nektro It would be helpful if you would explain the reasoning behind your thumbs-down. |
https://github.com/ExpidusOS/zig/tree/poc/build-inspector I've come up with a bit of a POC version of this proposal. |
After making the POC implementation, I've noticed there's a bit of an issue. It's impossible to print generated paths until the step is executed but there doesn't seem to be a way to know the step was done until the cache hit occurs. Maybe I am missing something and there is a way to know if the step will only use the cache but until then, pretty printing the cache paths won't be possible. |
I added the ability to see the command in a compile step in the POC implementation. This looks great and is working well.
|
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 debuggingbuild.zig
and could make compiler development a little easier.Possible example usage:
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 anAnyWriter
type.Requires:
The text was updated successfully, but these errors were encountered: