Skip to content

Module resolution relative to Seedfile project root #43

Description

@brianp

Module imports like use src/seedfile currently resolve relative to the source file's parent directory. This breaks when the entry point lives inside src/ (e.g., aster-pkg/src/main.aster importing use src/seedfile looks for src/src/seedfile.aster).

The fix: when a Seedfile exists in a parent directory, use it as the project root for module resolution. The resolver would walk up from the source file until it finds a Seedfile, then resolve imports relative to that directory.

Without a Seedfile, fall back to the current behavior (resolve relative to the source file). This keeps single-file scripts and test programs working unchanged.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmediumShould get done, not urgenttoolingCLI, formatter, LSP, REPL

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions