Skip to content

Conversation

@ilevkivskyi
Copy link
Member

This fixes the coarse grained part of #7777. I do not change semantics for daemon for two reasons:

  • Performance penalty from this fix will be minor for regular incremental, but may be well visible for the daemon.
  • And (more importantly) and just don't want to open this another can of worms (yet).

Some notes:

  • The general logic is straightforward, invalidate dependent modules, if import options for their dependencies changed.
  • It looks like the problem only affects suppressed dependencies, in all other situations we either already invalidate because something gets added to/removed from dependencies (e.g. when follow_imports = skip <-> normal), or there is no effect on the caller/importer (e.g. when follow_imports = normal <-> silent).
  • This requires another entry for CacheMeta but good new is I have an idea how to get rid of another entry I added in one of recent PRs. Essentially I will need to record early (import) errors anyway to send to parallel workers after we switch to parallel parsing, and if we do this we won't need the imports_ignored entry.

@ilevkivskyi ilevkivskyi requested a review from JukkaL February 9, 2026 14:46
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant