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

In a .v file with no module line, module main should be "assumed". #11

Open
JalonSolov opened this issue Aug 28, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@JalonSolov
Copy link
Contributor

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 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

Plugin Version

0.0.1-beta.6
@Krotki Krotki added the bug Something isn't working label Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants