Expand description
Releases of a git-sourced capability, read from the repository’s tags (RFC-101).
Nobody assigns versions to skills today, so Tuff derives them from the
one convention that already exists in the wild: a tag such as v1.4.0.
A monorepo tags per capability, <name>/v1.4.0 or <name>-v1.4.0, and
when any tag is scoped to the capability only those count, so a repo-wide
v2.0.0 cannot be mistaken for a release of one of its skills.
Everything here is pure: the caller lists the tags (git ls-remote) and
clones the chosen one. The lockfile keeps pinning the commit; the tag and
the requirement are recorded beside it so update can move within the
requirement and outdated can say how far behind an install is.
Structs§
- Release
Tag - A tag that names a release of one capability.
Enums§
- TagIntegrity
- Whether the tag an install was pinned to still names the commit that was installed. A tag is mutable by design; the lockfile pins the commit, so the install itself is unaffected, but a tag that now names different content means the version you have may not be what you think it is. That is a different finding from “a newer release exists”.
- Version
Request - What the user asked for after the
@inname@1.2.0orname@^1.2.
Functions§
- change_
kind - The claimed size of moving from one release to another, read from the
version numbers alone. It is what the author claimed, not what the diff
shows, which is why
outdatedprints it beside the versions andtuff diff --upstreamstays one keystroke away. - latest_
release - The newest release, if there is one.
- parse_
release_ tag - Read one tag as a release of
name, if it is one. Recognised shapes arev1.4.0and1.4.0for the whole repository, and<name>/v1.4.0or<name>-v1.4.0, with or without thev, for one capability in it. - release_
tags - The releases of
nameamong a repository’s tags, oldest first. When any tag is scoped to the capability, only scoped tags count: a monorepo’s repo-wide tag is not a release of one of its members. - resolve_
release - Choose the release of
namethat satisfiesrequest, from a raw tag list, with an error that says what was available when nothing does. - select_
release - The newest release satisfying the request.
- split_
version_ request - Split
name@requirementinto its parts. A barenamehas no requirement; an empty name or an empty requirement is a usage error. - tag_
integrity