Conan: wide-open version range on command-line now misinterpreted as path

Created on 15 Oct 2019  路  3Comments  路  Source: conan-io/conan

In the provisioning scripts to create jenkins slaves, I have several commands of the style

conan install name/[*]@user/channel --profile foo which are intended to pre-download the latest available version of a package to be baked in to the VM disk image, so that it will not have to be re-extracted by each job (the compute resources are launched ephemerally).

For a few of these packages, there is also some action in the deploy() method (e.g. registering with the CMake package registry to bootstrap find_package(cmake-conan).

I just updated these provisioning scripts to conan 1.19, and such commands seem to no longer work; they are mis-interpreted as file paths, and now fail with

ERROR: Conanfile not found at ERROR: Conanfile not found at $PWD/name/[*]@user/channel

Instead of the expected

ERROR: Version range '' from requirement 'package/[]@user/channel' required by 'virtual' could not be resolved in local cache

(or of course success, if I had used a real name/user/channel instead of bogus placeholders). But the error that this is being treated as a file paths rather than a references is visible even with no real package. However, this is not happening with version ranges in general, just '*': otherwise-equivalent forms like conan install package/[x]@user/channel --profile foo or conan install package/[>=0]@user/channel --profile foo seem to work fine.

searching among the releases on pypi, this seems to have broken between conan 1.17.2 and 1.18.0, so I suspect some change to parsing with the changes that made user/channel optional.

It's not a big deal to just change these scripts to use [x] instead of [*], but it seems likely to have been unintentional (if it was on purpose, maybe https://docs.conan.io/en/latest/versioning/version_ranges.html should warn against the use of '*' in semver ranges?).

I see the same behavior on both windows 10 (python 3.7.4) and linux (ubuntu bionic, python 3.6.8).

low medium bug

All 3 comments

Reproduced, yes, this seems a regression. Submitting a PR for 1.19.2 to be released soon.
Thanks for the report!

Merged, will be in 1.19.2

Confirmed fixed in 1.19.2, thanks for the super quick turnaround!

Was this page helpful?
0 / 5 - 0 ratings