What's the deal with requiring release tags to start with "v"?

Terraform users experience provider versions like 1.2.3, but the registry requires those providers to be tagged on GitHub with values like v1.2.3.

Is this some grandfathered-in nonsense because somebody used a v ages ago, or is the v solving a problem which I haven’t spotted yet?

I’m noodling over a similar webhook-triggered release handling process for an unrelated project and found myself wondering why the v is important.

Thanks!

Personally i prefer using the “v”, as I find it aesthetically pleasing.

It might also make it easier for “anchoring” regex" expressions? :grinning_face:

I honestly don’t remember where the two different version formats within the codebase are derived from, probably lost to history, but the practice of using v existed well before Terraform. The Go ecosystem requires v as part of the version number.

The official semver site does acknowledge that prefixing a version with v is common practice to visually indicate that it’s a version number, and is often used with VCS tags (which we do rely on ourselves for versioning).

Thanks @runeron and @jbardin.

Personally i prefer using the “v”, as I find it aesthetically pleasing.

I like it too, and tend to unconsciously include the v when typing required_providers blocks from memory. Then Terraform corrects me :slight_smile:

The official semver site does acknowledge that prefixing a version with v is common

Common, but not permitted, apparently.

The fact that hashicorp’s parsing library accounts for it came as a little bit of a surprise when I started digging into this question.

Between that and the registry docs insisting on the v, I thought there might be some deeper meaning that I was missing out on.

Thanks!