Repository navigation
feat: one source of truth for the version, and --version on both binaries - #101
Merged
Merged
Conversation
The version was written out by hand in several places and had drifted apart. CMake said 0.9.0, the handshake introduced itself as "wsldrive/0.1", and build-installer.ps1 defaulted to 0.1.0 - so README route 3 stamped a 0.1.0 installer onto a 0.9.0 build. Nothing printed a version at all, so a user could not say which build they had, and neither could a bug report. PROJECT_VERSION is now the only place the number appears. CMake generates core/version.hpp from it, and everything else reads that: - `wsldrive --version` / `wsldrived --version`, answered before any other argument handling so they still work on a machine where WinFsp, a distro or a reachable agent are not set up yet - which is when the question gets asked. - Both usage banners lead with the version. - The Hello handshake agent strings. - A Windows VERSIONINFO resource on all three executables, so Explorer's Details tab and (Get-Item wsldrive.exe).VersionInfo report the build. - build-installer.ps1 reads the version out of CMakeLists.txt instead of carrying its own default. Verified: `wsldrive --version` and `wsldrived --version` print 0.9.0 on both platforms; all three Windows binaries report FileVersion 0.9.0 with distinct descriptions; build-installer.ps1 resolves 0.9.0 with no -Version argument. Linux 124/124, Windows 122/122, conformance 31/0 Linux and 28/0 Windows. Closes #76 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Closes #76.
The version was written by hand in several places and had drifted: CMake said 0.9.0, the handshake introduced itself as
wsldrive/0.1, andbuild-installer.ps1defaulted to0.1.0— so README route 3 stamped a 0.1.0 installer onto a 0.9.0 build. Nothing printed a version at all, so neither a user nor a bug report could say which build was in play.PROJECT_VERSIONis now the only place the number appears. CMake generatescore/version.hppfrom it and everything reads that:wsldrive/wsldrived --versionwsldrive/0.1wsldrive/0.9.0build-installer.ps10.1.0--versionis answered before any other argument handling, so it works on a machine where WinFsp, a distro, or a reachable agent are not set up yet — which is exactly when someone asks.Verification
Linux 124/124, Windows 122/122; conformance 31/0 Linux, 28/0 Windows. A unit test pins the header to the project version and asserts the agent strings are built from it rather than repeating a literal.
🤖 Generated with Claude Code