-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Cache is not being written or used #48
Comments
Are there any updates on this? I'm seeing a similar issue. |
We're seeing some pretty heavy slow downs from a development perspective because of this issue. Is there anyone that has found a workaround? |
Hey @adzenith long time no see! Didn't realize you were maintaining this. |
We are struggling with the same issue in a larger codebase that would definitely benefit from re-using cached mypy analysis results. A simple hack to side-step all of bazel's internal artifact caching / sandboxing would be to overrule the cache output target with
to make use of an explicitly set cache folder given by the |
The integration attempts to write out cache files using mypy's undocumented Bazel integration (
--bazel
,--package-root
, and--cache-map
) but these files are never written (due to sandboxing?). This can be reproduced by via the tests in this repo:If you temporarily disable sandboxing via
--spawn-strategy=standalone
, i.e.:and then run the tests again:
then our the cache files for our transitive dependencies are written to the output directory. However, it also writes our the cache files for the root dependency directory to the workspace:
If you enable verbose mypy logging (via setting the
DEBUG
variable inmypy.bzl
toTrue
and changing the tests so output to stdout and stderr), then you can see mypy's logs:(You'll note in the logs above that cache files appear to be written to 3 separate locations (
sandbox/processwrapper-sandbox/66/execroot
,bazel-out/k8-fastbuild/bin/test/
, and the workspace).The text was updated successfully, but these errors were encountered: