Nimblesite / Nimblesite/Shipwright

[SWR-VERSION-BUILD-STAMPING] Enforce placeholder versions: fail the build when any source version field isn't 0.0.0-dev

Open
#25 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
1m
Merged PRs (30d)
10

Description

The bug

Repos store real version numbers in their source manifests (package.json, pubspec.yaml, *.csproj, Cargo.toml, shipwright.json). Every release then bumps those fields and commits/PRs the bump back — producing version churn on tracked source on every single release.

The correct, universal behaviour:

  • Every package carries a placeholder version (0.0.0-dev) in source so it runs/builds locally.
  • On deployment, the git tag is the single source of truth for the version — it is stamped into the artifacts at build time, in the runner working tree only, and is never committed back.

This is not monorepo- or registry-specific. It applies to every Shipwright repo and every language.

Status of the spec

[SWR-VERSION-BUILD-STAMPING] already states this rule correctly and universally — "All version fields in source (Cargo.toml, package.json, *.csproj, pubspec.yaml, shipwright.json) MUST be 0.0.0-dev on every branch at all times" and "Release jobs MUST NOT commit, push, or move source-control refs after the tag exists."

So the rule is clear. What's missing is enforcement — nothing fails when a repo drifts off the placeholder, so the churn keeps happening in practice.

Ask

Add an acceptance gate ([SWR-GATE-*]) that:

  1. Scans every version carrier in the repo (package.json, pubspec.yaml, *.csproj, Cargo.toml, shipwright.json, …).
  2. Fails the build if any of them is not the 0.0.0-dev placeholder (on PRs and on main), with a message pointing at the offending file/line.
  3. Is wired into the standard CI gate so a real version can never be committed to source.

That turns the existing rule from documentation into something that is actually enforced, which is what prevents the churn.

Real-world trigger

MelbourneDeveloper/dart_node (Dart → pub.dev) had real versions (0.11.0-beta, and one package hard-coded at the release version 0.13.0-beta) sitting in pubspec.yaml, and its release flow committed/PR'd the bumps back to main. Fixed by resetting every version: to 0.0.0-dev and stamping the tag version in the runner at publish time (zero source churn) — but only after the drift had already shipped, because no gate caught it.

(Edited: this issue originally and incorrectly framed the problem as a monorepo/registry gap. The placeholder rule is universal and already specified; the real gap is enforcement.)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the standard CI gate and existing [SWR-GATE-*] checks in the Shipwright repository. Inspect the version carriers named in the issue—package.json, pubspec.yaml, *.csproj, Cargo.toml, and shipwright.json—and determine how their version fields can be reported. Done means PR and main builds fail with the offending file and line when a value is not 0.0.0-dev.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, ci-cd
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.