vscode-codeql icon indicating copy to clipboard operation
vscode-codeql copied to clipboard

Graph viewer: empty pane with no feedback on large graphs

Open nickrolfe opened this issue 3 years ago • 0 comments

When running graph queries that produce large graphs, the graph viewer in the extension just shows the CodeQL Query Results pane as an empty space, and I get no error feedback, even in the extension log.

Here's a query that reproduces the problem for me. You can change the value 9999 up or down to increase/decrease the size of the resulting graph.

/**
 * @kind graph
 * @id foo
 */
class Node extends int {
  Node() { this = [1 .. 9999] }
}

query predicate nodes(Node node, string attr, string val) {
  attr = ["semmle.label", "semmle.order"] and
  val = node.toString()
}

query predicate edges(Node a, Node b, string attr, string val) {
  b / 5 = a and
  (
    attr = "semmle.label" and val = ""
    or
    attr = "semmle.order" and val = b.toString()
  )
}

And here's what I see when I run that:

Screenshot 2022-05-04 at 16 11 54

Ideally, the graph would actually be rendered.

Failing that, I would like to see some kind of error feedback, and the ability to still view the raw edges and nodes results in table format. It might even be nice to give the option to just save a .dot file that I could manually run through graphviz.

nickrolfe avatar May 04 '22 15:05 nickrolfe