Skip to main content
SQLBuild records resolved enum, constant, and macro use while expanding the complete project. It uses those relationships to reject unused declarations and validate the placement of narrow ones.

What counts as usage

Every project-wide, inherited, exact-local, and model-private declaration must have a genuine use. Unused declarations fail compilation.

Closest valid placement

Use the consumer shape to choose the directory:

Placement examples

One exact directory

Multiple descendant directories

Multiple authored roots

Expected-model grants anchor test and scenario enum/constant use through the granting model, not through the test file’s directory. Macro dependencies anchor through the consuming macro’s lexical scope. These rules prevent relationship-driven use from producing misleading filesystem placement.

Stable project-wide APIs

A used project-wide declaration remains valid even if all current consumers could fit under a narrower root. Moving a public declaration is an API decision, not automatic cleanup. Closest exact placement applies when a declaration is already narrow. When placement is wrong, the compiler reports:
  • The current declaration path and scope
  • The required scope and owning path
  • The consumers that determine that placement
  • The exact destination directory

Inspect consumers and resource moves

Use Scope Explorer to inspect placement facts and preview whether moving an authored resource preserves its declaration visibility.