Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build error: bad module difinition #61

Open
ghost opened this issue Feb 3, 2021 · 6 comments
Open

build error: bad module difinition #61

ghost opened this issue Feb 3, 2021 · 6 comments
Assignees

Comments

@ghost
Copy link

ghost commented Feb 3, 2021

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`
@joe-conigliaro
Copy link
Member

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

@joe-conigliaro joe-conigliaro self-assigned this Feb 3, 2021
@larpon
Copy link
Contributor

larpon commented Oct 24, 2021

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

@ghost
Copy link
Author

ghost commented Oct 25, 2021

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.

@larpon
Copy link
Contributor

larpon commented Oct 25, 2021

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

@JalonSolov
Copy link

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.

@kendfss
Copy link

kendfss commented Jun 19, 2022

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.

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

No branches or pull requests

4 participants