E1108: import skips a parent facade

View source

A module is reached through the facade of every directory on its path.

A module is reached through the facade of every directory on its path. The import shapes::circle names a child of shapes, so the facade of shapes must open circle before another unit can import it (ADR-0110). If the parent facade does not open the child, the import would reach into a directory that its owner keeps private, and the compiler rejects it. A child opened with open unit cannot be imported from another unit either (ADR-0111). The message names the module and the parent facade.

Example

actus
import shapes::circle;

verb main() {
}
actus
open size;
actus
open verb side() -> Int {
    return 2;
}
actus
open area;
actus
open verb area() -> Int {
    return 1;
}

Fix

Open the child in the parent facade. The import then goes through the facade.

actus
import shapes::circle;

verb main() {
    erg size = circle::area();
}
actus
open size;
open circle;
actus
open verb side() -> Int {
    return 2;
}
actus
open area;
actus
open verb area() -> Int {
    return 1;
}

Run actus explain E1108 in your terminal to read this entry offline. Browse Modules & rules or all error codes.