#50Implement `@import`

  • avatar~clovercommented · 2 years ago
    Author
    Owner

    A prerequisite to this is probably adding module expressions. Maybe not.

    An @import("./url") is equivilent to inlining a module expression with that file's content. The string can be dynamic.

    To be clear this issue will be just for local files. A separate proposal will be opened detailing how remote URLs will resolve, and more importantly the plan for how remote dependencies will be managed.


    Milestone: 0.2.0.

  • avatar~clover changed the status to Todo · 2 years ago
  • avatar~lino-levancommented · 2 years ago

    An @import("./url") is equivilent to inlining a module expression with that file's content. The string can be dynamic.

    Surely not. What about files that reference each other?

  • avatar~clovercommented · 2 years ago
    Author
    Owner

    What about files that reference each other?

    Deduplicate. I guess I should've been more careful with my words "inlining [...] with that file's content". Two files can 100% reference each other, though what comes into question is how top-level side effects are to be handled.