-
-
Notifications
You must be signed in to change notification settings - Fork 636
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
Pythonpath invalidation of pantsd can be overly broad with large sourceroots #9902
Comments
Would like to note @illicitonion's comment here about the possibility of super super fine-grained (possibly using content-addressed code) invalidation of |
The cost of this issue is significantly reduced via #10052 and by the fact that the invalidation glob fingerprinting became lazy in #10035. I'm going to remove it from TODO for the project. As @cosmicexplorer and @illicitonion mentioned though, it's likely that we can invalidate differently for plugins from pants' own implementation code. It's likely that we could hot-reload plugins/backends, since we don't have any global state that would interfere with using something like https://stackoverflow.com/questions/437589/how-do-i-unload-reload-a-python-module (nonetheless: potentially dragons). |
Talking with @asherf about this, it seemed like one of the issues here is that we don't have any particular target associated with plugin loading, and so we can't use dependency inference (for example) to apply our much more fine-grained inference to plugins. This is the bootstrap problem: we need to load the engine to use our target logic, and we need to load (some) plugins to load the engine. This relates to #10360 (comment) : if we had a bootstrap instance of the engine, we could use that to then load loose source plugins with file watching and inference. |
pantsd
defaults to restarting for changes to any file located on its ownpythonpath
(since the contents might have been loaded into memory). But the toolchain repo (for example) puts the entiresrc/python
directory on thepythonpath
... and that contains significantly more than just plugins. This causespantsd
to restart much more often than it actually needs to.A few potential options here:
!/path
) things from invalidation globs that are part of thepythonpath
, but which they know aren't relevant.The text was updated successfully, but these errors were encountered: