Setting --shadow-file makes dmypy reload daemon(perf issue)
オープン
まだ誰も着手していません。
performance
topic-daemon
- 主要言語
- Python
- スター
- 20.6k
- フォーク
- 3.3k
- PR マージ指標
- PR 指標を取得中
説明
This is a bug report.
- Minimal repro
$ touch test.py
$ cp test.py /tmp/test.py
$ dmypy run test.py
Daemon started
Success: no issues found in 22 source files
$ dmypy run test.py
Success: no issues found in 1 source file
$ dmypy run -- --shadow-file test.py /tmp/test.py test.py
Restarting: configuration changed
Daemon stopped
Daemon started
Success: no issues found in 22 source files
- What is the actual behavior/output?
dmypyinterprets setting--shadow-fileas a "configuration change" and reloads the mypy daemon. This effectively counteracts the whole point of having a daemon since it takes a long time to reload the daemon. - What is the behavior/output you expect?
dmypyshould not interpret--shadow-filechanges as configuration changes. It should use the existing daemon instead of reloading. - What are the versions of mypy and Python you are using?
Python 3.8.2.
mypy 0.790+dev.2e9afec83a5214f4a0eaf57a96034230b8460379
The mypy install is from Github master as of thirty minutes ago. - What are the mypy flags you are using? (For example --strict-optional)
The repro above describes this. There are nomypy.ini(or friends) files in the directory.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、dmypy が --shadow-file オプションをどのように処理し、設定が変更されたと判断するのかを追跡します。最小再現を使用して、shadow file を変更しても daemon が停止または再起動せず、型チェックが期待されるソースファイル数で引き続き成功することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- cli, tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 35/100