E1113: configuration module has an import

View source

The module config is the place for the compile-time values of a package.

The module config is the place for the compile-time values of a package. Its files may declare constants and the types that describe them. They may not contain an import, so the configuration cannot depend on code that runs at run time (ADR-0054). The error points at the import. The same rule applies to every module below config.

The message names the configuration module and the module that the import wanted. The error is located at the import in the file that holds it.

Example

actus
import config;

verb main() {
    erg limit = config::LIMIT;
}
actus
import other;
open values;
actus
open const LIMIT: u8 = 30u8;
actus
open items;
actus
open const ITEM: u8 = 1u8;

Fix

Remove the import. Move the value that the configuration needs into the configuration module itself, or let the other module import config.

actus
import config;

verb main() {
    erg limit = config::LIMIT;
}
actus
open values;
actus
open const LIMIT: u8 = 30u8;

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