#import sibling package?

1 messages · Page 1 of 1 (latest)

manic bison
#

Hi all, I am not understanding how to import a local package. Here is a sample directory structure: ```
main.odin
foo/
foo.odin
bar/
bar.odin

Now, from `main.odin` it's easy to import `foo` or `bar`, however importing e.g. `foo` from inside `bar.odin` with a naive `import "foo"` does not seem to work? I have also tried `import "../foo"`
keen escarp
#

path imports are relative to the current folder & you can't have cyclic dependencies.
Having everything you need in one folder and using packages for libraries, not as namespaces, is highly encouraged.
so importing foo in bar.odin is just import "../foo"