theme-language-server: creating or deleting a folder leaves stale readDirectory/stat cache
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- devtools
Direzione di ricerca
Start in startServer and trace how watched-file create, delete, and rename events invalidate readDirectory, stat, and readFile caches. Check how paths are represented and where the workspace root is determined before changing invalidation. Done when creating or deleting nested folders, and renaming files across folders, refresh directory listings and stats without restarting the server.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi! When a watched-file event creates or deletes a file, startServer only invalidates readDirectory for that file's own folder (path.dirname(change.uri)), plus readFile and stat for the file itself.
That's not enough when the event creates or removes a whole folder. Say a theme has no snippets/ folder yet, and then snippets/card.liquid is created. readDirectory of the theme root and stat of snippets/ are still cached from before, so the server keeps thinking snippets/ doesn't exist. Snippet completion stays empty until you restart the server. The same happens the other way round when the last file in a folder is deleted: the cached root listing still has the folder, and walking it fails.
What fixed it for us was invalidating readDirectory and stat for every folder above the created or deleted file, up to the root, not just its direct parent. Renames have the same problem, since they also only invalidate the two parent folders.
We hit this on 2.21.2, and main looks the same. Happy to send a PR.
- Lingua principale
- TypeScript
- Stelle
- 245
- Fork
- 108
- Merge medio
- 2g 8h
- PR unite (30g)
- 24
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Shopify/theme-tools
-
ThemeCheck incorrectly reports error when `with` is used in snippetForse già presa @efegokdemir l’ha presa 3 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Shopify/theme-tools#1408 ·
I maintainer di solito rispondono entro 2 giorni
-
CdnPreconnect misses `href="https://cdn.shopify.com"` without a trailing pathForse già presa @RaphaelFakhri l’ha presa 32 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Shopify/theme-tools#1365 ·
I maintainer di solito rispondono entro 2 giorni
-
theme-graph CLI never calls getWebComponentMap, so custom-element references are never resolvedForse già presa @reginaldalfret l’ha presa 50 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Shopify/theme-tools#1291 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
JSONMissingBlock false positive for app block when section supports both @app and @themeForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Shopify/theme-tools#1144 · 2 commenti · 8 reazioni ·
I maintainer di solito rispondono entro 2 giorni
-
theme-language-server: checks get dropped while a forced runChecks is pendingForse già presa @efegokdemir l’ha presa 11 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
Shopify/theme-tools#1385 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di Shopify/theme-tools
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 66/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
prometheus/docs#3198 ·
I maintainer di solito rispondono entro 3 giorni
-
[Bug]: OpenCode v2 skips an assistant message that gains text after an earlier captureForse già presa @jianyx1 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
volcengine/OpenViking#8354 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ARTPARK-SAHAI-ORG/calibrate-frontend#842 ·
I maintainer di solito rispondono entro 1 giorno
-
Chat: Copying a selection that includes the end of a message also copies the actions menu labelsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
suitenumerique/hub#176 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno