-
Notifications
You must be signed in to change notification settings - Fork 994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python_requires behavior in Conan2 is different #17669
Comments
Hi @Jannis1994 Some preliminary feedback. Note many of those also applied for Conan 1, they are not strictly new of Conan 2.
But this is nothing new of Conan 2. |
Hi @memsharded, thank you for your valauble feedback. I will talk with our DevOps team about the improvement suggestions from your side. With regards to the main question,
then the a_compatibility is transferred to all packages as it is visible in Profile host and Profile build.
Unfortunately this is causing another problem:
So I guess our problem is mostly related to option inheritance to dependencies. In Conan1 this was working different. For aplication_zzz we for instance had to override a_compatibility from 99.99.1 to 99.99.0 because the application team delivered with this wrong/old version.
Thank you. |
In Conan1 the configuration was looking like this:
I also tried to understand -o options: |
This looks weird, are you sure there is no other upstream recipe that overrides I see the |
I just checked it again and this error message was thrown by a bad conanfile.py that was used as a dummy for copy the first packages from conan1 style to conan2 style. I have to verify things now, thank you already for the help. Sometimes it helps to try to explain a problem. |
Rubber duck debugging for the win! 😂 |
Yep that is right ;). But there are still some problems - different - yet.
The package application_abc has the following conanfile.py with a different a_compatibility set to 50.1.1 (could be the case if application delivered not as desired, but should not stop the conan create command):
Cannot override this with Only way I see currently is a new package with the following content: |
This is probably a bit off-topic, but as I see the |
Sorry, it is not very clear who is doing this. Is there are another package with a |
I also have maybe a better solution that I am currently testing. It is something like the following:
Could get nasty if we have more overrides. But that is something the applications should prevent and need to be enforced by us. In general I would be interested in your compatibility.py approach 👍 |
Yes we have one big package that has like 17 dependencies (1 requires - base package and 16 build requires -applications) to other packages. We integrate them and then deliver a new package. |
Hello together,
we have a complex project where we also use the [python_requires] dependency app-base in our application deliveries.
The setup was working fine in Conan1 but in Conan2 we have problems.
Example in Conan2:
conaninfo.txt file of application xy:
We have this application xy in our dependency list as build_requires.
We call conan create like this:
Error log:
and:
With conan list command I can see that a_compatibility is set inside the options of package application_xy.
Conanfile.py from app-base:
application xy conanfile.py:
Do you know what could be the problem?
It looks like that it tries to execute python_requires dependency again, but this dependency could only be solved at the creation of the application. Because it uses a Docker container to read out a_compatibility option value. During our conan create call it should not try to resolve the python requires of the dependency application. It should just take the binaries and the options. Was there a big change between Conan1 and 2?
Already took a look here:
https://docs.conan.io/2/reference/extensions/python_requires.html
and:
#13486
Thanks for your help.
Best regards,
Jannis
The text was updated successfully, but these errors were encountered: