vab
vab copied to clipboard
build error: bad module difinition
OS: ArchLinux
V version: 0.2.2 a73c209
vab doctor
What did you do?
~/.vmodules/vab% v vab.v
What did you expect to see?
What did you see instead?
builder error: bad module definition: vab.v imports module "vxt" but /home/tsukasa/.vmodules/vab/vxt/vxt.v is defined as module `vab.vxt`
Thanks @kahsa this is a known issue and will be fixed soon, I will update you here.
@kahsa is this still relevant? I think this has been fixed in V since?
It still does this in my environment, but not in yours?
~/.v/vab (master) [1]> v vab.v
vab.v:11:1: builder error: bad module definition: vab.v imports module "android.sdk" but /home/tsukasa/.vmodules/vab/android/sdk/sdk.v is defined as module `vab.android.sdk`.
9 | import java
10 | import android
11 | import android.sdk
| ~~~~~~~~~~~~~~~~~~
12 | import android.ndk
Whatever it is, it's not caused by vab, so it should be brought to V issue.
Hmm ok I see - it's because it's in .vmodules
🤔
Right, still a bug - thanks 👍
Yes, this bug is still around, and has been for too long.
The workaround is to move the module somewhere else (anywhere other than .vmodules
, then put a link in .vmodules
pointing to the other location.
The workaround is to move the module somewhere else (anywhere other than
.vmodules
, then put a link in.vmodules
pointing to the other location.
Cannot link directories on MacOS.
Though beyond the scope of this repo, I think this issue (as well as general workflow perk of not needing to adopt a specific development directory) could be tackled by using a specialized mod file (or some other type of config) in the .vmodules
directory.
Imo, from the user side it should feel like running pip install -e .
in a python module. This would create the directories needed in .vmodules
with a config file with a path argument pointing to the path of the user's working directory .
. if it moves, just run something like v install -e .
again and bob's your uncle.