No Diagnostics from CodeQL Language Server
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 領域
- devtools
調査の方向性
codeql execute language-server --check-errors=ON_CHANGE -v で一連の手順を再現します。ワークスペースを初期化し、codeql-pack.yml を開いてから、構文エラーと意味エラーを含む .ql ファイルを開きます。pack の読み込みに関する LSP 通知と初期化オプションを調査します。pack を開いた後に診断が再開されるために必要な設定または通知を特定できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
CodeQL Language Server suppresses diagnostics when a QL pack is loaded
Context:
We are building a headless Python LSP client for CodeQL to automate query synthesis. We are using the CodeQL CLI version 2.20.1 (via codeql execute language-server).
Current Implementation:
- Server Start:
codeql execute language-server --check-errors=ON_CHANGE -v - Initialization: Standard
initializerequest withrootUripointing to a workspace. - Pack Setup: We create a valid
codeql-pack.ymlin the workspace withdependencies: { codeql/cpp-all: "^4.3.1" }and runcodeql pack install. - Pack Loading: We send
textDocument/didOpenfor thecodeql-pack.ymlfile to trigger pack resolution (this successfully fixes "unresolved module" errors). - Query Opening: We send
textDocument/didOpenfor a.qlquery file inside the pack.
library: false
name: temp-workspace
version: 0.0.0
dependencies:
codeql/cpp-all: ^4.3.1
The Issue:
When we do not open the codeql-pack.yml file (Pack Mode inactive), the server reports diagnostics correctly (e.g., "could not resolve module cpp" or syntax errors). However, we no other solution like qlpack.yml was working to correctly point the language server to standard library location, even with --search-path or putting the search path explicitly in initializationOptions
However, as soon as we do open the codeql-pack.yml file (Pack Mode active), the server stops reporting ALL diagnostics for subsequently opened query files.
- Semantic errors (e.g.,
import non_existent_module) -> 0 diagnostics - Syntax errors (e.g.,
select 1 +) -> 0 diagnostics
Observations:
- The server does not send any
workspace/configurationrequests to the client. - The server does not send any
client/registerCapabilityrequests. - Providing a valid
databasepath ininitializationOptionsdoes not resolve the issue. - The
didOpenfor the pack file appears to successfully load the dependencies (because the "unresolved module" error disappears), but it seems to put the diagnostic engine into a silent state.
Question:
Is there a specific LSP notification, configuration option, or initialization parameter required to re-enable continuous diagnostic reporting (--check-errors=ON_CHANGE) after a QL pack has been loaded?
Technical Context:
CodeQL CLI Version: 2.20.1 (implied from dependencies)
Transport: Stdio with JSON-RPC 2.0
OS: Windows 11
Arguments: codeql execute language-server --check-errors=ON_CHANGE -v
Thanks for your time!
Rajat
- 主要言語
- TypeScript
- スター
- 539
- フォーク
- 240
- 平均マージ
- 2日 6時間
- マージ済み PR(30日)
- 29
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/vscode-codeql のほかの issue
-
bug VSCode
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
github/vscode-codeql#4471 · コメント 1 件 ·
-
bug enhancement VSCode
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
github/vscode-codeql#592 · コメント 2 件 ·
-
enhancement VSCode
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
github/vscode-codeql#4432 · コメント 1 件 ·
-
bug VSCode
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
github/vscode-codeql#4356 ·
-
bug VSCode
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
github/vscode-codeql#4339 · コメント 1 件 ·
github/vscode-codeql の issue をすべて見る
似ている issue
-
clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
ZCode 3.14.3 に対応する オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
supermomonga/zcode-acp#24 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
growthbook/growthbook#7100 ·
-
triage
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100