-
Notifications
You must be signed in to change notification settings - Fork 34
Absolut import does not work. #141
Copy link
Copy link
Open
Description
See:
Idunn2:absolut_import_bug angelos$ ls
main.wren to_import.wren
Idunn2:absolut_import_bug angelos$ Source of the files (main.wren):
Idunn2:absolut_import_bug angelos$ cat main.wren
import "/Users/angelos/development/kestrel-devel/absolut_import_bug/to_import"
System.print("we do not get here, as the import above will fail!") And the imported file:
Idunn2:absolut_import_bug angelos$ cat to_import.wren
// the main.wren trys to import this with an absolut path
System.println(" ... this fails - and is never printed")Now running wrenc_d (debug version on my Mac, hence the _d)
Idunn2:absolut_import_bug angelos$ wrenc_d main.wren
Could not load module './Users/angelos/development/kestrel-devel/absolut_import_bug/to_import'.
at (script) (./main.wren line 1)
Idunn2:absolut_import_bug angelos$ As you can see at the output: the resolving/loading adds an erroneous dot ('.')
I guess the culprit is this line in _wren.inc (around line 54):
if (PathType.resolve(module) == PathType.SIMPLE) return module
SIMPLE should be ABSOLUT, or not?
EDIT: no, that is not the spot with the error - I investigate more.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels