Open lhearachel opened 2 months ago
I assume this happens due to the header being updated whenever a naix file changes? What about the header depends directly on the contents of naix files?
For clarity on terminology, a NAIX
header is built by knarc
during the process of packing a NARC
. We use such headers in the source files to refer to files within a particular NARC
. For an example, refer to src/battle/battle_controller.c
and search for instances of subscript_
.
From what I can tell, the core issue is that global.pch
is being rebuilt, or detected as dependent on that NAIX
header. I'm not sure why that is, but it is the clearest explanation that I can think of for why the full source tree is rebuilt.
In that case my question would be: When does the file layout of a NARC change? If it can only be changed by editing the build system, maybe it shouldn't be generated as a by-product of actually packing the files into a NARC. Instead it could be generated while setting up the build system (as a configure_file() with a command), or simply without depending on the files to be packed into the NARC.
I'm not sure how precompiled headers work, but even if it's excluded, I wonder how much of the codebase would be rebuilt after changing the contents of a NARC.
Unfortunately, moving the NARC file layout declaration to configuration time doesn't really solve the underlying issue. The full source tree would still be rebuilt if a user added a new file to that NARC.
Introduced by #198
Steps to Reproduce
Assuming a freshly-cloned repository up-to-date with
main
:./build.sh
.res/battle/scripts/subscripts/subscript_mimic.s
./build.sh
. Observe that the NARC only requestssubscript_mimic
to be rebuilt, but all source-code files are rebuilt afterwards due to the dependency on the generated NAIX.Expected Behavior
Only the following source-code files which explicitly include
battle/scripts/sub_seq.naix
should be rebuilt: