2026-07-10 10:41:39 +01:00
# NuGet Packaging
Write and enforce the semver policy, per operator ruling on 1.0.60
1.0.60 removed public API (CultInspectorAssetPath) under a patch bump; its
own changelog says "Breaking" and the version number lied. Operator ruling:
semver is policy, strictly, for every published package family.
docs/semver-policy.md states what counts as breaking per surface (managed
API, Unity inspector attributes, CultCache wire format/store compatibility,
CultNet protocol, native bridge exports), the 0.y.z pre-1.0 convention, tag
naming, and required changelog shape. Records the 1.0.60 scar as history;
does not renumber it.
scripts/check-changelog-semver.mjs is the mechanical check: refuses a
changelog "### Breaking" section under too small a bump, and refuses a
version that skips, reverses, or repeats the previous published tag. Skips
re-litigating a version that is already tagged (rebuilding immutable
history is not a release action). Wired into publish-packages.yml for the
four npm/PyPI packages, and into build-unity-package.ps1 (cultlib),
packages/cultmath/scripts/build-unity-package.ps1 (cultmath), and a new
scripts/verify-caching-unity-release.ps1 (caching.unity has no build script
of its own to hook into).
18 node:test cases cover the required table (breaking+major/minor/patch,
non-breaking, 0.y.z, skip, downgrade) plus CLI-level git-tag resolution.
Hand-mutated each rule (bump classification, pre-1.0 lane requirement,
breaking-heading detection, breaking early-return, already-published skip)
and confirmed each kill, then restored byte-exact. No mutation harness is
committed; CultLib has none today.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 22:03:22 +02:00
See `docs/semver-policy.md` for what a version bump on these packages is
required to mean and how a release is checked against that before it ships.
2026-07-10 10:41:39 +01:00
CultLib publishes the managed dependency graph as separate packages. The leaf
package is `GameCult.Mesh` ; its NuGet dependencies preserve the CultMesh,
CultNet, and CultCache ownership boundaries.
```powershell
powershell -ExecutionPolicy Bypass -File .\scripts\pack-nuget.ps1
```
2026-09-30 16:02:08 +02:00
The command packs `GameCult.Mesh` , `GameCult.Networking.WebSockets` , and every
project they reach through `ProjectReference` (including `GameCult.Math` , which
carries its own version) into a local feed under `artifacts/nuget` . It verifies
that each of those packages exists at the identity MSBuild reports for it, then
restores and runs a clean .NET consumer using only
`PackageReference Include="GameCult.Mesh"` .
2026-07-10 10:41:39 +01:00
The Unity distribution remains `org.gamecult.cultlib` , built by
`scripts/build-unity-package.ps1` , because Unity consumes the managed assembly
closure through UPM rather than NuGet restore.
2026-07-13 18:50:30 +01:00
Install the Unity package from the immutable release tag:
```text
2026-10-22 15:44:39 +02:00
https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib -unity-v2.0.0
2026-07-13 18:50:30 +01:00
```
2026-11-11 08:35:50 +00:00
## Rolling back across the store format
A consumer that upgrades and writes a store holding an element id leaves a
2026-11-11 08:50:18 +00:00
`cultcache.store.v3` single-file store (`v5` directory store). Refusal by name depends on the store kind and the pin. A **directory ** store (`v5` ) is refused by every Unity pin from `cultlib-unity-v1.0.57` and `caching-unity-v1.2.0` on (the earliest tags of each line whose `DirectoryMessagePackBackingStore` reads only the `v4` stamp: "only ... is readable"). A **single-file ** store (`v3` ) is refused only from `cultlib-unity-v2.0.0` and `caching-unity-v2.0.0` : `cultlib-unity-v1.0.61` and `caching-unity-v1.4.0` read the header string and never compare it. The NuGet line (`cultlib-v1.0.32` , the last `cultlib-v` tag) refuses neither: its directory store writes `cultcache.store.v1.directory` and never checks the stamp on read. Rolling back a single-file store to any of those pins reads it silently, drops the ids, and can rewrite the elements without them. That is the dangerous case. There is
2026-11-11 08:43:06 +00:00
no general carry-back; restore from a copy taken before upgrading, and upgrade
readers before writers. Detail: the Store format and rollback section of
2026-11-11 08:35:50 +00:00
`src/GameCult.Caching/README.md` .