-
Notifications
You must be signed in to change notification settings - Fork 989
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
import conanfile just once #4095
import conanfile just once #4095
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make a couple of changes, but not so important.
client = TestClient() | ||
conanfile = """from conans import ConanFile | ||
mycounter = 0 | ||
class Pkg(ConanFile): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, add a counter associated with the instance.
@@ -181,6 +181,7 @@ class SayConan(ConanFile): | |||
|
|||
def root(self, content, update=False): | |||
processed_profile = ProcessedProfile() | |||
self.loader.cached_conanfiles = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as @jgsogo. It shouldn't be necessary. Why did you add it? Maybe we are missing something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check the above comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but take a look to our comments.
Missing docs! Shouldn't be merged until we have it. |
As you wanted to discuss it I tagged it as whiteboard so you can explain it. |
* import conanfile just once * reset cache * fixing tests * review
Changelog: Feature: Optimize the graph loading, specially of build-requires, by avoiding importing more than once the same conanfile.py
Docs: Omit
This optimization could be relevant to flatten the dependency graph when build requires are applied to the whole graph.