Skip to content

SchemaVersion pattern rejects majors of 10+ and 0.x versions #239

Backlog

Description

@jmeridth

#SchemaVersion in spec/schema.cue rejects valid versions with a major of 10 or more, and any 0.x.y version.

The pattern is ^[1-9]+\.[0-9]+\.[0-9]+$. [1-9]+ only allows the digits 1 through 9 in the major, so 10.0.1 and 0.1.0 both fail while 2.2.0 and 2.10.0 pass. Nothing breaks today, since current versions are 2.x, but a major of 10 or a 0.x version would fail validation.

Something like ^(0|[1-9][0-9]*)\.[0-9]+\.[0-9]+$ would accept them. Whether 0.x should be valid at all is a call for maintainers.

Found while reviewing #235.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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