Skip to content

DLL version stamp never names a release because git describe excludes all tags #75

Description

@skydread1

Problem

Built assemblies embed an InformationalVersion whose suffix comes from git describe at build time (Clojure.csproj, Magic.Runtime.csproj, NostrandMain.csproj). The command passes --exclude=*, which makes git describe ignore every tag, so the suffix is always a bare commit hash:

$ git describe --long --always --exclude=* --abbrev=8            # current command, at the v0.10.0 tag
1fd8e08d
$ git describe --tags --long --always --match='v*' --abbrev=8    # same commit, tags considered
v0.10.0-0-g1fd8e08d

The 0.10.0 prefix of the stamp is just version.edn at build time, so every develop build between two releases carries it too. A DLL stamped 0.10.0+1fd8e08d therefore does not tell you whether it is the actual v0.10.0 release or an arbitrary develop build; answering that needs a checkout and git log. Stamped 0.10.0+v0.10.0-0-g1fd8e08d, the file proves its own provenance.

Suggestion

In all three csproj files, replace --exclude=* with --tags --match='v*':

-      Command="git describe --long --always --dirty --exclude=* --abbrev=8"
+      Command="git describe --tags --long --always --dirty --match='v*' --abbrev=8"

--tags is required because the release workflow's tag checkout stores the pushed tag as a lightweight ref, which git describe otherwise ignores. Release tags are only reachable from main, so builds from develop keep stamping a bare hash via the --always fallback, unchanged from today. Nothing parses the stamp, and the two stamped Export DLLs are already excluded from the byte-diff as commit-dependent.

Metadata

Metadata

Assignees

Labels

comp:clojure-runtimeC# persistent data structures, Vars, readercomp:magic-runtimeC# dynamic call sites and Mustache codegencomp:nostrandC# CLI host and task runner

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions