dmypy server always restart when using --shadow-file
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
Bug Report
dmypy server restart if an option is changed, while it makes sense for most options, I don't think it make sense for --shadow-file.
If the sources to check used temporary files and --shadow-file to help mypy to understand where this temporary file comes.
dmypy server restart on each dmypy run because of the temporary file name change or the source to check change.
Expected Behavior
dmypy ignores --shadow-file when it compares Options.snapshot() between the client and the server. So mypy daemon stay warm.
Actual Behavior
dmypy server always returns {"restart": "configuration changed"} to the client and get retarted.
Your Environment
- Mypy version used: 0.920
- Mypy command-line flags: --shadow-file myfile.py tempfile myfile.py
- Python version used: python 3.10
- Operating system and version: arch
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing dmypy’s comparison of client and server Options.snapshot() during dmypy run, focusing on how --shadow-file changes trigger the configuration-changed response. Confirm that changing temporary file names or source paths no longer restarts the daemon, while other option changes still do.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100