There are two different module resolution for same code. #19402
Labels
Bug
This tag is applied to issues which reports bugs.
Module Lookup Problem
Bugs/feature requests, that are related to looking up modules/mismatches in module names/paths.
Describe the bug
When compiling the same code, module resolution changes depending on whether absolute or relative paths are specified.
Reproduction Steps
files:
cmd/foo/main.v:
cmd/foo/foo.v:
foo/foo.v:
$ v run cmd/foo/main/main.v /foo $ v run $(pwd)/cmd/foo/main/main.v /cmd/foo
Expected Behavior
Always resolve to
foo
, notcmd.foo
.Current Behavior
There are two different module resolution
Possible Solution
This problem is caused by qualify_import.
v run cmd/foo/main/main.v
->import res 3
v run $(pwd)/cmd/foo/main/main.v
->import res 2
Additional Information/Context
This is the cause of #18993 #11348
V version
V 0.4.1 4f7dbbf
Environment details (OS name and version, etc.)
Important
You can vote for this issue using the 👍 reaction. More votes increase the issue's priority
for developers.
Take into account that only the 👍 reaction counts as a vote.
Only reactions to the issue itself will be counted as votes, not comments.
The text was updated successfully, but these errors were encountered: