microsoft / vscode-powerquery-sdk

Power Query Connector Development SDK for VS Code
MIT License
72 stars 12 forks source link

Command Statements - Output Relative Path #97

Closed bgribaudo closed 2 years ago

bgribaudo commented 2 years ago

The command statements displayed in the Output window contain absolute paths when they reference files from the connector project.

c:\Users\ben\.vscode\extensions\powerquery.vscode-powerquery-sdk-0.1.3\.nuget\Microsoft.PowerQuery.SdkTools.2.109.6\tools\pqtest.exe run-test 
--extension c:\Users\ben\Desktop\TestConnector\BenTest\bin\AnyCPU\Debug\BenTest.mez 
--queryFile c:\Users\ben\Desktop\TestConnector\BenTest\BenTest.query.pq 
--prettyPrint

pqtest.exe works fine with relative paths (relative to the current working directory).

To make Output’s contents less verbose, one idea would be to render out paths in arguments relative to that working directory.

For example, the above would become:

c:\Users\ben\.vscode\extensions\powerquery.vscode-powerquery-sdk-0.1.3\.nuget\Microsoft.PowerQuery.SdkTools.2.109.6\tools\pqtest.exe run-test 
--extension bin\AnyCPU\Debug\BenTest.mez 
--queryFile BenTest.query.pq 
--prettyPrint

Just an idea, for what it’s worth.

mattmasson commented 2 years ago

The Output window is meant for trace/debug purposes. We're tracking an improvement to add log levels to control verbosity, but at least during this initial preview period, I'd like as much detail as possible in the traces.

When we trace command execution, the parameters and format should be an exact match to what we pass to the external process. Showing the quotes (#96) makes sense if that is what we're passing to pqtest.exe, but rewriting or reformatting parameters is misleading and makes issues harder to reproduce.

bgribaudo commented 2 years ago

@mattmasson

When we trace command execution, the parameters and format should be an exact match to what we pass to the external process. Showing the quotes (https://github.com/microsoft/vscode-powerquery-sdk/issues/96) makes sense if that is what we're passing to pqtest.exe, but rewriting or reformatting parameters is misleading and makes issues harder to reproduce.

Very much agree with things matching. Thinking that this change could possibly be made in the backend and so then would be automatically reflected on the front end.