On this page
B1003: library unit not found
Catalog status: active. Default severity: error. Stable name: unknown-unit. Family: Names and declarations.
A with clause (or a child unit's parent) names a library unit that Verada could not find. It looks for GNAT-named files (parent-child.vads, in lower case) in the directories of the files being checked, in the project's source-dirs (verada.toml), and in the predefined library. A body stub (procedure Report is separate;) whose subunit file (main-report.vadb) is not found is reported the same way. Verada checks the whole program, so a missing subunit is an error when the program is checked, where Ada reports it only when the program is bound.
Example (Vada)
with Missing_Unit;Example (Varc)
import Missing_Unit;
What to do (Vada)
Check the unit name, or add the directory that contains missing_unit.vads to source-dirs.
What to do (Varc)
Check the unit name, or add the directory that contains missing_unit.va to source-dirs.
Regression source and further reading
Complete regression example: source, command arguments and expected results. The fixture deliberately reproduces this diagnostic.
See names and declarations, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.