Skip to content

[bug] Documentation issues with example for version ranges #4176

@snickl

Description

@snickl

Describe the bug

Hey,
at the bottom of https://docs.conan.io/2/tutorial/versioning/version_ranges.html it seems to say that 1.0-pre.1 will be included in the range [>1 <2, include_prerelease], but I tried it and it isn't.
Maybe it's meant to say >=1?

I also got quite confused by the upper bound where it says 2.0-pre1 is outside <2, which it is.
But a bit further up it says

A pre-release happens earlier in time than the release it is qualifying. So 1.1-alpha.1 is older than 1.1, not newer.

So logically, 2.0-pre1 should be included, because it's older=less than 2.

The real rule appears to be that pre-release qualifiers on packages are ignored in ranges comparisons.
As in "1.0-pre.1 is included with >=1 because for purposes of comparison it's 1.0, and not something less than 1.0".

Maybe the documentation can be made a bit clearer in that regard to avoid confusion for others.
Thanks!

How to reproduce it

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions