-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Daemon mode optimal behavior when there are no module interface changes #4212
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
Comments
I think the latest PR (dmypy3 branch) essentially works this way. I'll keep this open until I'm sure. |
It looks like the dmypy3 branch works like this when there are no errors, but once there is an error, it'll process all dependencies. It would be great if this could be extended to handle errors. |
Ah yes, we need to do better when there are errors.
|
… cache Closes python#4212. However, there are still many scenarios where a trivial error affects the interface hash and hence causes a recheck of everything downstream. Also, this affects regular incremental mode too (making it faster, but if there's a bug in my logic, it will also be hit by that bug.)
… cache Closes python#4212. However, there are still many scenarios where a trivial error affects the interface hash and hence causes a recheck of everything downstream. Also, this affects regular incremental mode too (making it faster, but if there's a bug in my logic, it will also be hit by that bug.)
I don't think I have the chops to fix this, so unassigning. |
This should already work efficiently in fine-grained incremental mode, so I don't think that there's anything that needs to be done any more. |
I'm recording an idea so that I won't lose track of it. It's possible be that this is how dmypy already works.
Assume that module
a
importsb
and we are using dmypy. Assume thata
is much larger thanb
(it could be many modules). Now we modifyb
so that the public interface doesn't change. We could considera
dirty and process it to ensure that there won't be any references to the old version ofb
in the in-memory cache. This would be expensive, however. An alternative would be to not processa
but to just drop the module from the in-memory cache (while retaining the JSON cache file). This way any sequence of internal modifications tob
would be very fast as they'd only require processingb
.@gvanrossum Please close this if this is how dmypy already works (or if this is a bad idea).
The text was updated successfully, but these errors were encountered: