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

Tree view of build issues in Problems pane

Open isgursoy opened this issue 1 year ago • 7 comments

In VS Code, the "Problems" pane does not provide a tree/chain view for the build issues with QBS, and I need to read the entire QBS build output to find where the specific error comes from. "Problems" view only marks the lowest level location as the source of the error, standard library header. Screenshot from 2023-10-15 17-03-45

For example, Qt Creator can do that by quoting relevant build output under the entry listed in the "Issues" pane, so at least I can see the levels in textual form. Screenshot from 2023-10-15 17-16-49

Is there anything I can do on my side to fix that?

isgursoy avatar Oct 15 '23 14:10 isgursoy

Hi, to be honest, I don't know. ))

Maybe it is impossible, you may look how it looks e.g. in CMake extension as an example. If there are a more usefull "issues" details, then we can copy/paste the implementation from there. ))

denis-shienkov avatar Oct 20 '23 10:10 denis-shienkov

Maybe something like "Defining a multiline problem matcher" over the compiler's complete terminal log?

isgursoy avatar Oct 20 '23 10:10 isgursoy

Maybe, but I have not ideas.

denis-shienkov avatar Oct 26 '23 15:10 denis-shienkov

It is: https://code.visualstudio.com/docs/editor/tasks#_defining-a-multiline-problem-matcher:~:text=The%20pattern%27s%20first,regular%20expression%20matches.

isgursoy avatar Nov 03 '23 09:11 isgursoy

AFAIK, it is impossible to do something like yo want, because the format of vscode.Diagnostic is different...

E.g. this code:

		collection.set(vscode.Uri.file("/opt/cloud/projects/xyz.cpp"), [{
			code: 'code-123',
			message: 'Hello, Im error message',
			range: new vscode.Range(new vscode.Position(11, 22), new vscode.Position(33, 44)),
			severity: vscode.DiagnosticSeverity.Error,
			source: '',
			relatedInformation: [
				new vscode.DiagnosticRelatedInformation(new vscode.Location(vscode.Uri.file("/opt/cloud/projects/foo.cpp"), new vscode.Position(1, 0)), 'Related message 1 blablabla'),
				new vscode.DiagnosticRelatedInformation(new vscode.Location(vscode.Uri.file("/opt/cloud/projects/bar.cpp"), new vscode.Position(10, 10)), 'Related message 2 blablabla'),
			]
		}]);

produces the following issues on a pane:

изображение

So, what do you want to see at all in the issues pane?

denis-shienkov avatar Nov 04 '23 11:11 denis-shienkov

Can we simply parse the error stack from compiler output for relatedInformation field as each layer for each "Related message"?

isgursoy avatar Nov 04 '23 22:11 isgursoy

Maybe yes, maybe no, it depends on the used compiler.

You can provide some simple compiled error output (just for an example), and also provide a current QtC and VScode issues output for same errors... And then we can see how it can be improved for VSCode... Because that your screenshoots are soo complex. Need to start from something simple to understand a main idea how to do it..

denis-shienkov avatar Nov 05 '23 09:11 denis-shienkov