django-stubs icon indicating copy to clipboard operation
django-stubs copied to clipboard

Include current `django-stubs` version in reporting of config data

Open flaeppe opened this issue 1 year ago • 2 comments

I'm not 100% sure but I think that if you change version of django-stubs but keep the same version of mypy after a cached run, mypy reuses the cache and there could possibly be crashes or all sorts of, strange, errors emitted for the second run.

But if we're able to include the current django-stubs version when we report config data in

https://github.com/typeddjango/django-stubs/blob/f04323aaec46118125484248fbd9c00966f0ed0e/mypy_django_plugin/main.py#L307-L314

We should get "automatic" cache tainting whenever switching between django-stubs versions.

I must admit that I haven't gotten around to try out if this is indeed a problem, it's just a suspicion so far. Gonna have to see if I can find 2 django-stubs versions and a snippet of code that backs up my suspicion here. Think I've recently run in to this in one of the projects I'm working on though.

What's wrong

How is that should be

System information

  • OS:
  • python version:
  • django version:
  • mypy version:
  • django-stubs version:
  • django-stubs-ext version:

flaeppe avatar Aug 13 '24 08:08 flaeppe