Skip to content

Give the fork a release number independent of the upstream version - #26

Merged
typeless merged 2 commits into
mainfrom
feature/fork-versioning
Jul 20, 2026
Merged

Give the fork a release number independent of the upstream version#26
typeless merged 2 commits into
mainfrom
feature/fork-versioning

Conversation

@typeless

Copy link
Copy Markdown
Owner

Both fork releases so far collided on the upstream number — v5.8.0-agent and v5.8.0-agent-putup describe the same 5.8.0 base, so each new release had to invent another suffix instead of incrementing. There was no room left for a third.

Why not renumber MAJOR/MINOR/PATCH

The upstream triple is not cosmetic — it is read as upstream-semantic in five places:

Consumer Use
teraterm/ttpset/ttset.c:586 RunningVersion = MAJOR*10000 + MINOR — compat gate
teraterm/ttpset/ttset.c:575,2090 TERATERM.INI Version key, read + written
teraterm/ttpcmn/ttcmn_static.c:55 shared-memory filemap name ttset_memfilemap_5_8_0
teraterm/ttpmacro/ttl.cpp:2965 TTL cur_major/cur_minor, exposed to user macros
5 × *-version.rc FILEVERSION / PRODUCTVERSION numeric fields

Renumbering to a fork-owned 1.0.0 would send RunningVersion backwards (50008 → 10000), silently flipping upstream compat branches, and break user macros testing cur_major >= 5.

Change

The upstream triple stays the base; TT_VERSION_SUBSTR carries the fork's own semver, starting at 1.0.0 on the first putup-only tree. Releases increment independently; a rebase moves the base without disturbing the counter.

The dash in agent-1.0.0 is load-bearing: svnrev.pl:367 splices SUBSTR straight into $version, which becomes OutputBaseFilename, so a space would put spaces in the installer and zip filenames.

Verification

Ran the actual version pipeline:

$ perl buildtools/svnrev/svnrev.pl --root . --isl … --header …
#define Version            "5.8.0-agent-1.0.0"
#define VersionInfoVersion "5.8.0.0"
#define Revision           "cda4991"

derived installer basename:
teraterm-5.8.0-agent-1.0.0-x64-20260720_151250-cda4991-noname-snapshot
  • VersionInfoVersion still reduces to the numeric quad 5.8.0.0, so the five .rc version fields stay valid.
  • Filenames are space-free.
  • Nothing in the tree hardcodes the old string — grep across *.sh, *.yml, *.iss, *.py, *.pl, Tupfiles found zero hits; every consumer derives from tt-version.h.

Not verified locally: that it compiles (string macro; the Windows build needs CI — llvm-rc cannot run in the local sandbox). This PR's CI is the check.

Next: tag v5.8.0-agent-1.0.0 once this is on main.

https://claude.ai/code/session_01YEkLFtTYQZuQHgQP5qYtq7

typeless added 2 commits July 20, 2026 15:13
Both fork releases so far collided on the upstream number: v5.8.0-agent and
v5.8.0-agent-putup describe the same 5.8.0 base, so each new release had to
invent another suffix instead of incrementing. There was no room left for a
third.

MAJOR/MINOR/PATCH cannot absorb a fork counter -- they are read as
upstream-semantic by ttset's RunningVersion (MAJOR*10000+MINOR), the
TERATERM.INI Version key, the ttpcmn shared-memory filemap name and the TTL
cur_major/cur_minor macros exposed to user scripts. Renumbering them would send
RunningVersion backwards and break macros testing cur_major >= 5.

So the upstream triple stays the base and SUBSTR carries the fork's own semver,
starting at 1.0.0 on the first putup-only tree. Releases now increment
independently, and a rebase moves the base without disturbing the counter.

The dash in "agent-1.0.0" is load-bearing: svnrev.pl splices SUBSTR straight
into $version, which becomes OutputBaseFilename, so a space would put spaces in
the installer and zip filenames.

Claude-Session: https://claude.ai/code/session_01YEkLFtTYQZuQHgQP5qYtq7
The publish step hardcoded --prerelease from when putup releases were
experimental dry runs. With the fork on its own semver line, a v* tag is a real
release, so flipping the flag by hand after every publish would be the workaround
for a wrong default.

Claude-Session: https://claude.ai/code/session_01YEkLFtTYQZuQHgQP5qYtq7
@typeless
typeless merged commit 9bd5de0 into main Jul 20, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant