Skip to content
Beskid The Beskid Book

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

05.4 Diagnostics you will see

Common name and import errors—and how to fix them without ritual."

Diagnostics you will see

If you only read one page in this chapter, read this. These diagnostics are your daily companions.

Symptom: two imports expose the same name.

Fix: alias at least one (use a.Parser as AParser).

Symptom: symbol not found in scope.

Checklist:

  1. Typo in identifier
  2. Missing use
  3. Symbol not pub in defining module
  4. Wrong module path vs file layout

Symptom: using something that exists but is not exported.

Fix: mark pub at the definition (if it should be API) or stop reaching into another module’s internals.

Symptom: extra mod in a file-scoped module file.

Fix: move nested modules to another file or drop file-scoped declaration.

CLI and LSP share miette-style reports. Read:

flowchart TD
  D[Diagnostic] --> R[Read span + message]
  R --> C{Import or visibility?}
  C -->|import| U[Fix use / alias]
  C -->|visibility| P[pub or boundary]
  C -->|path| M[Fix mod / file layout]

06. Monorepo as coping mechanism