* service/dap: support auto-loading of unloaded interfaces
* Make DeepSource happy
* Don't set reference if data failed to auto-load
* Use frame-less expressions
* Refine interface recursion capping test case
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
* Avoid double removal of temp binary
* Add back accidentally removed empty line
* Simplify regex
* Use unique build output directories in test cases
* Recover TestLaunchDebugRequest hidden logging and refine error check
* Special case access-denied error on Windows
* Remove special case for access denied on Windows
* Increase remove delay on Win
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
* DAP test for github.com/golang/vscode-go/issues/1056
* DAP test for github.com/golang/vscode-go/issues/884
* DAP test for github.com/golang/vscode-go/issues/851
* DAP test for github.com/golang/vscode-go/issues/1053
* DAP test for github.com/golang/vscode-go/issues/1054
* Make DeepSource happy
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
Both structMember and findMethod implemented a depth-first search in
embedded fields but the Go specification requires a breadth-first
search. They also allowed promotion of fields in the concrete type of
embedded interfaces even though this is not allowed by Go.
Furthermore they both lacked protection from infinite recursion
when a type embeds itself and the user requests a non-existent field.
Fixes#2316
* add -json flag when running tests on TeamCity
* introduce TeamCity builds
* restore gdbserial constants for 386
Otherwise compilation fails.
* skip TestAttachRequest on Windows as it never finishes
* run tests on 1.16beta1
* Add support for evaluateName for variables
* More evaluateName logic tweaks and tests
* Make DeepSource happy
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
* Use address, not index to differentiate compound map keys
* Clean up calls to expectVarRegex
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
Fix bug in DAP test: TestEvaluateCallRequest.
In Go 1.15 the call injection will be executed on a different goroutine
from the goroutine where it was started on to avoid confusing the
garbage collector, the test must be aware of this fact and use the
goroutine ID from the stopped response instead of assuming 1 is the
currently selected goroutine.
Disables TestAttachDetach when running in Github Actions.
Disable some coredump tests when running in Github Actions (core size
limits?).
* service/dap: add "panic" and "fatal error" as stopped reasons
The unrecovered panic and fatal throw breakpoints are not set by the
user. We now check for these special breakpoints and send appropriate
stopped reasons to the client.
* Add getter for StopReason
* Set threadID and stop reason correctly
If there is no selected goroutine, no goroutine ID should be set in
the stopped event.
The stopped reason can be better determined using the process
StopReason.
* Update panic breakpoint on next test to work with Go 1.13 runtime
When running panic.go with Go1.13, the next line that is stepped to
after panic('boom') is the defer function in the runtime package. The
unrecovered panic breakpoint is not hit until after several steps.
The test now steps until the breakpoint is hit, or the program terminates
without hitting the unrecovered panic breakpoint, in which case it fails.
* Skip breakpoint on next test in < Go 1.14
* Add underlying type when printing interface type
* Add todo to remove one level from interface printing
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
* Support global variables
* Respond to review comments
* Clarify comment
* Add more details to test error messages
* Remove flaky main..inittask checks
* Rename globals flag to match vscode-go
* Normalize filepath with slash separator
* Improve handling for unknown package
* Tweak error message
* More refactoring, normalization and error details to deal with Win test failures
* Clean up optional launch args processing
* Add CurrentPackage to debugger and use instead of ListPackagesBuildInfo
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
* Initial support for scopes and variables requests
* Add detailed variables test
* Address review comments
* Fix typo and redudant escaped characters
* Bug fix for uninitialized interfaces; no refs needed for 0-size vars
* Minor cosmetic tweaks
* Add incomplete loading test
* Make DeepSource happy
* Remove unnecessary t.Helper() calls
* Update broken test after merge
* Add missing return
* Rework test harness to abort testvariables2 before stack overflow
* Remove accidentally duplicated disconnet
* Test for invalid interface type with regex
* Drop testvariables3, clean up and test unreadable case
* Respond to review comments
* Make expectVar test helper less fragile
* Make DeepSource happy
* Use proc.LoadConfig directly
* Adjust test to avoid var count discrepency between Go 1.15 and earlier
* Make compound keys in a map unique for correct display
* Remove locals num check that will break if more vars are added
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
* Adds launch request support for program args
* Combine types of function parameters
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
Using a stop channel to signal clean shutdown to the server's
goroutines. Also updates the tests to trigger disconnectChan.
This helps avoid spurious error logs when the client disconnects, when
Ctrl+C is pressed, etc.