-
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
[question] conan 2.12.0 KeyError on python-require #17648
Comments
Hi @jwatson0 Thanks for your report. It seems your code is using some non-public, non-documented private imports in: from conans.model.conanfile_interface import ConanFileInterface
from conans.model.pkg_type import PackageType
from conans.model.build_info import _Component These imports have been moved in Conan 2.12 to the new It is likely that some import like If you want to share your usages of those things in the code, I might try to help to guide how it would be possible to get rid of them. |
Ah, yes. I went rummaging through the python datastructures looking for the data that I knew was in there, but I couldn't find through the public interface. I would very much like to update this to the public interfaces, and hopefully the data is available in the restructured APIs. Background: The conan generator needs to support the following:
The generator source is available here: The steps that use the private python interfaces are basically this:
The output is similar to this:
We also experimented with a custom deployer, but that didn't work as well for us. I haven't yet looked for any interfaces newly available in conan 2.12.0, and I may have overlooked some obvious existing interface. The doc on custom generators got me started, but I think the detailed data that I needed was missing from the dependency output. Do you think this data is available now in a public interface? Thanks, |
We have made this recent release a good effort to keep pushing the public API, and we have started to move things and design to make parts of the model public. The first step was the We have also added a warning for next release to warn users against internal imports and encourage to submit tickets with the use cases to analyze if it makes sense to make them part of the public API. As a recommendation, I'd suggest to drop the types such as |
So, in short, no, those classes are not public in the API yet.
|
Thanks, I'll update to use that. |
Describe the bug
This just started happening in our CI builds as soon as we picked up conan 2.12.0. Reverting to 2.11.0 resolves the problem.
I haven't narrowed it down yet, but I wanted to get this report up quickly. Not sure yet if this is a regression or a known breaking change.
We have a somewhat complex conan config that uses a python-require to load a custom generator for our lbstanza language compiler.
The conan dependency is slm -> lbstanzagenerator_pyreq
This is the error we're getting with 2.12.0:
lbstanzagenerator_pyreq conanfile.py:
slm conanfile.py
conan list:
These conan packages are in a private artifactory, not on conan-center.
I'll update this when I narrow down the issue, but let me know if this looks relevant to a recent change.
How to reproduce it
The text was updated successfully, but these errors were encountered: