microsoft / sarif-vscode-extension

SARIF Microsoft Visual Studio Code extension
MIT License
110 stars 49 forks source link

openLogs API returns before SARIF Viewer finishes loading the requested logs #494

Open 50Wliu opened 1 year ago

50Wliu commented 1 year ago

Expectation: When I call and await the openLogs API from another extension, it doesn't return until the logs have been fully opened in the SARIF Viewer.

Actual: The call returns once the viewer is opened, but before the actual logs have been loaded into the viewer.

Impact: This is impacting our ability to integrate with the SARIF Viewer extension by first opening the SARIF logs in the viewer, then opening a file to a line that we know has corresponding results in the SAIRF Viewer. We'd like the SARIF Viewer to update and expand the result we just focused on, but because the logs haven't finished loading yet that doesn't work.

Repro: Await the openLogs API, then immediately try to open a document in VS Code to the line + column number that has a SARIF issue. The issue should be expanded in the SARIF Viewer, but it isn't until you click away and re-select it.