If you have a mix of .v files in a directory, some with module main at the top, and some without, Intellij things they are files from different modules.
This is evidenced by functions being marked as "not used" when they very clearly are if you examine the files. They are simply used in one of the files that don't match the module line at the top.
Expected Behavior
All files with module main or with no module line at all are treated as being in module main.
Current Behavior
Files with module main and files with no module line at all are treated as being in separate modules.
Reproduction Steps
Place both files in the same dir:
t1.v
module main
fn t1() {
}
t2.v
t1()
Then open t1.v in the editor. See that t1 is greyed. Hover mouse over t1 and see Unused function 't1' warning message.
Possible Solution
No response
Additional Information/Context
No response
Environment details (v doctor output)
V full version: V 0.4.7 efa98d9.1fbe2a1
OS: linux, "Manjaro Linux"
Processor: 32 cpus, 64bit, little endian, AMD Ryzen 9 7950X 16-Core Processor
getwd: /home/jalon
vexe: /home/jalon/git/v/v
vexe mtime: 2024-08-28 11:58:56
vroot: OK, value: /home/jalon/git/v
VMODULES: OK, value: /home/jalon/.vmodules
VTMP: OK, value: /tmp/v_1000
Git version: git version 2.46.0
Git vroot status: weekly.2024.34-51-g1fbe2a19
.git/config present: true
CC version: cc (GCC) 14.2.1 20240805
thirdparty/tcc status: thirdparty-linux-amd64 40e5cbb5
IDE Type (IDEA Community/Ultimate, GoLand, CLion, etc.)
IntelliJ IDEA 2024.2.0.2 (Ultimate Edition)
Build #IU-242.20224.419, built on August 19, 2024
Describe the bug
If you have a mix of .v files in a directory, some with
module main
at the top, and some without, Intellij things they are files from different modules.This is evidenced by functions being marked as "not used" when they very clearly are if you examine the files. They are simply used in one of the files that don't match the
module
line at the top.Expected Behavior
All files with
module main
or with nomodule
line at all are treated as being inmodule main
.Current Behavior
Files with
module main
and files with nomodule
line at all are treated as being in separate modules.Reproduction Steps
Place both files in the same dir:
t1.v
t2.v
Then open
t1.v
in the editor. See thatt1
is greyed. Hover mouse overt1
and seeUnused function 't1'
warning message.Possible Solution
No response
Additional Information/Context
No response
Environment details (
v doctor
output)IDE Type (IDEA Community/Ultimate, GoLand, CLion, etc.)
Plugin Version