sschellhoff / fml

A simple dynamic language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Relative import paths behave wrong

sschellhoff opened this issue · comments

Import paths are resolves from the starting point of the program. So by running the interpreter on some *.fml file, this file is treated as the starting point for all imports. Even for imports from other files on other paths.
Relative import paths should start from the file which containts the import.
Example:

/main.fml
/submodules/module1.fml
/submodules/module2.fml

in main.fml, you should use submodules/module2.fml to import module 2, but in submodules/module1.fml you should just use module2.fml to import module 2.

Closed this by mistake