Skip to content

build(windows): vendor xxd.c#36746

Merged
justinmk merged 2 commits intoneovim:masterfrom
benarcher2691:vendor-xxd-36664
Nov 30, 2025
Merged

build(windows): vendor xxd.c#36746
justinmk merged 2 commits intoneovim:masterfrom
benarcher2691:vendor-xxd-36664

Conversation

@benarcher2691
Copy link
Contributor

Summary

Test plan

  • xxd builds successfully
  • xxd --version works
  • Round-trip test (echo test | xxd | xxd -r) works
  • Functional tests pass
  • Lint checks pass

Fixes #36664

Problem:
Currently we fetch a prebuilt xxd.exe from neovim/deps for Windows,
which is not ideal in terms of obviousness, misses updates, and is
clumsy to update.

Solution:
Similar to tee.c (neovim#36363), vendor xxd.c from Vim and build it as part
of the Neovim build process. This makes the source obvious, enables
analyzer checks, and simplifies updates.

Fixes neovim#36664
@github-actions github-actions bot added the build building and installing Neovim using the provided scripts label Nov 29, 2025
@justinmk
Copy link
Member

Thanks! Can you run make formatc and add those changes as a separate commit.

And one other small thing, let's add a trivial test that exercises xxd to confirm it basically works. It can live in test/functional/editor/xxd_spec.lua

- Reformat list(APPEND ...) to multi-line style for readability
- Add functional test for xxd round-trip encoding/decoding
test_deps.dependOn(test_fixture(b, "streams-test", libuv, target, optimize, &flags));

// xxd - hex dump utility (vendored from Vim)
const xxd_exe = b.addExecutable(.{
Copy link
Member

@justinmk justinmk Nov 30, 2025

Choose a reason for hiding this comment

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

oh glad you noticed this. i think we forgot to update build.zig for tee ...

(not a blocker for this PR)

Copy link
Member

@justinmk justinmk left a comment

Choose a reason for hiding this comment

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

Perfect, thanks!

@justinmk justinmk merged commit 5bb8734 into neovim:master Nov 30, 2025
37 checks passed
@neovim neovim deleted a comment from neovim-backports bot Nov 30, 2025
@neovim neovim deleted a comment from neovim-backports bot Nov 30, 2025
justinmk pushed a commit to justinmk/neovim that referenced this pull request Nov 30, 2025
backport neovim#36746

Problem:
Currently we fetch a prebuilt xxd.exe from neovim/deps for Windows,
which is not ideal in terms of obviousness, misses updates, and is
clumsy to update.

Solution:
Similar to tee.c (neovim#36363), vendor xxd.c from Vim and build it as part
of the Neovim build process. This makes the source obvious, enables
analyzer checks, and simplifies updates.

Fixes neovim#36664
justinmk added a commit that referenced this pull request Nov 30, 2025
backport #36746

Problem:
Currently we fetch a prebuilt xxd.exe from neovim/deps for Windows,
which is not ideal in terms of obviousness, misses updates, and is
clumsy to update.

Solution:
Similar to tee.c (#36363), vendor xxd.c from Vim and build it as part
of the Neovim build process. This makes the source obvious, enables
analyzer checks, and simplifies updates.

Fixes #36664

Co-authored-by: benarcher2691 <ben.archer2691@gmail.com>
benarcher2691 added a commit to benarcher2691/neovim that referenced this pull request Dec 1, 2025
Problem:
Currently we fetch a prebuilt xxd.exe from neovim/deps for Windows,
which is not ideal in terms of obviousness, misses updates, and is
clumsy to update.

Solution:
Similar to tee.c (neovim#36363), vendor xxd.c from Vim and build it as part
of the Neovim build process. This makes the source obvious, enables
analyzer checks, and simplifies updates.

Fixes neovim#36664
yochem pushed a commit to yochem/neovim that referenced this pull request Dec 15, 2025
Problem:
Currently we fetch a prebuilt xxd.exe from neovim/deps for Windows,
which is not ideal in terms of obviousness, misses updates, and is
clumsy to update.

Solution:
Similar to tee.c (neovim#36363), vendor xxd.c from Vim and build it as part
of the Neovim build process. This makes the source obvious, enables
analyzer checks, and simplifies updates.

Fixes neovim#36664
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build building and installing Neovim using the provided scripts ci:backport release-0.11

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vendor xxd.c

3 participants