Jaseci-Labs / jaclang

The Jac Programming Language
https://www.jac-lang.org
22 stars 21 forks source link

[BUG] Relative Import above one directory not working #266

Closed chandralegend closed 5 months ago

chandralegend commented 7 months ago

Describe the bug import:jac from ..utils, something doesnt work

marsninja commented 7 months ago

Hey chandra synatx like from ..utils.helpers import pascal_to_snake doesnt work in python either

marsninja commented 7 months ago

Huh interesting, we have a file jaclang/jaclang/tests/fixtures/deep/deeper/snd_lev.jac that has teh following code that works, is this what you wanted?

import:jac from ..mycode, code;

can slprint ->str {
    return "sl" + code();
}

I do know the following doesnt work in jac and should, let me know if this is what you're thinking:

import:jac from .., mycode;

marsninja commented 5 months ago

Close with #341