theme-language-server: checks get dropped while a forced runChecks is pending
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- devtools
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 245
- Fork
- 108
- Merge trung bình
- 2 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 24
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Shopify/theme-tools
-
ThemeCheck incorrectly reports error when `with` is used in snippetCó thể đã có người làm @efegokdemir đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Shopify/theme-tools#1408 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
CdnPreconnect misses `href="https://cdn.shopify.com"` without a trailing pathCó thể đã có người làm @RaphaelFakhri đã nhận 33 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Shopify/theme-tools#1365 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
theme-graph CLI never calls getWebComponentMap, so custom-element references are never resolvedCó thể đã có người làm @reginaldalfret đã nhận 50 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Shopify/theme-tools#1291 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
JSONMissingBlock false positive for app block when section supports both @app and @themeCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Shopify/theme-tools#1144 · 2 bình luận · 8 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
theme-language-server: creating or deleting a folder leaves stale readDirectory/stat cacheCó thể đã có người làm @efegokdemir đã nhận 13 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
Shopify/theme-tools#1386 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của Shopify/theme-tools
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 66/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
prometheus/docs#3198 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
[Bug]: OpenCode v2 skips an assistant message that gains text after an earlier captureCó thể đã có người làm @jianyx1 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
volcengine/OpenViking#8354 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ARTPARK-SAHAI-ORG/calibrate-frontend#842 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Chat: Copying a selection that includes the end of a message also copies the actions menu labelsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
suitenumerique/hub#176 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày