Defile #RREV:PACKAGE_ID in conanfile.txt cause conan install failed
Environment Details (include every applicable attribute)
- Operating System+version: Both Mac or Windows
- Compiler+version:not need
- Conan version:1.36.0
- Python version:2.7.16
Steps to reproduce (Include if Applicable)
in conanfile.txt we defile request with #RREV:PACKAGE_ID like this: [requires] jsoncpp/1.9.3@myuser/testing#fca0383e6a43348f7989f11ab8f0a92d:3fb49604f9c2f729b85ba3115852006824e72cab
Logs (Executed commands with output) (Include/Attach if Applicable)
ERROR: The revision field, must contain only letters and numbers with a length between 1 and 51
Hi @baby4bamboo
You cannot request specific package-id in conanfile. You specify the recipe reference, down to the recipe revision, but not including the package_id part.
The binary that needs to be downloaded is computed as a function of the input settings, options (profile), and dependencies versions.
But in conan doc ,it says we can add package_id in conanfile :https://docs.conan.io/en/latest/versioning/revisions.html You can specify the references in the following formats: lib/1.0@conan/stable#RREV:PACKAGE_ID#PREV
Yes, this is not well explained in the docs, it doesn't mean that it can be used in the conanfile.txt or conanfile.py, but it might be used in other contexts (maybe search, remove, etc).
This should be better explained in the docs, transferring this issue to the docs repo, to clarify it in the docs.