-
Notifications
You must be signed in to change notification settings - Fork 757
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
Vscode debug test and run test use two and more go.buildTags fail #1836
Comments
Hello, Came across the exact same issue today and it was not straightforward to identify the failure was related to this as the errors message were only:
Each package being one of the build tags. On top of that there's no significant diff between the command run:
And with
I guess that when passed through to Delve, the values do not belong to a single |
Any update on this? I am running into the exact same issue with multiple tags and @vboulineau describes the problem well: the build tags are not quoted and as such treated as individual arguments. If one of the maintainers could point me to the location where the command line arguments are assembled, I could give it a shot with a PR. Is https://github.com/golang/vscode-go/blob/master/src/testUtils.ts#L136 the right place to look at? Edit:
This allows debugging the tests, but running them fails unless the quotes are removed again. |
Does the problem still exist if a comma-separated build tag list is used? From go command doc, space-separated list is deprecated.
I think Line 268 in 32a643f
Line 292 in 32a643f
Or, once we make a progress in go-delve/delve#2718 passing the build flag as []string is another option. |
Sorry for the late reply. Yes, comma-separated works, thank you! |
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
go version
to get version of Go from the VS Code integrated terminal.gopls -v version
to get version of Gopls from the VS Code integrated terminal.golang.org/x/tools/gopls v0.7.2
golang.org/x/tools/[email protected] h1:kRKKdvA8GOzra8rhSFDClOR7hV/x8v0J0Vm4C/gWq8s=
github.com/BurntSushi/[email protected] h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw=
github.com/google/[email protected] h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
github.com/sergi/[email protected] h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
golang.org/x/[email protected] h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo=
golang.org/x/[email protected] h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
golang.org/x/[email protected] h1:WUoyKPm6nCo1BnNUvPGnFG3T5DUVem42yDJZZ4CNxMA=
golang.org/x/[email protected] h1:C0nyHiBU2m0cR6hDiUORWqQIt3h37wsp1255QBSSXqY=
golang.org/x/[email protected] h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
honnef.co/go/[email protected] h1:ws8AfbgTX3oIczLPNPCu5166oBg9ST2vNs0rcht+mDE=
mvdan.cc/[email protected] h1:bi/1aS/5W00E2ny5q65w9SnKpWEF/UIOqDYBILpo9rA=
mvdan.cc/xurls/[email protected] h1:59Olnbt67UKpxF1EwVBopJvkSUBmgtb468E4GVWIZ1I=
code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.Commit: 7f6ab5485bbc008386c4386d08766667e155244e
Date: 2021-09-22T11:59:27.195Z
Electron: 13.1.8
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin arm64 20.4.0
Check your installed extensions to get the version of the VS Code Go extension
Go: Locate Configured Go Tools
command.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
one go.buildTags can run
run test
anddebug test
two and more build tags Cannot be executed at the same time when using
run test
debug test
Steps to reproduce the behavior:
go.buildTags
"sqlite sqlite_unlock_notify"run test
debug test
Screenshots or recordings
If applicable, add screenshots or recordings to help explain your problem.
problem
Vscode use
run test
anddebug test
I use build tags to run test func
build tags:
sqlite
,sqlite_unlock_notify
In Vscode settings
go.buiildTags
usesqlite sqlite_unlock_notify
run test
can work butdebug test
not workIn Vscode settings
go.buiildTags
use'sqlite sqlite_unlock_notify'
run test
not work butdebug test
can workI need a method so that the above
run test
debug test
can be executed togetherThe text was updated successfully, but these errors were encountered: