You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
I use import statements like import src.b (and import src.a within 'src/b/b.v') to get this working.
But, I agree, direct sibling imports should either work or, at least, the error should be module 'b' not found instead of undefined ident/function/....
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 expressions4 |
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.
The text was updated successfully, but these errors were encountered: