Test Details Overview

Scope the version macros to the file that consumes them (#5178)

CMake reads the abbreviated commit hash at configure time and passed it as
-DGIT_COMMIT_HASH, alongside -DTAG_VERSION_STRING, to seven targets:
nano_lib, node, nano_node, nano_rpc, core_test, rpc_test and qt. Only
nano/lib/version.cpp reads either macro, so every other definition was
dead, but it still landed on the compile command line of all 224
translation units in those targets.

sccache keys its cache on that command line, so a definition that changes
with every commit invalidates every object in the target. The two most
expensive targets, core_test at 99 files and node at 62, were rebuilt from
cold on each commit, and because only develop populates the cache, the
entries a pull request reads were written by a build whose hash no longer
matches anything.

Attach the six version macros to version.cpp with
set_source_files_properties and drop the definitions from the targets that
never used them. ACTIVE_NETWORK stays where it was, since it is stable
across commits and genuinely public.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

__________

Type: commit

Hash: 2b0c943034dfa2265b89f9293204528f717af3ed

Created: today

__________

gr0v1ty/nano-node:2b0c943034dfa2265b89f9293204528f717af3ed

Test Results

Test Case Status Duration Median Deviation Log Graph