theme-language-server: checks get dropped while a forced runChecks is pending
メンテナーはふだん 2 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 76/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- devtools
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- 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: creating or deleting a folder leaves stale readDirectory/stat cache対応中かも @efegokdemir が 13 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
Shopify/theme-tools#1386 ·
メンテナーはふだん 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 日以内に返信