-
Notifications
You must be signed in to change notification settings - Fork 646
Attempt to get absolute path on every line of test output causes wrongful paths #1836
Comments
Well, we intentional present the complete path so that it is clickable and the corresponding file opens in the editor on the right line number :) |
Ah..., I see. |
There is no option to override it at the moment. The output channel doesnt support relative links but the integrated terminal does. |
This recently caused some confusion for me as the heuristic is overly greedy and will prepend the absolute path even if the short filename isn't the first item in the entry such as when you use both |
@haleyrc Can you give a small code sample where you see the issue so that I can take a look at what's causing it? |
@ramya-rao-a Absolutely, and sorry for the delay. https://github.com/haleyrc/vscode-go-issue demonstrates the issue I'm having. |
Interesting... I see it now. I believe this only happens when you are using the The fix should be pretty straight-forward. We shouldnt be attempting to get the absolute path on an output line unless it is for a test failure. Such lines are always preceeded by a PRs are most welcome to fix this issue. Code Pointers:
|
Okay this is something I can work on if no one else has dibs on this 😁 |
Go ahead @MagnumOpus21 :) Remember to test all the 4 test commands:
|
It's probably worth mentioning the following issue here: golang/go#25369 It looks like a possible "fix" for this issue is to make sure that the output line starts with at least a tab (pre go-1.11) or with 4 spaces (go1.11+). Note @andybons comment:
It doesn't look like using the JSON output would help though because the filename still ends up in the 'Output' field. |
Hey all, I've pushed 2 changes to restrict the attempts to expand text that looks like a relative path
Please try the latest beta version of this extension that has these changes and let me know how it fares |
The above mentioned changes are now available in the latest version of this extension. |
Plugin version: 0.6.85
Go version: 1.10.3
Just a simple file, example_test.go:
This is the output by clicking
run package tests
from plugin:And this is the output from terminal directly, also what I expected:
Any idea?
The text was updated successfully, but these errors were encountered: