Setting --shadow-file makes dmypy reload daemon(perf issue)
Đang mở
Chưa có ai nhận issue này.
performance
topic-daemon
- Ngôn ngữ chính
- Python
- Star
- 20.6k
- Fork
- 3.3k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách theo dõi cách dmypy xử lý tùy chọn --shadow-file và quyết định rằng cấu hình đã thay đổi. Sử dụng bản tái hiện tối thiểu để xác minh rằng việc thay đổi tệp shadow không dừng hoặc khởi động lại daemon, trong khi việc kiểm tra kiểu vẫn thành công với số lượng tệp nguồn như mong đợi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- cli, tooling
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 35/100