Make a build from source say which build it is - #31
Merged
Merged
Conversation
Every locally built fux reported `fux 0.0.0` — a string consistent with every
local build ever made, so the first question on any bug report ("which binary
is this?") was answered by nothing. It cost real time on 2026-08-20: a report
that Esc quit the app had to be settled by the binary's mtime, because
--version excluded nothing. Had it been a stale binary it would have looked
identical.
--version, the About box and the usage text now read InformationalVersion
through one accessor, and the Makefile stamps it from `git describe --tags
--always --dirty`:
$ ./bin/fux --version
fux 0.3.0-8-g3738819-dirty
which says both "newer than 0.3.0", "here is the commit", and "this tree
matched no commit at all". The leading v of the tag is stripped so it reads
like a release with the commit appended. Outside a checkout, or with no git,
the property is not passed and the csproj placeholder stands: fux 0.0.0-dev.
Two things the issue did not anticipate, both measured rather than reasoned:
Since .NET 8 the SDK appends "+<commit sha>" to InformationalVersion by
default. Left alone, a release would have printed fux 0.9.9+3738819eb78e... and
failed release.yml's exact --version assertion — verified by turning the
property back on and watching it happen. Fux.csproj disables it, and a drill
check fails if a "+" ever returns, so it is caught here rather than on the next
release.
InformationalVersion does NOT default to what the release assertions expect on
a prerelease. It defaults to Version, which is the whole tag (0.2.0-rc.1),
while release.yml compares --version against the numeric core (0.2.0) — the
About box has always reported the core, because AssemblyVersion is numeric.
release.yml now passes InformationalVersion=core explicitly, so a released
binary prints exactly what it printed before. Confirmed by publishing both
0.9.9 and 0.9.9-rc.1: both report `fux 0.9.9`.
Covered on both sides. The drill asserts the About box, the usage text and
--version agree and carry no "+"; CI asserts an unstamped build matches a
semver pattern (the old assertion demanded three bare numbers and would have
failed on 0.0.0-dev), that an InformationalVersion passed in comes out verbatim,
and — on a dry run, so it costs nothing — that `make build` still passes the
property at all. That last one skips out loud rather than silently when git can
describe nothing.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016X4pgrsMBcsXjqWDo2gBBt
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 #26.
Every locally built fux reported
fux 0.0.0— a string consistent with every local build evermade, so the first question on any bug report ("which binary is this?") was answered by nothing.
--version, the About box and the usage text now readInformationalVersionthrough oneaccessor, and the Makefile stamps it from
git describe --tags --always --dirty. That says"newer than 0.3.0", "here is the commit", and "this tree matched no commit at all". The tag's
leading
vis stripped so it reads like a release with the commit appended. Outside a checkout,or with no
git, the property is not passed and the placeholder stands:fux 0.0.0-dev.Two things the issue did not anticipate
Both measured rather than reasoned about, because both would have surfaced as a broken release
rather than a failing test.
Since .NET 8 the SDK appends
+<commit sha>toInformationalVersionby default. Leftalone, a release would have printed
fux 0.9.9+3738819eb78e839964813c5c70d84a08d31f8868andfailed
release.yml's exact--versionassertion. Verified by turning the property back on andwatching it happen.
Fux.csprojdisables it, and a drill check fails if a+ever returns — soit is caught on the next build rather than the next release.
InformationalVersiondoes not default to what the release assertions expect on aprerelease. The issue reasoned that it defaults to
Version, so a release keeps printingfux 0.3.0— true for0.3.0, false for0.2.0-rc.1. It defaults to the whole tag, whilerelease.ymlcompares against the numeric core (0.2.0), which is what the About box has alwaysreported because
AssemblyVersionis numeric-only.release.ymlnow passesInformationalVersion=coreexplicitly, so a released binary prints exactly what it printedbefore. Confirmed by publishing both
0.9.9and0.9.9-rc.1: both reportfux 0.9.9.Coverage
--drillVersionStringagree; no+<sha>suffix0.0.0-devInformationalVersionpassed in comes out of--versionverbatimmake -n buildstill passes the property — a dry run, so it costs nothingThe Makefile check skips out loud rather than silently when
gitcan describe nothing, so a skipis not read as a pass.
All five drill fixtures pass (390 / 394 / 381 / 368 / 373).
Note
The drill itself still reports
0.0.0-dev, because it runs throughdotnet, notmake. That iscorrect — its checks are about the three surfaces agreeing, which holds either way — but it means
the
git describestamping is pinned by the CI dry-run check rather than by the drill.🤖 Generated with Claude Code
https://claude.ai/code/session_016X4pgrsMBcsXjqWDo2gBBt