Skip to content

compile: no module search-path / project build mode — nested src/** use SiblingModule fails #642

Open

Description

@hyperpolymath

Summary

The core-WASM compile command is single-file only — it has no module search path, so a nested src/** project layout where one module does use SiblingModule fails to resolve ("undefined module"). Downstream, the svalinn gateway (stapeln/container-stack/svalinn/src) cannot be compiled as a project.

Evidence

affinescript compile exposes only [--target TRIPLE] FILE [-o OUT] (bin/main.ml, the compile term is target_arg $ path_arg $ output_arg). There is no --search-path / project / manifest option, and the Module_loader is built from defaults, so a use SiblingModule referencing another file under src/ relative to the entry file is not found.

Suggested direction

Either:

  • a repeatable --search-path DIR flag threaded into the Module_loader config used by compile, or
  • a project/manifest build mode (compile a directory / a manifest) that roots module search at the project src/.

Context

Surfaced while characterising svalinn-gateway compiler gaps after the cross-module constructor-link fix (#138 / #602, ac98c81). This is a separate gap — module resolution at compile time, not constructor codegen. Confirmed at main b8ba479.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaves incorrectlypriority:p2Normal - queue itscope:repoConfined to this repositorystatus:readyFully specified and ready to be picked up

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions