[feature] Use numerical version comparison in range resolver as long as version string is in the format a.b.c(.d.e)
See original GitHub issueWe tried to use four-digit version numbers and resolve them with version range expressions. The handling of these (non-semver-compliant) version strings seems to be inconsistent in Conan. With Conan on Linux we observed that a version 3.8.0.1
is considered newer than a 3.8.0.0
when resolving the range [*]
. Trying the same on Windows resolves always to 3.8.0.0
. There were also reports that for some users it would yield unexpected results on Linux as well, but I haven’t confirmed that yet.
I think it would be beneficial if someone could look into this and rework the range resolver so that strictly numerical versions in the form a.b.c(.d.e…) still behave according to semver as far as the first three digits are concerned. Any extra digits (.d.e…) should be semantically equivalent to the patch version and compared numerically up to the first -
or +
. What do you think?
- I’ve read the CONTRIBUTING guide.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (7 by maintainers)
We’re using node-semver==0.8.0 in prod, haven’t encountered an issue with it. Upgrade appreciated!
This has landed on node-semver 0.8.0. Here is the upstream issue where it is resolved. Very little has changed in node-semver since 0.6.1, which conan specifies as an exact dependency:
https://github.com/conan-io/conan/blob/bd5920a40d9707001b31966adb0dfa7d6af00eea/conans/requirements.txt#L9
Please can someone update the dependency to >=0.8.0? I would have sent a pull request but unfortunately I would have to seek approval to do so, so it would take a while.