Ruta graveolens  ·  notes from a language experiment  ·  cultivated since 2025

E0713: Import escapes root

CodeCategoryStability
E0713IntrinsicPermanent

Explanation

A relative import normalized to a candidate outside the lexical identity boundary selected from the importing module's accepted provenance. That boundary is normally the project root (the root source file's directory); for a trusted standard-library importer it is the captured standard-library root. The candidate cannot receive an identity in the importer's namespace, so Rue rejects it before deriving any filesystem request.

Likely cause

A .. component climbs above the importer's provenance-selected identity root, or a dependency was moved outside that root while its old relative import remained. Move the dependency back under the applicable project or captured standard-library root, or choose an in-root relative path.

Examples

Import a file above the project root

// --- main.rue
const outside = @import("../outside.rue");
fn main() -> i32 { 0 }

Keep the imported file inside the project

// --- main.rue
const helper = @import("sub/helper.rue");
fn main() -> i32 { helper.answer() }
// --- sub/helper.rue
pub fn answer() -> i32 { 42 }

References