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

E0714: Import specifier not relative

CodeCategoryStability
E0714IntrinsicPermanent

Explanation

An import path must be relative to the importing file. An empty path names no candidate, while an absolute path is anchored to one machine's filesystem instead of the source tree; Rue rejects either spelling before any filesystem probe. The reserved std specifier follows its own program-anchored rule.

Likely cause

The import string is empty, begins with /, or was generated as an absolute host path. Spell a source-tree dependency relative to the file containing the @import call.

Examples

Use an absolute import path

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

Use a relative import path

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

References