Skip to content

Standard does not exactly specify allowed format for versioned tags #495

@embray

Description

@embray

I'm not sure if we always intended to require that tags have a version associated with them, more that it's a strong recommendation. Nevertheless, this is used pretty universally, and we even allow version wildcards in schemas à la asdf-format/asdf#838 which makes a little more formal the notion of tag versions (see #271).

But nowhere does the standard formalize the format <tag_name>-<version>.

We do specify that the version part should follow Semantic Versioning, but the standard does not actually formally specify the above <tag_name>-<version> format.

Making matters worse, we do say that a pre-release version suffix is allowed, and this is separated from the base version also by a -. The format of the pre-release version is fairly loose and can also contain -.

In effect, it's impossible to know how to split the version part of a tag name because versions can contain hyphens, but we don't actually specify that the tag base name cannot contain hyphens.

We should either:

  • Disallow pre-release versions in tag versions (this seems to be rare/unheard of?) and state that the version always comes after the last hyphen in a tag name
  • Disallow hyphens in tag names (this is already done by convention it seems, but it's not clear in the standard).

Not having clarity about this turns out to be a headache for implementers wishing to parse tag versions 😉

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions