-
Notifications
You must be signed in to change notification settings - Fork 763
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
Go test prints out all logs from the code without verbose option #528
Comments
Strangely the output is different from the verbose output either. Can you try the exact same command the extension is running (no target arg) from the package directory?
|
I did, the screenshot is attached above |
@leguminosa From the screenshot, I see you specified the target (the package path). Not sure what utilities you are using to generate the log, but if they are using the standard
|
It wasn't logged out at all before, and the logging tools hasn't changed since. We're using custom logger (not standard fmt nor log.logger instance). I will try again without specifying the package, But even if the command shown in the output doesn't include package, the command runs package test (as in, not a whole packages test, but only one package in whichever I press save - with cover on save option enabled) |
Change https://golang.org/cl/248738 mentions this issue: |
@leguminosa Thanks for providing more info. I hope the cl/248738 to address the regression. |
Thank you @hyangah so much for your assistance, do you still need me to reproduce or do anything? |
@leguminosa Once this is released as Go Nightly, would be nice if you have time to test it. Thanks! |
Thank you very much for your help @hyangah ! I tried installing older version (before 0.16) and yes it is returning to previous state (clean output for success test), so all changes mentioned in this issue is in 0.16 cycles... btw what is Go Nightly? like beta / pre-release version? |
Change https://golang.org/cl/252119 mentions this issue: |
During v0.16 dev cycle, we switched tests to run in local directory mode by not specifying the target package path to be tested. This has two unintended side-effects: 1) prints all stderr/stdout from the tested target when tests succeed. 2) disables test caching. Whether `Go: Test Package` should run the tests in local directory mode or in package list mode is debatable. https://golang.org/cmd/go/#hdr-Test_packages But, we've been using the package list mode for a long time without complaint. So, this is a regression that needs to be fixed. Fixes #528 Change-Id: Ied06130db1ab6e53b2fb3a3b19ab13b0985fc779 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/248738 Run-TryBot: Hyang-Ah Hana Kim <[email protected]> TryBot-Result: kokoro <[email protected]> Reviewed-by: Rebecca Stambler <[email protected]> Reviewed-by: Suzy Mueller <[email protected]> (cherry picked from commit a357893e7b5c24c1443deaca629584e47b4e22c2) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/252119
what should I do right now? @hyangah |
@leguminosa Yes, please. The prerelease vsix loading instruction is here (https://github.com/golang/vscode-go/blob/master/docs/nightly.md#testing-pre-releases). |
I manually tested it and made it 0.16.2. |
I just updated my vscode-go to 0.16.2, and the go test works like it used to do, it solved this issue. Thank you very much @hyangah |
Please direct general questions to:
#vscode
channel in Gophers SlackPlease review the documentation before filing an issue.
Helpful pages include:
Please answer these questions before submitting your issue. Thanks!
What version of Go, VS Code & VS Code Go extension are you using?
Run
go version
to get version of GoRun
code -v
orcode-insiders -v
to get version of VS Code or VS Code Insidersdb40434f562994116e5b21c24015a2e40b2504e6
x64
Check your installed extensions to get the version of the VS Code Go extension
Run
go env
to get the go development environment detailsGOARCH="amd64"
GOBIN=""
GOCACHE="/home/nakama/.cache/go-build"
GOENV="/home/nakama/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/nakama/.gvm/pkgsets/go1.13/global"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/nakama/.gvm/gos/go1.13"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/nakama/.gvm/gos/go1.13/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build061898164=/tmp/go-build -gno-record-gcc-switches"
Share the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)
command to open your settings.json file.Share all the settings with the
go.
or["go"]
orgopls
prefixes.Describe the bug
A clear and concise description of what the bug.
A clear and concise description of what you expected to happen.
I don't put verbose flag in go test, but in output go test tab, the logs from the code all appears even if the tests are all succeed
Steps to reproduce the behavior:
With cover on save set to true, just save the code anywhere, and vscode shall run go test for that package.
I tried running the go test via terminal as a comparison, and it clearly is verboseless, so it's not the problem from the code.
Screenshots or recordings
If applicable, add screenshots or recordings to help explain your problem.
The text was updated successfully, but these errors were encountered: