Skip to content

dap: Support IPv6 addresses in TCP transport - #52244

Merged
tomhoule merged 2 commits into
zed-industries:mainfrom
moktamd:fix/dap-ipv6-support
Apr 27, 2026
Merged

dap: Support IPv6 addresses in TCP transport#52244
tomhoule merged 2 commits into
zed-industries:mainfrom
moktamd:fix/dap-ipv6-support

Conversation

@moktamd

@moktamd moktamd commented Mar 23, 2026

Copy link
Copy Markdown

The DAP TCP transport layer was hardcoded to Ipv4Addr, so IPv6 addresses like fd00::a in a debug config's connect.host always failed with hostname must be IPv4: invalid IPv4 address syntax.

Replaced Ipv4Addr with IpAddr and SocketAddrV4 with SocketAddr across the task, dap, dap_adapters, and project crates. The WASM extension API still uses u32 for the host field to avoid a breaking WIT interface change; IPv4 round-trips through extensions as before.

Fixes #52237

Release Notes:

  • Fixed DAP TCP transport rejecting IPv6 addresses when connecting to remote debug adapters.

The entire DAP TCP transport layer was hardcoded to Ipv4Addr, preventing
connections to debug adapters on IPv6 hosts. Replace Ipv4Addr with IpAddr
and SocketAddrV4 with SocketAddr across the task, dap, dap_adapters, and
project crates.

The WASM extension API still uses u32 for host (Ipv4Addr bits) to avoid
a breaking WIT interface change; IPv4 addresses round-trip through the
extension layer as before.

Fixes zed-industries#52237
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Mar 23, 2026
@zed-codeowner-coordinator
zed-codeowner-coordinator Bot requested review from a team, SomeoneToIgnore and smitbarmase and removed request for a team March 23, 2026 19:53
@zed-community-bot zed-community-bot Bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Mar 23, 2026
@zed-codeowner-coordinator
zed-codeowner-coordinator Bot requested review from cole-miller and kubkon and removed request for a team March 23, 2026 19:53
@SomeoneToIgnore
SomeoneToIgnore removed their request for review March 30, 2026 12:21
@cole-miller

Copy link
Copy Markdown
Member

Thanks!

@cole-miller
cole-miller enabled auto-merge (squash) April 1, 2026 14:23
auto-merge was automatically disabled April 1, 2026 14:43

Head branch was pushed to by a user without write access

@tomhoule tomhoule assigned gaauwe and tomhoule and unassigned cole-miller Apr 27, 2026

@tomhoule tomhoule left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution!

@tomhoule
tomhoule added this pull request to the merge queue Apr 27, 2026
Merged via the queue into zed-industries:main with commit 5aa7eaa Apr 27, 2026
30 checks passed
tomhoule added a commit that referenced this pull request Apr 27, 2026
tomhoule added a commit that referenced this pull request Apr 27, 2026
SomeoneToIgnore pushed a commit to polyesterswing/zed that referenced this pull request Apr 29, 2026
ebaah46 pushed a commit to ebaah46/zed that referenced this pull request May 6, 2026
The DAP TCP transport layer was hardcoded to `Ipv4Addr`, so IPv6
addresses like `fd00::a` in a debug config's `connect.host` always
failed with `hostname must be IPv4: invalid IPv4 address syntax`.

Replaced `Ipv4Addr` with `IpAddr` and `SocketAddrV4` with `SocketAddr`
across the `task`, `dap`, `dap_adapters`, and `project` crates. The WASM
extension API still uses `u32` for the host field to avoid a breaking
WIT interface change; IPv4 round-trips through extensions as before.

Fixes zed-industries#52237

Release Notes:

- Fixed DAP TCP transport rejecting IPv6 addresses when connecting to
remote debug adapters.

---------

Co-authored-by: moktamd <moktamd@users.noreply.github.com>
ebaah46 pushed a commit to ebaah46/zed that referenced this pull request May 6, 2026
kathbigra pushed a commit to kathbigra/zed that referenced this pull request May 10, 2026
The DAP TCP transport layer was hardcoded to `Ipv4Addr`, so IPv6
addresses like `fd00::a` in a debug config's `connect.host` always
failed with `hostname must be IPv4: invalid IPv4 address syntax`.

Replaced `Ipv4Addr` with `IpAddr` and `SocketAddrV4` with `SocketAddr`
across the `task`, `dap`, `dap_adapters`, and `project` crates. The WASM
extension API still uses `u32` for the host field to avoid a breaking
WIT interface change; IPv4 round-trips through extensions as before.

Fixes zed-industries#52237

Release Notes:

- Fixed DAP TCP transport rejecting IPv6 addresses when connecting to
remote debug adapters.

---------

Co-authored-by: moktamd <moktamd@users.noreply.github.com>
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
The DAP TCP transport layer was hardcoded to `Ipv4Addr`, so IPv6
addresses like `fd00::a` in a debug config's `connect.host` always
failed with `hostname must be IPv4: invalid IPv4 address syntax`.

Replaced `Ipv4Addr` with `IpAddr` and `SocketAddrV4` with `SocketAddr`
across the `task`, `dap`, `dap_adapters`, and `project` crates. The WASM
extension API still uses `u32` for the host field to avoid a breaking
WIT interface change; IPv4 round-trips through extensions as before.

Fixes zed-industries#52237

Release Notes:

- Fixed DAP TCP transport rejecting IPv6 addresses when connecting to
remote debug adapters.

---------

Co-authored-by: moktamd <moktamd@users.noreply.github.com>
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
The DAP TCP transport layer was hardcoded to `Ipv4Addr`, so IPv6
addresses like `fd00::a` in a debug config's `connect.host` always
failed with `hostname must be IPv4: invalid IPv4 address syntax`.

Replaced `Ipv4Addr` with `IpAddr` and `SocketAddrV4` with `SocketAddr`
across the `task`, `dap`, `dap_adapters`, and `project` crates. The WASM
extension API still uses `u32` for the host field to avoid a breaking
WIT interface change; IPv4 round-trips through extensions as before.

Fixes zed-industries#52237

Release Notes:

- Fixed DAP TCP transport rejecting IPv6 addresses when connecting to
remote debug adapters.

---------

Co-authored-by: moktamd <moktamd@users.noreply.github.com>
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DAP TCP transport does not support IPv6

5 participants