Skip to content

[Bug] import with relative file paths #277

@softmattertheory

Description

@softmattertheory

Describe the bug
The import keyword appears to be looking relative to the CWD, rather than the file path of the current file.

To Reproduce
The following folder structure and files illustrate the problem
/folder1/ a.morpho
/folder1/ b.morpho -> import "a.morpho"
/folder2/ c.morpho -> import "../b.morpho"
Running c.morpho yields an error that "a.morpho" could not be found.

Expected behavior
import should simply find and import the file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions