github / vscode-codeql

An extension for Visual Studio Code that adds rich language support for CodeQL

Home Page:https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-codeql

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compare results fails between query result and quick evaluation

rvermeulen opened this issue · comments

Describe the bug
When running a query and a quick-eval on a testproj, comparing the results using the compare results action fails with the error

Failed to show results: Schema undefined not found.

Version
CodeQL extension version: 1.8.2
CodeQL CLI version: 2.12.6
Platform: Darwin x64

VS Code Version: 1.77.2 (Universal)
VS Code Commit: e344f1f539a80912a0e9357cec841f36ce97a4e2

To reproduce

  1. Create a testproj database from a failing test case.
  2. Use the testproj database to run a query.
  3. Quick eval part of the query that is compliant for comparing using the compare results command.
  4. See the error message.

Expected behavior
Expected to see a result difference.

Additional context

Getting a chance to look at this now. The problem is that the compare view chooses the first common result set that is shared between both queries to display, but quick eval creates a custom named result set, so there is no common result set.

Two things to do:

  1. Provide better error message if a matching result set can't be found.
  2. Use better matching heuristics for result sets. First try to match on exact name (as now) and then try to match on the first #-prefixed result set in each query.

Will be available in next release of the extension.