metadata.json ">= 1.x" version requirements

14 views
Skip to first unread message

Dominic Cleal

unread,
May 26, 2017, 7:40:32 AM5/26/17
to Puppet Developers
Hello,

In metadata-json-lint, we have an issue about whether to mark ">= 1.x"
(a literal "x") version requirements as permitted or not.

https://docs.puppet.com/puppet/latest/modules_metadata.html#version-specifiers
states that "1.x" version requirements can't be mixed with greater/less
than operators, but recently under PUP-6373, semantic_puppet started
parsing them.

I've opened https://github.com/puppetlabs/semantic_puppet/pull/24 to
disallow them again, but is this correct?

Does anybody know if a) they should start to be allowed , b) if
semantic_puppet should disallow them, or c) if semantic_puppet may allow
them but metadata-json-lint should disallow them?

Cheers,

--
Dominic Cleal
dom...@cleal.org

Thomas Hallgren

unread,
May 26, 2017, 5:50:12 PM5/26/17
to puppe...@googlegroups.com
In Puppet 5.0.0, where SemanticPuppet 1.0.0 is used,  ">= 1.x" is a legal version requirement. It is interpreted as '>=1.0.0'. Mixing operator and .x branches can be somewhat confusing though, and therefore not something that I'd recommend. For instance:

">1.x" is the same as ">2.0.0"

"<=2.x" is the same as "<3.0.0"

- thomas


--
Dominic Cleal
dom...@cleal.org

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/aea60427-c976-b857-fd91-d3383a2d3efa%40cleal.org.
For more options, visit https://groups.google.com/d/optout.

Dominic Cleal

unread,
May 30, 2017, 3:27:22 AM5/30/17
to puppe...@googlegroups.com
On 26/05/17 22:50, Thomas Hallgren wrote:
> In Puppet 5.0.0, where SemanticPuppet 1.0.0 is used, ">= 1.x" is a
> legal version requirement. It is interpreted as '>=1.0.0'. Mixing
> operator and .x branches can be somewhat confusing though, and therefore
> not something that I'd recommend.

Thanks for the reply. I'll revisit the test in the linter then, but may
add a warning back - both for the incompatibility with Puppet 4 and for
the confusing syntax.

--
Dominic Cleal
dom...@cleal.org

David Schmitt

unread,
May 30, 2017, 3:38:56 AM5/30/17
to puppe...@googlegroups.com

+1

Cheers, David

--
Dominic Cleal
dom...@cleal.org

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+unsubscribe@googlegroups.com.

Thomas Hallgren

unread,
May 30, 2017, 3:44:42 AM5/30/17
to puppe...@googlegroups.com
I noticed a typo in my reply. ">1.x" is the same as ">=2.0.0", not ">2.0.0" as I wrote earlier.

- thomas

Reply all
Reply to author
Forward
0 new messages