Skip to content

Fix V build: bootstrap toolchain, vanilla_epoll src/ layout & module path#9417

Merged
waghanza merged 3 commits into
the-benchmarker:developfrom
enghitalo:v/vanilla-epoll-flatten-src
Jun 4, 2026
Merged

Fix V build: bootstrap toolchain, vanilla_epoll src/ layout & module path#9417
waghanza merged 3 commits into
the-benchmarker:developfrom
enghitalo:v/vanilla-epoll-flatten-src

Conversation

@enghitalo

@enghitalo enghitalo commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Re-enables the V vanilla_epoll entry (and unblocks the other V entries), which stopped building. Three independent failures, each verified and fixed:

1. Toolchain bootstrap (v/config.yaml)

The bootstrap ran git checkout <tag> && make, but make pulls the latest vc, which no longer understands constructs in the older tagged vlib — exactly the failure reported on #9112:

vlib/builtin/float.c.v:9: error: invalid $if condition: unknown indent `native`

The Dockerfile already clones and builds V from master (which reports V 0.5.1, the current release), so the bootstrap now just verifies the version instead of downgrading to a tag and rebuilding. version: set to 0.5.1.

2. vanilla_epoll/src/ layout

Recent V dropped the virtual src/ module directory:

builder error: the virtual `src/` module directory is no longer supported.

Moved main.v/controllers.v up to the project root, matching fasthttp/pico/veb.

3. Module install path (vanilla_epoll/config.yaml)

v install <url> now namespaces by owner (~/.vmodules/enghitalo/vanilla), so import vanilla.http_server was not found. Now clones the repo to ~/.vmodules/vanilla.

Dependency

Needs enghitalo/vanilla#16 (make the Mbed TLS dependency opt-in) merged to main first — otherwise import http_server pulls in vanilla_tls.c and the build fails with mbedtls/ssl.h: No such file. With that merged, the default v -prod build links no Mbed TLS.

Verification

Built the full flow in a clean debian:stable-slim container (no preinstalled Mbed TLS): V builds → vanilla module resolves → v -prod . -o server builds → server answers the benchmark endpoints.

project build GET / GET /user/:id POST /user
fasthttp 200 42 201
pico 200 42 200
veb 200 42 200
vanilla_epoll 200 42 201

🤖 Generated with Claude Code

Recent V releases no longer support the virtual `src/` module
directory, which broke the vanilla_epoll build:

  builder error: the virtual `src/` module directory is no longer supported.

Move main.v and controllers.v up into the project root so the build
matches the other V entries (fasthttp, pico, veb) and `v -prod vanilla_epoll`
compiles again.

Verified: all four V projects (fasthttp, pico, veb, vanilla_epoll) build
with -prod and respond correctly to the benchmark endpoints
(GET /, GET /user/:id, POST /user).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@enghitalo enghitalo requested a review from waghanza as a code owner June 4, 2026 14:52
…module path

Two build failures kept the V entries (incl. vanilla_epoll) from building
in CI:

1. Toolchain: the bootstrap did `git checkout <tag> && make`, but make
   pulls the latest vc, which no longer understands constructs in the old
   tagged vlib (e.g. `$if !native` in vlib/builtin/float.c.v):

     vlib/builtin/float.c.v:9: error: invalid $if condition: unknown indent `native`

   The Dockerfile already clones and builds V from master (which reports
   V 0.5.1), so just verify the version in bootstrap instead of downgrading
   to a tag and rebuilding. Set version: 0.5.1 accordingly.

2. vanilla_epoll module path: `v install <url>` now namespaces by owner
   (~/.vmodules/enghitalo/vanilla), so `import vanilla.http_server` was not
   found. Clone the repo to ~/.vmodules/vanilla instead.

Verified end-to-end in a clean Debian container (no preinstalled Mbed TLS):
V builds, the vanilla module is found, `v -prod` builds vanilla_epoll, and
the server answers GET /, GET /user/:id and POST /user.

Note: depends on enghitalo/vanilla making its Mbed TLS dependency opt-in
(enghitalo/vanilla#16) so the default build links no Mbed TLS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@enghitalo enghitalo changed the title fix(v/vanilla_epoll): flatten src/ into project root Fix V build: bootstrap toolchain, vanilla_epoll src/ layout & module path Jun 4, 2026
Align the create-user response with fasthttp and vanilla_epoll, which
already return 201. pico wrote a 200 status line; veb defaulted to 200,
now sets .created before responding.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@waghanza waghanza merged commit 832bd33 into the-benchmarker:develop Jun 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants