-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
dap: consider []string for Launch BuildFlags #2718
Comments
I believe if you bypass config.SplitQuotedFields completely and users write this:
they will have the same problem. |
I wonder if it's better to just add double-quote handling to SplitQuotedFields |
I guess users should write If
Right? Launching go commands in node.js seems fine with both Currently vscode-go and gopls both use |
With a space? No it will not work if they contain spaces themselves. It probably works with node.js because it's doing some shell-like quote processing magic (or just going through the shell). |
This would actually be wrong, BTW. But something like it that strips quotes. OTOH I think doing nothing and letting
fail would also be ok. |
@aarzilli We are currently debating whether you're against this feature request completely or not. Can you please clarify to end our confusion :-)? |
No, it's fine. I was just pointing out that:
is really about the subtle difference between dlv parsing and the shell parsing and it wouldn't really go away and:
which is the naive thing to write, wouldn't work. But maybe it's fine that it doesn't. |
Sorry for the confusion. |
This change accepts both string type and []string (actually, []interface{} type due to Go's json decoding behavior. Fixes go-delve#2718 For golang/vscode-go#1831, golang/vscode-go#1027
This change accepts both string type and []string. dap.BuildFlags is a union of string and []string. Fixes go-delve#2718 For golang/vscode-go#1831, golang/vscode-go#1027
This change accepts both string type and []string. dap.BuildFlags is a union of string and []string. Fixes go-delve#2718 For golang/vscode-go#1831, golang/vscode-go#1027
This change accepts both string type and []string. dap.BuildFlags is a union of string and []string. Fixes go-delve#2718 For golang/vscode-go#1831, golang/vscode-go#1027
This change accepts both string type and []string. dap.BuildFlags is a union of string and []string. Fixes go-delve#2718 For golang/vscode-go#1831, golang/vscode-go#1027
This change accepts both string type and []string. dap.BuildFlags is a union of string and []string. Fixes #2718 For golang/vscode-go#1831, golang/vscode-go#1027
DAP
LaunchConfig.BuildFlags
is defined asstring
type.It is
string
because VS Code Go defined thebuildFlags
in that way in its legacy debug adapter that invokesdlv debug
ordlv test
, anddlv
command line takes the build flags (--build-flags) as a string.DAP can take Launch configuration in JSON, which can support more rich types than a simple command line flag.
Historically, the subtle difference between how dlv is parsing the build flags and how go command is parsing the flags was annoying and sometimes frustrating (e.g. golang/vscode-go#1027).
Please consider to take
[]string
and bypass delve's flag parsing.The text was updated successfully, but these errors were encountered: