[PROF-15194] Drive Resource.rc VERSIONINFO from version.h#63
Merged
Conversation
The four VS_VERSION_INFO fields (FILEVERSION, PRODUCTVERSION, and the FileVersion / ProductVersion strings) were hard-coded literals, independent of version.h. As a result the DLL's File Properties drifted from version.h across past releases in both directions: v0.1.0 shipped '0,1,0,0' while version.h was already bumped; v0.2.0 shipped '0,2,0,0' while version.h still said '0,1,0,0'. The release workflow's check-version.ps1 only parses version.h so the drift was invisible. rc.exe runs the C preprocessor; let Resource.rc #include version.h and expand DLL_VERSION_MAJOR/MINOR/PATCH/BUILD and DLL_VERSION_STRING directly. Add a top-of-file comment warning against editing these fields via the VS resource editor (the GUI re-serializes macros into literals).
r1viollet
marked this pull request as ready for review
June 23, 2026 10:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Drive the four
VS_VERSION_INFOfields insrc/dd-win-prof/Resource.rc(FILEVERSION,PRODUCTVERSION, and the stringFileVersion/ProductVersion) fromsrc/dd-win-prof/version.hinstead of literals.rc.exeruns the C preprocessor, soResource.rcnow#includesversion.hand uses the existingDLL_VERSION_MAJOR/MINOR/PATCH/BUILDandDLL_VERSION_STRINGmacros directly.Also added a top-of-file comment warning against editing these fields through the Visual Studio resource editor (the GUI re-serializes macros into literals and would re-introduce the drift).
Motivation
Resource.rchad four hard-coded values that drifted fromversion.hacross past releases — v0.1.0 shipped0,1,0,0whileversion.hwas already bumped, v0.2.0 shipped0,2,0,0whileversion.hstill said0,1,0,0. The release workflow'scheck-version.ps1only parsesversion.h, so the drift was invisible to CI. Inspectingdd-win-prof.dll's File Properties → Details on a v0.3.0 release would have shown0.2.0.0.Spotted by Codex review on #62.
Ticket: PROF-15194 (parent epic: PROF-14955).
Testing
dd-win-prof.dllFile Properties → Details shows0.3.0.0(matching currentversion.h)version.hin a throwaway commit, rebuild, confirm the DLL's properties followChecklist