pass <package> to dlv test/debug if applicable#1164
pass <package> to dlv test/debug if applicable#1164ramya-rao-a merged 2 commits intomicrosoft:masterfrom
Conversation
ad6513d to
087b80d
Compare
|
@zhouhaibing089 Your issue in #846 (comment) is about running tests where as your PR here is in the debugging area. How will it help in fixing the issue of running tests? |
|
@ramya-rao-a the change in |
| return Promise.resolve(); | ||
| } | ||
|
|
||
| // append the package name to args if applicable |
There was a problem hiding this comment.
- this might not work in case of multiple GOPATHs, because then
process.env['GOPATH']can have:or;separated paths. Follow https://github.com/Microsoft/vscode-go/blob/0.6.63/src/goCheck.ts#L180-L181 instead - we are moving away from using GOPATH from
process.env. Instead usegetCurrentGoPath() - When the command
Go: Test All Packages In Workspaceis run, thisgo testcommand will fail with "can't load package.. no buildable Go source files in ..." if the workspace itself is just a folder containing packages and not a package itself. So one way is to have the package import path as part of the TestConfig object
There was a problem hiding this comment.
PTAL again, I am not sure how the third item can be solved(and seems it is more than the effort here)
There was a problem hiding this comment.
testconfig.includeSubDirectories is true only for the "test all pks in workspace" scenario.
So you can add a check to ensure testconfig.includeSubDirectories is false before adding the importPath
087b80d to
c622d85
Compare
1566dd8 to
904f70c
Compare
904f70c to
bfdc576
Compare
|
@zhouhaibing089 One issue with passing the package to @rakyll @francesc Would you know why |
|
|
|
If this is a regression issue, I propose that we add a configuration like: |
|
go test and go test should be behave similarly, not outputting to stdout if -v is not set. Can you file an issue if that's not the case? |
|
Looks like its a platform issue In Windows Logged golang/go#22113 |
|
Nope not a platform issue. I was making the changes in one and All is well with the world folks, sorry for the churn |
we should prefer passing package name to
dlv testordlv debug. this fixes the issue mentioned at #846 (comment).