alliedmodders / ambuild

AlliedModders C++ Build System
BSD 3-Clause "New" or "Revised" License
60 stars 31 forks source link

Add full rebuild option #145

Open GAMMACASE opened 1 year ago

GAMMACASE commented 1 year ago

AMBuild option that triggers full rebuild of the project.

Practical use case as of right now: there are numerous cases I've encountered myself, but not able to condense into a small repro case (thus file a proper bug report), where the build system doesn't hook up updated header files from an include directories, leading to having old debug and run time information about the structs/classes etc. At the very least I can tell that it mostly happen via working on metamod and updating the hl2sdk include files (specifically to name a few are convar.h, datamap.h), so if that could count as a repro case, then here you have it.

Also as a general note regarding having this feature available even if the idea behind ambuild is to cover all cases and have it detect relevant changes automatically etc, is that it's highly impossible to have a high percentage of these cases covered due to the limited/small usage of this build system by the public and not really highly active development of it, which leads to the cases above and more. So just as a general routine way of solving these cases and not waiting for a long time for the bug to be resolved, again due to the constraints of low public usage and low development interest, it's preferred in my eyes to have this option available.

dvander commented 10 months ago

I'm not 100% against this, but probably more like 85% against. It'd probably be a diagnostic command that is annoying to invoke and marks every node in the graph as dirty. But then we'd be masking real bugs, which are very hard to diagnose without repro steps.

What I'd probably prefer to do is add some kind of diagnostic file that gets generated on every build. Basically a snapshot of the old database and all the timestamps it reads. Then if you encounter a problem, you could attach that information to a bug report after the fact.

Note, I use AMBuild probably more than any other person and I never encounter rebuild issues. We also don't see these issues on our own build servers, which rely heavily on minimal rebuild (the VMs are dog slow), and are cross-platform. I'm willing to believe they exist, but in that case, I'd want to track them down.