Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Code Hinting for Rust is really Slow #21080

Open
Labels
questionFurther information is requested
@johnzhu0907

Description

Version

  • CodeQL: CodeQL command-line toolchain release 2.23.8.
  • VS Code CodeQL extension version: 1.17.7
  • VS Code version: Version: 1.107.1 (Universal)
  • Platform: MacOS

Description of the issue

Currently, I'm writing CodeQL for Rust in VS Code; however, the code hinting is really slow, and the issue does not exist when writing a ql script for GoLang.

Here are some parts of the logs in CodeQL Language Server.


{"jsonrpc":"2.0","id":1245,"result":[{"name":"AstNodeImpl","kind":2,"range":{"start":{"line":0,"character":0},"end":{"line":119,"character":0}},"selectionRange":{"start":{"line":0,"character":0},"end":{"line":119,"character":0}},"detail":"","children":[{"name":"Impl","kind":2,"range":{"start":{"line":9,"character":0},"end":{"line":118,"character":1}},"selectionRange":{"start":{"line":13,"character":7},"end":{"line":13,"character":11}},"detail":"","children":[{"name":"AstNode","kind":5,"range":{"start":{"line":31,"character":2},"end":{"line":117,"character":3}},"selectionRange":{"start":{"line":31,"character":8},"end":{"line":31,"character":15}},"detail":"","children":[{"name":"getParentNode","kind":6,"range":{"start":{"line":32,"character":4},"end":{"line":37,"character":86}},"selectionRange":{"start":{"line":37,"character":12},"end":{"line":37,"character":25}},"detail":"","children":[]},{"name":"getEnclosingCallable","kind":6,"range":{"start":{"line":39,"character":4},"end":{"line":48,"character":5}},"selectionRange":{"start":{"line":41,"character":13},"end":{"line":41,"character":33}},"detail":"","children":[]},{"name":"getEnclosingCfgScope","kind":6,"range":{"start":{"line":50,"character":4},"end":{"line":59,"character":5}},"selectionRange":{"start":{"line":52,"character":13},"end":{"line":52,"character":33}},"detail":"","children":[]},{"name":"hasEnclosingCfgScope","kind":6,"range":{"start":{"line":61,"character":4},"end":{"line":62,"character":76}},"selectionRange":{"start":{"line":62,"character":14},"end":{"line":62,"character":34}},"detail":"","children":[]},{"name":"getEnclosingBlock","kind":6,"range":{"start":{"line":64,"character":4},"end":{"line":73,"character":5}},"selectionRange":{"start":{"line":66,"character":14},"end":{"line":66,"character":31}},"detail":"","children":[]},{"name":"isInMacroExpansion","kind":6,"range":{"start":{"line":75,"character":4},"end":{"line":76,"character":92}},"selectionRange":{"start":{"line":76,"character":14},"end":{"line":76,"character":32}},"detail":"","children":[]},{"name":"isFromMacroExpansion","kind":6,"range":{"start":{"line":78,"character":4},"end":{"line":84,"character":96}},"selectionRange":{"start":{"line":84,"character":14},"end":{"line":84,"character":34}},"detail":"","children":[]},{"name":"getACfgNode","kind":6,"range":{"start":{"line":86,"character":4},"end":{"line":116,"character":56}},"selectionRange":{"start":{"line":116,"character":12},"end":{"line":116,"character":23}},"detail":"","children":[]}]},{"name":"getParentOfAstStep","kind":6,"range":{"start":{"line":19,"character":2},"end":{"line":29,"character":3}},"selectionRange":{"start":{"line":26,"character":18},"end":{"line":26,"character":36}},"detail":"","children":[]}]}]}]}Content-Length: 1926
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///Users/johnzhu/Workspace/codeql-lab/rust-ql/solana-queries/src/signer-authorization.ql","diagnostics":[{"range":{"start":{"line":39,"character":19},"end":{"line":39,"character":30}},"severity":1,"source":"","message":"regexpMatch(string) cannot be resolved for type NameImpl::Impl::Name"},{"range":{"start":{"line":41,"character":11},"end":{"line":41,"character":19}},"severity":1,"source":"","message":"could not resolve type PathType"},{"range":{"start":{"line":42,"character":16},"end":{"line":42,"character":21}},"severity":1,"source":"","message":"getTy() cannot be resolved for type SuspiciousAccountField.extends"},{"range":{"start":{"line":54,"character":13},"end":{"line":54,"character":21}},"severity":1,"source":"","message":"could not resolve type PathType"},{"range":{"start":{"line":55,"character":24},"end":{"line":55,"character":29}},"severity":1,"source":"","message":"getTy() cannot be resolved for type ParamImpl::Impl::Param"},{"range":{"start":{"line":57,"character":77},"end":{"line":57,"character":82}},"severity":1,"source":"","message":"getTy() cannot be resolved for type TypeArgImpl::Impl::TypeArg"},{"range":{"start":{"line":57,"character":86},"end":{"line":57,"character":94}},"severity":1,"source":"","message":"could not resolve type PathType"},{"range":{"start":{"line":58,"character":15},"end":{"line":58,"character":33}},"severity":1,"source":"","message":"getRecordFieldList() cannot be resolved for type SuspiciousAccountField"},{"range":{"start":{"line":74,"character":18},"end":{"line":74,"character":28}},"severity":1,"source":"","message":"getNameRef() cannot be resolved for type FieldExprImpl::Impl::FieldExpr"},{"range":{"start":{"line":77,"character":25},"end":{"line":77,"character":32}},"severity":1,"source":"","message":"getExpr() cannot be resolved for type FieldExprImpl::Impl::FieldExpr"}]}}[2025年12月24日 11:48:51] ExternalModuleBindingPass ...
[2025年12月24日 11:48:51] ExternalModuleBindingPass time: 00:00.000
[2025年12月24日 11:48:51] CollectInstantiationsPass ...
[2025年12月24日 11:48:51] CollectInstantiationsPass time: 00:00.000
[2025年12月24日 11:48:51] Ql checks ...
Content-Length: 394
{"jsonrpc":"2.0","id":1244,"result":[{"range":{"start":{"line":37,"character":12},"end":{"line":37,"character":25}},"kind":3},{"range":{"start":{"line":42,"character":29},"end":{"line":42,"character":49}},"kind":2},{"range":{"start":{"line":53,"character":29},"end":{"line":53,"character":49}},"kind":2},{"range":{"start":{"line":67,"character":29},"end":{"line":67,"character":49}},"kind":2}]}Content-Length: 222
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///Users/johnzhu/Workspace/codeql-lab/codeql/qlpacks/codeql/rust-all/0.2.2/codeql/rust/elements/internal/AstNodeImpl.qll","diagnostics":[]}}[2025年12月24日 11:48:51] Ql checks time: 00:00.286
[2025年12月24日 11:48:51] ExternalModuleBindingPass ...
[2025年12月24日 11:48:51] ExternalModuleBindingPass time: 00:00.000
[2025年12月24日 11:48:51] CollectInstantiationsPass ...
[2025年12月24日 11:48:51] CollectInstantiationsPass time: 00:00.000
[2025年12月24日 11:48:51] Ql checks ...
[2025年12月24日 11:48:51] Ql checks time: 00:00.000
[2025年12月24日 11:48:54] ExternalModuleBindingPass ...
[2025年12月24日 11:48:54] ExternalModuleBindingPass time: 00:00.001
[2025年12月24日 11:48:54] CollectInstantiationsPass ...
[2025年12月24日 11:48:54] CollectInstantiationsPass time: 00:00.000
Content-Length: 149
{"jsonrpc":"2.0","id":1246,"error":{"code":-32800,"message":"The request (id: 1246, method: \u0027textDocument/inlayHint\u0027) has been cancelled"}}Content-Length: 1619
{"jsonrpc":"2.0","id":1247,"result":[{"name":"signer-authorization","kind":2,"range":{"start":{"line":0,"character":0},"end":{"line":93,"character":0}},"selectionRange":{"start":{"line":0,"character":0},"end":{"line":93,"character":0}},"detail":"","children":[{"name":"AccountsStruct","kind":5,"range":{"start":{"line":16,"character":0},"end":{"line":28,"character":1}},"selectionRange":{"start":{"line":20,"character":6},"end":{"line":20,"character":20}},"detail":"","children":[{"name":"AccountsStruct","kind":9,"range":{"start":{"line":21,"character":2},"end":{"line":27,"character":3}},"selectionRange":{"start":{"line":21,"character":2},"end":{"line":21,"character":16}},"detail":"","children":[]}]},{"name":"SuspiciousAccountField","kind":5,"range":{"start":{"line":30,"character":0},"end":{"line":83,"character":1}},"selectionRange":{"start":{"line":34,"character":6},"end":{"line":34,"character":28}},"detail":"","children":[{"name":"SuspiciousAccountField","kind":9,"range":{"start":{"line":35,"character":2},"end":{"line":46,"character":3}},"selectionRange":{"start":{"line":35,"character":2},"end":{"line":35,"character":24}},"detail":"","children":[]},{"name":"getUsingFunction","kind":6,"range":{"start":{"line":48,"character":2},"end":{"line":66,"character":3}},"selectionRange":{"start":{"line":51,"character":11},"end":{"line":51,"character":27}},"detail":"","children":[]},{"name":"hasSignerCheck","kind":6,"range":{"start":{"line":68,"character":2},"end":{"line":82,"character":3}},"selectionRange":{"start":{"line":71,"character":12},"end":{"line":71,"character":26}},"detail":"","children":[]}]}]}]}Content-Length: 1619
{"jsonrpc":"2.0","id":1249,"result":[{"name":"signer-authorization","kind":2,"range":{"start":{"line":0,"character":0},"end":{"line":93,"character":0}},"selectionRange":{"start":{"line":0,"character":0},"end":{"line":93,"character":0}},"detail":"","children":[{"name":"AccountsStruct","kind":5,"range":{"start":{"line":16,"character":0},"end":{"line":28,"character":1}},"selectionRange":{"start":{"line":20,"character":6},"end":{"line":20,"character":20}},"detail":"","children":[{"name":"AccountsStruct","kind":9,"range":{"start":{"line":21,"character":2},"end":{"line":27,"character":3}},"selectionRange":{"start":{"line":21,"character":2},"end":{"line":21,"character":16}},"detail":"","children":[]}]},{"name":"SuspiciousAccountField","kind":5,"range":{"start":{"line":30,"character":0},"end":{"line":83,"character":1}},"selectionRange":{"start":{"line":34,"character":6},"end":{"line":34,"character":28}},"detail":"","children":[{"name":"SuspiciousAccountField","kind":9,"range":{"start":{"line":35,"character":2},"end":{"line":46,"character":3}},"selectionRange":{"start":{"line":35,"character":2},"end":{"line":35,"character":24}},"detail":"","children":[]},{"name":"getUsingFunction","kind":6,"range":{"start":{"line":48,"character":2},"end":{"line":66,"character":3}},"selectionRange":{"start":{"line":51,"character":11},"end":{"line":51,"character":27}},"detail":"","children":[]},{"name":"hasSignerCheck","kind":6,"range":{"start":{"line":68,"character":2},"end":{"line":82,"character":3}},"selectionRange":{"start":{"line":71,"character":12},"end":{"line":71,"character":26}},"detail":"","children":[]}]}]}]}[2025年12月24日 11:49:02] ExternalModuleBindingPass ...
[2025年12月24日 11:49:02] ExternalModuleBindingPass time: 00:00.000
[2025年12月24日 11:49:02] CollectInstantiationsPass ...
[2025年12月24日 11:49:02] CollectInstantiationsPass time: 00:00.000
Content-Length: 145
{"jsonrpc":"2.0","id":1251,"error":{"code":-32800,"message":"The request (id: 1251, method: \u0027textDocument/hover\u0027) has been cancelled"}}[2025年12月24日 11:49:03] ExternalModuleBindingPass ...
[2025年12月24日 11:49:03] ExternalModuleBindingPass time: 00:00.000
[2025年12月24日 11:49:03] CollectInstantiationsPass ...
[2025年12月24日 11:49:03] CollectInstantiationsPass time: 00:00.000
Content-Length: 126
{"jsonrpc":"2.0","id":1248,"result":[{"range":{"start":{"line":37,"character":4},"end":{"line":37,"character":24}},"kind":2}]}[2025年12月24日 11:49:10] ExternalModuleBindingPass ...
[2025年12月24日 11:49:10] ExternalModuleBindingPass time: 00:00.000
[2025年12月24日 11:49:10] CollectInstantiationsPass ...
[2025年12月24日 11:49:10] CollectInstantiationsPass time: 00:00.000

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /