python / python/mypy

.gitignore file in cache is created too late

Aperta
#12,442 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug
Lingua principale
Python
Stelle
20.6k
Fork
3.3k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

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

  1. this is related to mypy hanging during metastore creation (in which case it might make sense to create the .gitignore file immediately after creating the directory, and not after finishing the store), or
  2. 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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Confronta il flusso di creazione della cache e di .gitignore con le modifiche mostrate in PR #8193 e considera l’interazione con il blocco di metastore descritto nell’issue #12225. Riproduci una prima esecuzione all’interno di un repository Git senza una posizione della cache configurata, quindi verifica che .gitignore compaia prima che vengano scritti grandi numeri di file di cache e che il comportamento esistente della cache rimanga invariato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
tooling
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.