Repository navigation
Conversation
…n#15622) The daemon documentation only mentioned that a daemon process supports one set of source files, leaving open whether adding a file to the command line requires a restart (and loses the cached state). The running daemon picks up files added to the command line and type checks them without a restart, so the cached state is preserved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #15622.
The daemon documentation says that "Each mypy daemon process supports one user and one set of source files", but it does not say what happens when that set changes between runs — in particular whether adding a file to the command line requires a restart and loses the cached state.
It does not. The running daemon picks up files added to the command line and type checks them without a restart, so the cached state is preserved. To type check different sets of files at the same time, run one daemon per set, each with its own status file.
Verified with a daemon started from a checkout of
main:The second run reuses the running daemon (no "Restarting:" message) and reports the error in the newly added file.
The documentation builds cleanly with
sphinx-build -W.🤖 This contribution was drafted with AI assistance; the analysis, the change and the verification are described above so that they can be reviewed.