The CMake-generated build metadata can go stale on some translation units when not doing a complete rebuild (which can be slow). This can lead to confusion as to which commit exactly the currently running build is based on.
This stuff was implemented in: #349
To Reproduce
Checkout to some branch
Rebuild the full project (I tested with Visual Studio 2022 on Windows 10)
Verify the git HEAD's hash matches what's shown in-game
Make a dummy commit: git commit --allow-empty -m test
Contents of the change don't matter, but this is the fastest way to test it
Build the project (no cleaning and not "full rebuild")
Expected behavior
All the in-game build metadata still matches current latest build info.
Actual behavior
Build info has gone stale. See the git hash discrepancy between main menu and the console:
For git log --oneline HEAD~2..HEAD
1e89e75 (HEAD -> master) test
a5667e3 (origin/master, origin/HEAD) Return mouse back to camera on closing VGUI dialog (#379)
you can see the main menu has picked up the dummy commit, but neo_version hasn't. The CNEOHud_HTA embedded git short hash also suffers from this, and won't necessarily update correctly without a complete rebuild.
Build Info
20240626_a5667e3
Description
The CMake-generated build metadata can go stale on some translation units when not doing a complete rebuild (which can be slow). This can lead to confusion as to which commit exactly the currently running build is based on.
This stuff was implemented in: #349
To Reproduce
git commit --allow-empty -m test
Expected behavior
All the in-game build metadata still matches current latest build info.
Actual behavior
Build info has gone stale. See the git hash discrepancy between main menu and the console:
For
git log --oneline HEAD~2..HEAD
you can see the main menu has picked up the dummy commit, but
neo_version
hasn't. TheCNEOHud_HTA
embedded git short hash also suffers from this, and won't necessarily update correctly without a complete rebuild.Operating System
Version/Distro
10
Build's compiler
MSVC 19.40.33811.0