New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix CallerInfo()
source file paths
#1288
Conversation
👍 thank you so much for this - it's been driving me nuts. |
I compare test output before and after this PR (source code: https://github.com/bozaro/testify-example).
|
A create tree with two files:
And run Before
File After
|
@boyan-soubachov, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution :)
This breaks the Terminal File Links detection in VSCode, if you enable trimpaths. If you use Go Modules at ~/Repos/myrepo and the module is "github.com/me/myrepo" then this prints:
This is annoying, and to me it was not clear how to fix this. Apparently I had "trimpaths" enabled, but I will now disable it again. Leaving this comment for discoverability by others. |
@hermanbanken , is there a way to fix it so that it works for |
Currently not I think, except maybe only doing trimpaths for the non-current module (is that possible?). I've submitted this feature request: golang/vscode-go#2737. I spend so much time debugging this debugging pulling my hair out that I want to avoid others from the same pain... |
Summary
Error Trace
produce strange output with invalid file paths: it join current execution directory and base source filename, but source file can be located in another directory.It is especially strange that these path conversions are not needed, since the desired path initially got from stacktrace.
Related issues
Fix #1230
Fix #1268