.gitignore file in cache is created too late
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 20.6k
- Forks
- 3.3k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
Bug Report
While mypy is running "infinitely long" (compare #12225), and it's run inside a Git repo, and it's run there for the first time, and the cache location is not set, ..., many cache files (>1900 in my case) are created before any .gitignore file appears. This confuses VS Code quite a bit.
I checked https://github.com/python/mypy/pull/8193/files, and either
- this is related to mypy hanging during metastore creation (in which case it might make sense to create the
.gitignorefile immediately after creating the directory, and not after finishing the store), or - this is related to the cache directory being created in a different piece of code.
The fact that the gitignore file is created after I Ctrl-C the hanging mypy instance makes me think it's 1. So regardless of the root cause of #12225, I wonder if the .gitignore file should be created earlier.
Your Environment
- Mypy version used: 0.942
- Mypy command-line flags: none
- Mypy configuration options from
mypy.ini(and other config files):
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_calls = true
disallow_untyped_defs = true
show_error_codes = true
- Python version used: 3.10.3
- Operating system and version: Linux
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Vergleiche den Ablauf der Erstellung von Cache und .gitignore mit den in PR #8193 gezeigten Änderungen und berücksichtige die Wechselwirkung mit dem in Issue #12225 beschriebenen metastore-Hänger. Reproduziere einen ersten Lauf innerhalb eines Git-Repositorys ohne konfigurierten Cache-Speicherort und überprüfe anschließend, dass .gitignore erscheint, bevor große Mengen von Cache-Dateien geschrieben werden, und dass das bestehende Cache-Verhalten intakt bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100