theme-language-server: checks get dropped while a forced runChecks is pending
Los mantenedores suelen responder en 2 días
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 76/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- devtools
Línea de trabajo
Start with src/utils/debounce.ts and trace how runChecks passes trigger URIs through normal and forced calls. Check the debounce tests and the language server call sites to see how multiple roots are handled. Done means pending checks are retained across calls and diagnostics arrive for every affected file; add or update tests for the reported timing cases.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hi! We run our own language server on top of startServer from @shopify/theme-language-server-common, and we noticed that sometimes an open file just never gets diagnostics until you edit it again.
I tracked it down to debounce in src/utils/debounce.ts. Once runChecks.force(...) has been called, every other call is ignored until that forced run has finished (if (timeoutId !== null && force) return;). And since only the arguments of the last call are kept, a normal call made within 100 ms of another one also replaces it.
So you can lose a check in a few ways:
- A file is opened while a forced run is waiting or running (for example right after a watched file changed). If the forced run already read its theme, that new file isn't in it, and its own request was ignored. No diagnostics.
- Two files from two different themes (two roots in the workspace) are opened within 100 ms. Only the second one gets checked.
- A forced call replaces a normal call that was still waiting.
It's easy to hit when the editor restores several tabs at startup while something on disk is changing.
What fixed it for us was keeping a set of all the trigger URIs from every call, forced or not, and passing all of them to the next run, instead of keeping only the last call. Happy to open a PR if that sounds like the right direction.
We reproduced it on 2.21.2, and the code on main looks the same.
- Lenguaje dominante
- TypeScript
- Estrellas
- 245
- Forks
- 108
- Merge medio
- 2 d 8 h
- PR fusionados (30 d)
- 24
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Shopify/theme-tools
-
ThemeCheck incorrectly reports error when `with` is used in snippetPosiblemente ocupada @efegokdemir la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Shopify/theme-tools#1408 ·
Los mantenedores suelen responder en 2 días
-
CdnPreconnect misses `href="https://cdn.shopify.com"` without a trailing pathPosiblemente ocupada @RaphaelFakhri la tomó hace 32 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Shopify/theme-tools#1365 ·
Los mantenedores suelen responder en 2 días
-
theme-graph CLI never calls getWebComponentMap, so custom-element references are never resolvedPosiblemente ocupada @reginaldalfret la tomó hace 50 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Shopify/theme-tools#1291 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
JSONMissingBlock false positive for app block when section supports both @app and @themeQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Shopify/theme-tools#1144 · 2 comentarios · 8 reacciones ·
Los mantenedores suelen responder en 2 días
-
theme-language-server: creating or deleting a folder leaves stale readDirectory/stat cachePosiblemente ocupada @efegokdemir la tomó hace 13 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
Shopify/theme-tools#1386 ·
Los mantenedores suelen responder en 2 días
Todos los issues de Shopify/theme-tools
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 66/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
prometheus/docs#3198 ·
Los mantenedores suelen responder en 3 días
-
[Bug]: OpenCode v2 skips an assistant message that gains text after an earlier capturePosiblemente ocupada @jianyx1 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
volcengine/OpenViking#8354 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ARTPARK-SAHAI-ORG/calibrate-frontend#842 ·
Los mantenedores suelen responder en 1 día
-
Chat: Copying a selection that includes the end of a message also copies the actions menu labelsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
suitenumerique/hub#176 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día