Pair each ref with the version kind it publishes; stamp the version into the library #63
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/claude-code-query!63
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/publish-gate-and-buildinfo"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two changes, both consequences of cutting 0.5.0.
1. The publish collision that made the 0.5.0 tag run fail
Tag
v0.5.0andmainnamed the same commit, and that commit carriedpublishVersion = "0.5.0". Both refs match this workflow's trigger, so two runs raced to publish the same version:main) — published first, succeeded.v0.5.0) —HttpTransporterException: HTTP Status: 409. The registry refuses to overwrite a release.The release itself was fine — all five artifacts are live at 0.5.0 — but the failure would repeat on every release, because
mainholds the release version for the span of one commit between the release commit and the bump back to a snapshot.The publish step now runs only when the ref and the version kind match:
-SNAPSHOT-SNAPSHOT2. The version is available at runtime
BuildInfocompilespublishVersionintoworks.iterative.claude.core.BuildInfo.version, so an application using the SDK can report which version it runs.The value comes from the literal in
build.mill, not from git state. Deriving it from git was considered and rejected:mill.util.VcsVersionbuilt in, and it works here.format()yields0.5.0-1-f1cfdeone commit past a tag — a new coordinate per commit. Consumers would lose the ability to pin0.6.0-SNAPSHOTand pick up the newest build.Task.InputanddirtyHashis part of the state, so any uncommitted edit would change the constant and recompile every module that depends oncore.actions/checkout@v4here is a shallow clone with no tags. Verified: a--depth 1clone of this repo has 0 tags andgit describe --tagsfails, so the version would silently fall back to0.0.0.A literal has none of those properties.
Verification
./mill __.test— SUCCESS, including the two newBuildInfoTestcases./mill __.fix --check— SUCCESSval version: String = "0.6.0-SNAPSHOT"claude-code-query-core_3POM gains no dependency — the plugin is build-time onlyuispike.laminar.fullLinkJSgzip 217852 B, under the 256000 B gate (BuildInfo is JVM-only)