-
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] Generate() vs. Imports() behavior #17700
Comments
Hi @valenotary Thanks for your question The Could you please provide something that we can reproduce on our side? Like some minimal |
@memsharded thanks for the quick response! I apologize, I can't share the code exactly because it's private for work, and I'm not sure if a minimal example would exactly recreate it. I can however describe more of the setup (and specifically what might be weird):
Based on that last part... I am assuming because no recipe explicitly depends on A, but instead the nested classes within them, that A's Please let me know if there's anything more I can explain. |
No, this Could you please outline the A, B, C classes, how it looks like regarding the inheritance, is it using |
Okay, I'll try my best. Also you were right, my apologies: We call # relevant conan and os imports
# ...
class RecipeAConanFile(ConanFile):
name = "RecipeA"
# ... other recipe attributes
def generate(self):
# print statements and other copying SHOULD be happening here, but doesnt
# ... other methods like requirements, init, etc
class NestedModule(object):
# other typical conanfile attributes and methods. we call python_requires to THIS nested class
# generate is also defined in this base nested class, and gets invoked properly during conan command And an example of a child recipe that would depend on stuff from recipe A (specifically, # relevant conan and os imports
# ...
class RecipeBConanFile(ConanFile):
python_requires = "RecipeA"
python_requires_extend = "RecipeA.NestedModule" So recipes |
What is your question?
We are in the middle of migrating over to Conan2 -- we originally had some method override for the imports() method that we naively just moved to generate(). However, we're noticing now that the generate() method is not being executed (i.e. just for debugging, we tried putting some output logs in the generate method and just saw they werent being printed)... Are there any glaring pieces I might be missing in my understanding of how to migrate this/use generate() properly? Maybe my usecase might need some additional steps beyond changing just the method name?
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: