python / python/mypy

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

Đang mở
#9,309 6 bình luận 1 reaction 0 người được giao Xem trên GitHub

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?
    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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. 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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.