Conan: potential "conan alias" bug

Created on 3 Jan 2018  路  4Comments  路  Source: conan-io/conan

OS: Ubuntu 17.04
conan version: 1.0.0b3

Hi, it seems that there is a bug resolving dependencies when using aliases. We are currently still on conan 0.25.1 because of the change regarding wildcard matches in 0.26.0. When trying to fix those issues I ran into a new problem with aliases.

What I am trying to do is have an OpenSSL package which can be wildcard (or something similar) matched. Since conan can no longer match wildcards to OpenSSL version numbers (letter at the end) I tried making an alias OpenSSL/1.0.2@... --> OpenSSL/1.0.2l. All works fine until you have a diamond dependency where two different packages require the OpenSSL package.

To reproduce:
package base/someversion@...
alias base/1.0.0@... --> base/someversion@...
package x1/v1@... (requires base/1.0.0)
package x2/v1@... (requires base/1.0.0)
package fails/v1@... (requires x1/v1@... and x2/v1@...)

when running conan create on the fails folder i get:

fails/v1@aa/aa: Exporting package recipe
fails/v1@aa/aa export: Copied 1 '.h' files: hello.h
fails/v1@aa/aa export: Copied 1 '.cpp' files: hello.cpp
fails/v1@aa/aa export: Copied 1 '.txt' files: CMakeLists.txt
fails/v1@aa/aa: The stored package has not changed
ERROR: Conflict in x2/v1@aa/aa
Requirement base/1.0.0@aa/aa conflicts with already defined base/someversion@aa/aa
Keeping base/someversion@aa/aa
To change it, override it in your base requirements

to reproduce see repo https://github.com/lousyphreak/conan-alias-fail

bug

Most helpful comment

Works like a charm, thanks!

The least I can do for a project that makes my life so much easier is put up a somewhat complete bug report ;)

All 4 comments

Thanks for reporting this, with such a complete report and example code. I was able to reproduce it. Now checking what is happening and if a fix if possible.

Works like a charm, thanks!

The least I can do for a project that makes my life so much easier is put up a somewhat complete bug report ;)

Released in beta4:

$ pip install conan==1.0.0b4 --upgrade

Many thanks!

Was this page helpful?
0 / 5 - 0 ratings