Provide an online documentation for the configuration file parameters
and the 'config' command.
Until now the configuration parameters were only documented in the
default configuration file and in the source code, neither of which is
very discoverable.
Adds goreleaser-based release automation integrated with GitHub Releases.
On pushing a v* tag, the release workflow cross-compiles dlv for 8
platforms (linux/darwin/windows × amd64/arm64/386/ppc64le where
supported), packages them as .tar.gz/.zip archives, generates a SHA256
checksums file, signs checksums.txt with cosign keyless signing via
GitHub Actions OIDC, and publishes everything to GitHub Releases.
A workflow_dispatch trigger supports dry-run testing without publishing.
Changes:
- .goreleaser.yaml: goreleaser v2 config for builds, archives,
checksums, cosign signing, and GitHub Release publishing
- .github/workflows/release.yml: release workflow with tag push and
manual dispatch triggers
- _scripts/make.go: make build now delegates to goreleaser
--single-target so local and release builds share identical config
- Documentation/installation/README.md: document binary release
download and cosign verification
- CONTRIBUTING.md: document goreleaser v2 as a build prerequisite
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* TeamCity: fix download url in test_mac.sh
The direct link to storage.googleapis.com no longer works, use the one
that's on the website.
* proc: fix loading goroutine labels
The format used to store goroutine labels changed again. Adapt to the change.
* Cirrus-CI: upgrade FreeBSD image used
14.2 no longer exists
This also updates the test to output the correct command to regenerate
these files, and fixes the generation script to generate the riscv64
output file.
* replace github.com/hashicorp/golang-lru with a custom lru cache
* fix caplocks
* use a mutex instead of rwmutex
* add lrucache tests
* move lru to its own package
Move things that depend on golang.org/x/tools/go/packages to a new
repository so that they can use the latest version of that package
without forcing delve itself to need the latest version of Go.
With the recent changes in 1e3ccee (#4118) structMember became largely
reduntant with the new findStructMemberOrMethod. This commit simplifies
the code of structMember so that it does not handle embedded structs
and interfaces and changes its name to structField so that it can be
kept as an internal lightweight version of findStructMemberOrMethod.
* CI: add windows arm64 workflow
* add win-arm64 capslock
* add capslock build tag
* add servive test build tag
* skip proc_test.go
* unskip more tests
* skip TestHardcodedBreakpointCounts as flaky
* add gotip
* add version log to ps1
* switch logic to use stable json endpoint for getting latest go
* add continue-on-error for gotip
* *: randomize testnextnethttp.go listen port
* service/test: prefer t.Setenv
* *: cleanup port pid files
* service: fix final parallelization bugs
* address review feedback
* pkg/proc: fix test on windows
* fix finding port file on TestIssue462
This flag in internal/abi.Type is moving from the Kind_ field to
the TFlag field. See https://go-review.googlesource.com/c/go/+/681936
A few of the other Kind fields dlv doesn't use (and don't exist
in Go anymore), so this code can be simplified somewhat.
When reflect.MethodByName is used the linker can not fully perform
deadcode elimination. This commit updates cobra and rewrites the
suitableMethods part of service/rpccommon so that reflect.MethodByName
is not used and the linker can fully execute deadcode elimination.
The executable size on go1.24.0 on linux is reduced from 25468606 bytes
to 22453382 bytes or a reduction of approximately 12%.
See also:
https://github.com/spf13/cobra/pull/1956https://github.com/aarzilli/whydeadcode
* delve: support linux-loong64 native debug
LoongArch is a new RISC ISA, which is independently designed by Loongson Technology.
LoongArch includes a reduced 32-bit version (LA32R), a standard 32-bit version (LA32S)
and a 64-bit version (LA64), and loong64 is the 64-bit version of LoongArch.
LoongArch documentation: https://github.com/loongson/LoongArch-Documentation.git
* *: mark loong64 port as experimental
---------
Co-authored-by: Huang Qiqi <huangqiqi@loongson.cn>
Structs returned to starlark scripts by API calls were immutable, this
made amend_breakpoint nearly impossible to use since its argument must
be a api.Breakpoint struct which the caller has received from
get_breakpoint and modified.
Move all tests of the functionality of proc.next,
proc.(*TargetGroup).Next, proc.(*TargetGroup).Step,
proc.(*TargetGroup).StepOut to their own test file.
* Adjust rtype.go script to handle constants moved to internal/abi from
runtime
* Remove tests in service/dap/server_test that relied on knowledge of
the internal layout of channels.
The builder is currently spending 15 to 20 minutes installing gcc and
upgrading packages every time we run the tests.
Because of this the build fails sometimes by running out of time.
This change reduces that to 5 minutes by:
* switching from curl to wget (which seems to have fewer dependencies)
* not installing gcc on ppc64le
* skipping tests that depend on gcc or other binutils
We had a few checks left over for the TRAVIS variable that detected if
we were running under the TravisCI build system.
This variable hasn't been set since 2020.
- add architecture rule for ppc64le so that incompatible agents don't
pick up the build
- disable PIE tests on linux/ppc64le (the tests claim it doesn't work)
- enable PIE tests on darwin/amd64 now that the entry point calculation
has been fixed
- remove dependency on wget and curl in the test script for linux to
reduce test time
- only install git in the linux test script when we need it
- remove staticcheck from linux/ppc64le builds (it takes almost 5
minutes between installation and execution and makes the test timeout
sometimes)
- drop windows/arm64/tip build, the windows/arm64 build is broken
anyway and since there is only one agent it makes CI runs slow
- drop linux/ppc64le/tip build, there is only one agent, it's slow and
it will always timeout. CI runs in excess of 1h are too long.
Update test matrix to remove 1.18 and add 1.21, fix build scripts to
deal with the new format returned by:
https://golang.org/VERSION?m=text
which now has an extra second line with the time.
We must pass the build tag through during the 'vet' check, and
additionally there was some extra commands at the end of test_linux.sh
that were not necessary.
Due to some very old mistakes too many of Delve's flags are declared as
persistent on cobra's root command. For example the headless flag is a
global flag but does not apply to connect, dap or trace; the backend
flag does not apply to replay, core and dap; etc.
Almost all global flags should have been declared as local flags on
individual subcommands. Unfortunately we can not change this without
breaking backwards compatibility, for example:
dlv --headless debug
would not parse if headless was a flag of debug instead of a global
flag.
Instead we alter usage function and the markdown generation script to
strategically hide the flags that don't apply.
Fixes#2361