Install from @latest, retract v0.0.1, print a go-installed binary's version (closes #116) #130

Merged
clawbot merged 1 commits from issue-116-install-latest-version into next 2026-10-17 05:44:50 +02:00
Collaborator

For #116.

README "Install" now leads with go install sneak.berlin/go/sfdupes@latest. Until 1.0 each release is a v0.0.N tag on main's tip, so @latest gives that tip once it has passed the build. The section also says what @main and v0.0.1 give, and shows sfdupes --version and go version -m for checking an installed binary. "Subcommands" points to it for what VERSION is. go.mod retracts v0.0.1, the early build without a database.

sfdupes --version printed dev for every go-installed binary, because only the linker ever set Version. It now prints buildVersion(Version, info), where info is what runtime/debug.ReadBuildInfo returns: the linker's value wins, then the main module's version Go recorded in the binary, and dev only when there is neither (Go records (devel) then). Version is now empty by default instead of dev.

What the diff does not show:

  • The retraction only takes effect once a release whose go.mod carries it is the newest, so from v0.0.3 on.
  • An @main build's pseudo-version counts from the highest tag below it, which is v1.0.0-rc2, not v0.0.2, so it reads like v1.0.0-rc2.0.20261016120000-4e4a94d0c2a1 until a v1.0.0 exists. The README describes it only by the commit hash it ends with; the test uses that form.

Model: opus-5-5

For https://git.eeqj.de/sneak/sfdupes/issues/116. README "Install" now leads with `go install sneak.berlin/go/sfdupes@latest`. Until 1.0 each release is a `v0.0.N` tag on `main`'s tip, so `@latest` gives that tip once it has passed the build. The section also says what `@main` and `v0.0.1` give, and shows `sfdupes --version` and `go version -m` for checking an installed binary. "Subcommands" points to it for what `VERSION` is. `go.mod` retracts `v0.0.1`, the early build without a database. `sfdupes --version` printed `dev` for every go-installed binary, because only the linker ever set `Version`. It now prints `buildVersion(Version, info)`, where `info` is what `runtime/debug.ReadBuildInfo` returns: the linker's value wins, then the main module's version Go recorded in the binary, and `dev` only when there is neither (Go records `(devel)` then). `Version` is now empty by default instead of `dev`. What the diff does not show: - The retraction only takes effect once a release whose `go.mod` carries it is the newest, so from `v0.0.3` on. - An `@main` build's pseudo-version counts from the highest tag below it, which is `v1.0.0-rc2`, not `v0.0.2`, so it reads like `v1.0.0-rc2.0.20261016120000-4e4a94d0c2a1` until a `v1.0.0` exists. The README describes it only by the commit hash it ends with; the test uses that form. Model: opus-5-5
clawbot added the needs-review label 2026-10-17 04:50:53 +02:00
clawbot self-assigned this 2026-10-17 04:50:57 +02:00
Author
Collaborator

Review of #130: one finding.

  1. README.md, "Install", the paragraph after the two check commands: it gives v0.0.2 as an example of the release tag that sfdupes --version prints for a binary from go install, and says VERSION is dev only when the binary carries no version at all. A v0.0.2 binary, which @latest and @main install today, prints sfdupes dev, as does every earlier tag, because this change first ships in a later release. A user checking the current release this way is told his binary carries no version, while go version -m shows v0.0.2. Acceptable: use as the example a release that carries this change (v0.0.3), and say that binaries from v0.0.2 and earlier print dev and are checked with go version -m.

Model: opus-5-5

Review of https://git.eeqj.de/sneak/sfdupes/pulls/130: one finding. 1. `README.md`, "Install", the paragraph after the two check commands: it gives `v0.0.2` as an example of the release tag that `sfdupes --version` prints for a binary from `go install`, and says `VERSION` is `dev` only when the binary carries no version at all. A `v0.0.2` binary, which `@latest` and `@main` install today, prints `sfdupes dev`, as does every earlier tag, because this change first ships in a later release. A user checking the current release this way is told his binary carries no version, while `go version -m` shows `v0.0.2`. Acceptable: use as the example a release that carries this change (`v0.0.3`), and say that binaries from `v0.0.2` and earlier print `dev` and are checked with `go version -m`. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-17 05:07:32 +02:00
clawbot added 1 commit 2026-10-17 05:13:20 +02:00
README "Install" now leads with go install ...@latest: until 1.0 each
release is a v0.0.N tag on main's tip, so @latest gives that tip once
it has passed the build. It also says what @main and v0.0.1 give and
how to check an installed binary. go.mod retracts v0.0.1, the early
build without a database.

sfdupes --version printed "dev" for every go-installed binary, since
only the linker set Version. When the linker sets none, it now prints
the main module's version from runtime/debug.ReadBuildInfo; "dev" is
left only when neither is known. Version is now empty by default.

The retraction takes effect only once a release carrying it is the
newest.

Model: opus-5-5
clawbot force-pushed issue-116-install-latest-version from 25712daca4 to 9ff524d83e 2026-10-17 05:13:20 +02:00 Compare
clawbot added needs-review and removed needs-rework labels 2026-10-17 05:13:21 +02:00
Author
Collaborator

README "Install" now gives v0.0.3 as the example tag and says that binaries from v0.0.2 and earlier print dev and are checked with go version -m.

Model: opus-5-5

README "Install" now gives `v0.0.3` as the example tag and says that binaries from `v0.0.2` and earlier print `dev` and are checked with `go version -m`. Model: opus-5-5
Author
Collaborator

Review of #130 passed.

Model: opus-5-5

Review of https://git.eeqj.de/sneak/sfdupes/pulls/130 passed. Model: opus-5-5
clawbot merged commit 6346319701 into next 2026-10-17 05:44:50 +02:00
clawbot deleted branch issue-116-install-latest-version 2026-10-17 05:44:50 +02:00
Sign in to join this conversation.