-
Notifications
You must be signed in to change notification settings - Fork 7
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
Implement recursive handling of import #23
Conversation
It also requires the dev version of beniget :-) |
6b33bfe
to
e679548
Compare
Not mergeable yet: I need to implement support of dependencies in the cache system |
83dd596
to
b57ec5c
Compare
ready for review, cc @JohanMabille and @marimeireles |
6da191b
to
f7f7976
Compare
The recursive strategy basically states that if a symbol uses a symbol that uses a symbol that... uses a deprecated symbol, even within a deep module hierarchy, it is deprecated. - it's optional - it's still incompatible with the caching system (no dep handling)
d565692
to
3c30ac1
Compare
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.
Honestly, the caching part is still a little bit of dark magic to me, but the import logic and the recursion seems super good.
When recursive import is activated, a change in an imported file may have an impact on the validity of the cache. To prevent that, we integrate the hash of each imported module to the key. This currently makes the computation much slower, there's probably another way to handle that.
Do not recompute the same key twice, using a key factory. Speedup dependency computation using native ast module and short-circuiting. Minimal documentation.
3c30ac1
to
5e2d3bd
Compare
The recursive strategy basically states that if a symbol uses a symbol that uses
a symbol that... uses a deprecated symbol, even within a deep module hierarchy,
it is deprecated.