MGS1048: a layers entry magus cannot honor
layers on magus\project({...}) maps a workspace-relative directory, or a glob
of directories, to a layer name. The knowledge graph stamps that name on each
directory, magus query "layer=<name>" filters by it, and magus\layer(name)
returns every directory in it.
This code fires when an entry cannot be honored:
- the directory does not exist, or the glob matches no directory;
- the path escapes the workspace;
- the layer name is blank or not a lowercase slug (
^[a-z][a-z0-9-]*$); - one directory is declared under two layer names.
Why
A layer that silently covers nothing reads as a boundary the tree keeps when nothing checks it. The load stops so the declaration and the tree agree.
Resolution
The message names the entry and the cause.
- A moved or deleted directory. Point the entry at the directory's new path, or delete the entry.
- A glob that matches nothing. Check the pattern against
magus lsand the tree; a glob matches directories, not files. - A malformed name. Use a lowercase slug such as
handlerortransport. - Two names for one directory. Keep one; a directory sits in one layer.