Fix V build: bootstrap toolchain, vanilla_epoll src/ layout & module path#9417
Merged
waghanza merged 3 commits intoJun 4, 2026
Merged
Conversation
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>
…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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-enables the V
vanilla_epollentry (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, butmakepulls the latestvc, which no longer understands constructs in the older tagged vlib — exactly the failure reported on #9112: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 to0.5.1.2.
vanilla_epoll/src/layoutRecent V dropped the virtual
src/module directory:Moved
main.v/controllers.vup to the project root, matchingfasthttp/pico/veb.3. Module install path (
vanilla_epoll/config.yaml)v install <url>now namespaces by owner (~/.vmodules/enghitalo/vanilla), soimport vanilla.http_serverwas not found. Now clones the repo to~/.vmodules/vanilla.Dependency
Needs enghitalo/vanilla#16 (make the Mbed TLS dependency opt-in) merged to
mainfirst — otherwiseimport http_serverpulls invanilla_tls.cand the build fails withmbedtls/ssl.h: No such file. With that merged, the defaultv -prodbuild links no Mbed TLS.Verification
Built the full flow in a clean
debian:stable-slimcontainer (no preinstalled Mbed TLS): V builds → vanilla module resolves →v -prod . -o serverbuilds → server answers the benchmark endpoints.GET /GET /user/:idPOST /user42424242🤖 Generated with Claude Code