python / python/mypy

Setting --shadow-file makes dmypy reload daemon(perf issue)

オープン
#9,309 コメント 6 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

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?
    dmypy interprets setting --shadow-file as 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?
    dmypy should not interpret --shadow-file changes 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 no mypy.ini (or friends) files in the directory.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、dmypy が --shadow-file オプションをどのように処理し、設定が変更されたと判断するのかを追跡します。最小再現を使用して、shadow file を変更しても daemon が停止または再起動せず、型チェックが期待されるソースファイル数で引き続き成功することを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
cli, tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。