-
Notifications
You must be signed in to change notification settings - Fork 6
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
Can you expose the option of specifying a cache folder #15
Comments
I can confirm that the plugin is not taking advantage of |
Hello @JBKahn and @conanfanli, The current linter-mypy implementation handles cache-dir like that: A unique cache-dir is currently being created in the OS temp folder for each file being linted (opened in a text editor) (it uses the md5 of the file path as a unique signature). This strategy is maybe not fully optimal but:
Effectively with this strategy, the cache-dir folder is not shareable with other external tools. I am curious to know what is your use case precisely. How do you share cache dir? Note: I am not a fan of tools polluting source code with temp/cache data so What exactly do you confirm? how did you come to that conclusion (one minute after the bug was created)? What exactly makes you conclude that "it is not taking advantage of cache-dir."? Which missing behavior would make it takes advantage of cache-dir? |
The problem with this strategy is that large projects with large numbers of files and imports don't share cache across the project. So each time I open a new file, it takes minutes to finish running. In an ideal world, and the way I try to use it is to have a |
@JBKahn 1- No cache data (by setting the path to "/dev/null")
4- Mypy default behavior, by using/creating a folder named .mypy_cache in the same folder as the file being linted (by setting the path to a dot ".") @JBKahn, Could you test to see if using the code present in the commit 3519521 works well for your setup. If everything is good, I'll soon push a new release. |
Works great for me |
This is now available in linter-mypy v2.6.0 |
Thanks @elarivie |
Using a temp directory based on the filepath is much slower than allowing me to specify a path, especially if I use it on the CLI as well and then I can share a cache folder with other apps.
The text was updated successfully, but these errors were encountered: