vab icon indicating copy to clipboard operation
vab copied to clipboard

build error: bad module difinition

Open ghost opened this issue 3 years ago • 6 comments

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`

ghost avatar Feb 03 '21 13:02 ghost

Thanks @kahsa this is a known issue and will be fixed soon, I will update you here.

joe-conigliaro avatar Feb 03 '21 13:02 joe-conigliaro

@kahsa is this still relevant? I think this has been fixed in V since?

larpon avatar Oct 24 '21 16:10 larpon

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.

ghost avatar Oct 25 '21 00:10 ghost

Hmm ok I see - it's because it's in .vmodules 🤔 Right, still a bug - thanks 👍

larpon avatar Oct 25 '21 06:10 larpon

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.

JalonSolov avatar Oct 25 '21 11:10 JalonSolov

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.

kendfss avatar Jun 19 '22 01:06 kendfss