Conan version ranges not working with loosely names packages.
See original GitHub issueTo help us debug your issue please explain:
- I’ve read the CONTRIBUTING guide.
- I’ve specified the Conan version, operating system version and any tool that can be relevant.
- I’ve explained the steps to reproduce the error or the motivation/use case of the question/suggestion.
Conan Version 1.12.2 Distributor ID: Ubuntu Description: Ubuntu 16.04.5 LTS Release: 16.04 Codename: xenial
This is a workaround for: https://github.com/conan-io/conan/issues/4600, see latest comments
Conan version ranges don’t work as expected with include_prerelease=True
I’m expecting it to be able to find my latest package, but it does not.
I have the following packages on artifactory:
CastleConanCommon/0.0.3@master/latest
CastleConanCommon/0.0.4-3-gff22b81@master/latest
The 0.0.4
is now using git describe
to uniquely version every commit.
a test conanfile with
class testConanfile(ConanFile):
name = "testConanfile"
version = "1.0.0"
generators = "virtualenv"
build_requires = "CastleConanCommon/[>=0.0.4, include_prerelease=True]@master/latest"
This results in the conan install . -u
to fail
# conan install . -u
Configuration:
[settings]
arch=x86_64
build_type=Debug
compiler=gcc
compiler.libcxx=libstdc++
compiler.version=5
os=Linux
[options]
[build_requires]
[env]
ERROR: Version range '>=0.0.4, include_prerelease=True' from requirement 'CastleConanCommon/[>=0.0.4, include_prerelease=True]@master/latest' required by 'virtual' could not be resolved
However, if I change the build_requires to
build_requires = "CastleConanCommon/[>=0.0.3, include_prerelease=True]@master/latest"
it works…
I’d expect that semver would recognized the first part 0.0.4-3-gff22b81
as 0.0.4
and be able to find the package.
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (5 by maintainers)
@jgsogo here is the code I’m using to restructure the git tag to fit the
node-semver
if it’s useful for the documentation. We are using tags withvX.Y.Z
pattern on our master branches. As mentioned, this was a workaround until the upcomingpackage revision
feature is out (to enforce dependency tree rebuilds on every commit withfull_package_mode
). See https://github.com/conan-io/conan/issues/4600 for details.Updated with some testing on
package revisions
in https://github.com/conan-io/conan/issues/4600