Deliberately excluded from #19, which added make build, so it is filed here rather than lost.
The org Go styleguide wants the git commit hash embedded at build time (-X main.Version) and surfaced at startup. This repo has no version surface at all, so it is more than a linker flag.
Definition of done
A main.Version variable set via -ldflags -X from make build.
A decision, recorded in the code, on where it surfaces. The candidates are a startup line, a -v flag, and the score screen — but this is a faithful port of Rogue 5.4.4, so anything that changes what the player sees during a normal game is a divergence from C and needs justifying as one. A -v flag that exits immediately is the least invasive and is the presumed answer unless someone argues otherwise.
A sane fallback when the tree is dirty or there is no VCS (a plain go build with no ldflags must still produce a runnable binary, not an empty version string that reads as a bug).
make check green; TODO.md Completed Steps entry in the same commit; commit title ends (closes #N).
Priority
Low. No defect behind it, and it must not alter in-game display without a deliberate decision.
Deliberately excluded from https://git.eeqj.de/sneak/rgoue/issues/19, which added `make build`, so it is filed here rather than lost.
The org Go styleguide wants the git commit hash embedded at build time (`-X main.Version`) and surfaced at startup. This repo has no version surface at all, so it is more than a linker flag.
## Definition of done
- A `main.Version` variable set via `-ldflags -X` from `make build`.
- A decision, recorded in the code, on where it surfaces. The candidates are a startup line, a `-v` flag, and the score screen — but this is a faithful port of Rogue 5.4.4, so anything that changes what the player sees during a normal game is a divergence from C and needs justifying as one. A `-v` flag that exits immediately is the least invasive and is the presumed answer unless someone argues otherwise.
- A sane fallback when the tree is dirty or there is no VCS (a plain `go build` with no ldflags must still produce a runnable binary, not an empty version string that reads as a bug).
- `make check` green; `TODO.md` Completed Steps entry in the same commit; commit title ends ` (closes #N)`.
## Priority
Low. No defect behind it, and it must not alter in-game display without a deliberate decision.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Deliberately excluded from #19, which added
make build, so it is filed here rather than lost.The org Go styleguide wants the git commit hash embedded at build time (
-X main.Version) and surfaced at startup. This repo has no version surface at all, so it is more than a linker flag.Definition of done
main.Versionvariable set via-ldflags -Xfrommake build.-vflag, and the score screen — but this is a faithful port of Rogue 5.4.4, so anything that changes what the player sees during a normal game is a divergence from C and needs justifying as one. A-vflag that exits immediately is the least invasive and is the presumed answer unless someone argues otherwise.go buildwith no ldflags must still produce a runnable binary, not an empty version string that reads as a bug).make checkgreen;TODO.mdCompleted Steps entry in the same commit; commit title ends(closes #N).Priority
Low. No defect behind it, and it must not alter in-game display without a deliberate decision.