Perl-Toolchain-Gang / CPAN-Meta

Specifications for CPAN distribution META files
37 stars 40 forks source link

Clarify version description given Lyon compromise #109

Open haarg opened 8 years ago

haarg commented 8 years ago

One part of the decision in the Lyon compromise was that underscores in dotted-integer versions should be ignored rather than treated as a tuple separator. This brings them in line with numeric versions, where the underscores are similarly ignored. The text in CPAN::Meta::Spec states

This are equivalent in format to Perl "v-strings", with some additional restrictions on form. They must be given in "normal" form, which has a leading "v" character and at least three integer components. To retain a one-to-one mapping with decimal versions, all components after the first should be restricted to the range 0 to 999. The final component may be separated by an underscore character instead of a period.

This is still basically compatible with the Lyon compromise. It does imply meaning to the underscore that no longer applies, however that is mostly not a large issue because the spec doesn't say anything about how these versions should be interpreted, instead pushing that off on the version module.

However, if we were to update the text to be in line with Lyon, it would become more restrictive. Specifically, v1.2_3 is valid under the current spec. But if _ is no longer a component separator, it becomes illegal due to the requirement of three components.

kentfredric commented 8 years ago

I think its only logical to treat it identically how we currently treat v1.23.

If v1.23 is illegal, then v1.2_3 is also.

Though this is likely a backwards incompatible change to Spec validation if we tried to enforce this, which may require a minor version increment in the Spec definition before we start yelling at this.

haarg commented 8 years ago

What I'd prefer is some adjustment to the text, given Lyon, but without changing the actual requirements.