Recent V update concerning modules broke this one

Open
#1,052 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Domain
backend

Research direction

Start by compiling a project that imports sdl.callbacks with V 0.5.1 on Windows, then inspect the errors in on.v and compare them with the module and include paths described in the issue. Check whether the same failure occurs with the reported SDL 3.4.8 setup. Done means identifying and reporting a reproducible cause for the compile errors and confirming whether the attempted workarounds change the result.

Written by the indexing model from the issue text.

Description

V version: 0.5.1 3ac2c46
OS: Win11 x64
SDL: 3.4.8.0

sdl.callbacks cannot compile in any project due to these errors in the on.v file:

Image

I don't know what exactly was changed in V but plenty of things broke with a recent patch, for example now files in a "src" folder in a v module cannot be used.
I was not able to fix it myself. Here are a few things that I tried to do:

  • Removing C. before the variable makes the error "undefined ident" instead
  • Declaring the variables using __global (and enabling it using the flag "-enable-globals") shuts down the display of the error, but it still happens during compilation, removing the C. on top of that makes compilation simply hang forever when these errors would happen
  • Using the complete paths in the #include, #postinclude and #preinclude does not change anything (the .h files do exist)
Dominant language
V
Stars
106
Forks
16
Avg merge
7h 3m
Merged PRs (30d)
6

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vlang/sdl

All issues in vlang/sdl

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.