theme-language-server: creating or deleting a folder leaves stale readDirectory/stat cache
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
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá 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 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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- 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: checks get dropped while a forced runChecks is pendingCó thể đã có người làm @efegokdemir đã nhận 11 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
Shopify/theme-tools#1385 · 1 bình luận ·
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