theme-language-server: creating or deleting a folder leaves stale readDirectory/stat cache
メンテナーはふだん 2 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- devtools
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 245
- フォーク
- 108
- 平均マージ
- 2日 8時間
- マージ済み PR(30日)
- 24
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Shopify/theme-tools のほかの issue
-
ThemeCheck incorrectly reports error when `with` is used in snippet対応中かも @efegokdemir が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
Shopify/theme-tools#1408 ·
メンテナーはふだん 2 日以内に返信
-
CdnPreconnect misses `href="https://cdn.shopify.com"` without a trailing path対応中かも @RaphaelFakhri が 32 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Shopify/theme-tools#1365 ·
メンテナーはふだん 2 日以内に返信
-
theme-graph CLI never calls getWebComponentMap, so custom-element references are never resolved対応中かも @reginaldalfret が 50 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Shopify/theme-tools#1291 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
JSONMissingBlock false positive for app block when section supports both @app and @theme再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Shopify/theme-tools#1144 · コメント 2 件 · リアクション 8 件 ·
メンテナーはふだん 2 日以内に返信
-
theme-language-server: checks get dropped while a forced runChecks is pending対応中かも @efegokdemir が 11 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
Shopify/theme-tools#1385 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
Shopify/theme-tools の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 66/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
prometheus/docs#3198 ·
メンテナーはふだん 3 日以内に返信
-
[Bug]: OpenCode v2 skips an assistant message that gains text after an earlier capture対応中かも @jianyx1 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
volcengine/OpenViking#8354 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ARTPARK-SAHAI-ORG/calibrate-frontend#842 ·
メンテナーはふだん 1 日以内に返信
-
Chat: Copying a selection that includes the end of a message also copies the actions menu labelsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
suitenumerique/hub#176 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信