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

Sibling Module Imports #21498

Open
lspaccatrosi16 opened this issue May 13, 2024 · 0 comments
Open

Sibling Module Imports #21498

lspaccatrosi16 opened this issue May 13, 2024 · 0 comments
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@lspaccatrosi16
Copy link

lspaccatrosi16 commented May 13, 2024

Describe the bug

When two modules are siblings, they are unable to import from each other.

Reproduction Steps

Simple Repository
https://github.com/lspaccatrosi16/v-sibling-modules

Expected Behavior

The program to compile, and to print b says Hello from a!.

Current Behavior

Does not compile the program, producing the errors:

src/main.v:6:12: error: unknown function: b.say_b
4 |
5 | fn main() {
6 | println(b.say_b())
| ~~~~~~~
7 | }

src/main.v:6:2: error: println can not print void expressions
4 |
5 | fn main() {
6 | println(b.say_b())
| ~~~~~~~~~~~~~~~~~~
7 | }

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.4.5 58a8fc6

Environment details (OS name and version, etc.)

V full version: V 0.4.5 58a8fc6
OS: linux, Linux version 6.6.17-01102-gd3cec3c11146 (cros-kernel@chromium.org) (Chromium OS 18.0_pre510928-r70 clang version 18.0.0 (/mnt/host/source/src/third_party/llvm-project 82e851a407c52d65ce65e7aa58453127e67d42a0), LLD 18.0.0) #1 SMP PREEMPT_DYNAMIC Sat, 17 Feb 2024 21:12:19 +0000 (VM)
Processor: 8 cpus, 64bit, little endian, 11th Gen Intel(R) Core(TM) i5-1130G7 @ 1.10GHz

getwd: /home/luca/dev/siblingModules
vexe: /home/luca/v/v
vexe mtime: 2024-05-13 21:07:10

vroot: OK, value: /home/luca/v
VMODULES: OK, value: /home/luca/.vmodules
VTMP: OK, value: /tmp/v_1000

Git version: git version 2.39.2
Git vroot status: weekly.2024.20
.git/config present: true

CC version: cc (Debian 12.2.0-14) 12.2.0
thirdparty/tcc status: thirdparty-linux-amd64 40e5cbb5

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@lspaccatrosi16 lspaccatrosi16 added the Bug This tag is applied to issues which reports bugs. label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

No branches or pull requests

1 participant