Module import at lower directory level requires directory name to import #22937
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.
Unit: Compiler
Bugs/feature requests, that are related to the V compiler in general.
Describe the bug
-- index.v
import src.backend
the above import works but this import throws a compile error:
-- index.v
import backend
index.v:5:1: builder error: cannot import module "backend" (not found)
Reproduction Steps
--- src/backend.v
--- index.v
Expected Behavior
expected this import to work:
--- index.v
Current Behavior
-- index.v
import backend
...throws an error:
index.v:5:1: builder error: cannot import module "backend" (not found)
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.8 58fc4de
Environment details (OS name and version, etc.)
Fedora Linux 41
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: