-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
We've been working on improving build times in the Ghostty project for both the build binary as well as final artifacts. At the scale of the Ghostty project with hundreds of Zig files importing across each other, it's very difficult to determine where imports are triggering downstream recompilations.
This applies to both build binaries and runtime artifacts.
A real example from our [work-in-progress] migration to Zig 0.15: something changed in Zig 0.15 so that imports became a bit more eager, causing an "import outside of build root" error that didn't happen on Zig 0.14 (because the import is never reached). This was the fix: ghostty-org/ghostty@d7cfc51
To determine that, I manually grepped for imports and traced them myself and made the guess that this was happening. Thankfully I was right. This has been a repeat occurrence.
This also applies to decls as well. It'd be nice to get the -freference-trace
output for all instances of all decls and be able to do general graph traversal and search on that. But the primary culprit for me is imports.
I think with incremental compilation this sort of debug tooling will be even more important, since minimizing this will likely be the key to faster and faster compilation.
I'm sorry, this issue lacks a formal proposal and is instead more of a problem statement. If this should go elsewhere to discuss further I'm happy to move it.