Skip to main content
Sifr organizes every diagnostic into a named family. Each code follows the format SIFR-<FAMILY>-dddd, where the four-digit number is scoped within its family. This page lists every active diagnostic family and links each code to a dedicated reference page. Use sifr --explain <CODE> in your terminal to get the exact renderer template and suggestions for your installed compiler version.
The PARSE family covers errors that the parser encounters before any semantic analysis. These diagnostics fire when your source file contains syntax the Sifr parser cannot recover from.
The NAME family covers errors that arise when the compiler cannot resolve an identifier — a variable, function, type, or member — to a known declaration.
The IMPORT family covers errors that occur when resolving import and from … import statements. These diagnostics fire before type-checking when the module graph cannot be built.
SIFR-IMPORT-0008 fires when you write from math import floor instead of from sifr.math import floor. Sifr’s standard library lives under the sifr.* namespace.
The TYPE family covers type system violations detected during static analysis and lowering. These diagnostics indicate that the inferred or annotated types in your program are not compatible with each other or with the operation being performed.
The ASYNC family covers violations of Sifr’s async effect system. Sifr tracks whether functions perform real suspension, and it enforces that blocking or CPU-heavy work is never called directly from an async context.
The PYENV family covers root Python environment selection and live interpreter probe failures for embedded CPython interop.
The PYTRUST family covers import-root and native-extension trust policy for embedded Python interop.
The PYIMP, PYCALL, PYCONV, PYRES, PYCTX, PYCB, and PYZC families are active compiler-emitted Python interop diagnostics. PYCTX covers context-manager entry, exit, suppression, and cause contracts. PYZC covers typed buffer, Arrow, and DLPack declaration, ownership, layout or stream policy, transfer, and hidden-copy errors. Runtime failures at active boundaries are returned as structured PythonError values.
The SIFR-RUST-* families cover declaration-level Rust interop through Cargo. These diagnostics are emitted by the same compiler path used by sifr check, sifr bridge check, package build, and package publish validation.
The DECIMAL family covers errors in Sifr’s Decimal and BigDecimal numeric types. Sifr’s decimal types are distinct from Python floats and have their own literal syntax, scale rules, and construction constraints.
The INT family covers errors in Sifr’s exact integer (int) and fixed-width integer types (i8i128, u8u128). Sifr enforces explicit conversions and overflow handling rather than silently wrapping or truncating.
The IO family covers errors at the boundary between text-mode and binary-mode file operations. Sifr requires that text-mode file opens declare an explicit encoding at compile time.
The ENCODING family covers errors related to text encoding configuration. Sifr requires that encoding error handlers be statically known so that encoding behavior is predictable and verifiable at compile time.
The CALL family covers errors at call sites: wrong argument counts, unexpected keyword arguments, duplicate arguments, missing required arguments, and uncallable expressions.
The OWN family covers violations of Sifr’s ownership and borrow model. Because Sifr compiles to Rust, it enforces that values are not used after being moved, that borrows do not conflict, and that values respect sendability and shareability boundaries across task and channel boundaries.
The FLOW family covers control-flow correctness: invalid break/continue placement, missing return values, unsupported loop forms, and constructs that HIR lowering cannot represent.
The FMT family covers formatting enforcement. It fires when sifr fmt --check detects that one or more source files have drifted from canonical Sifr formatting.
Run sifr fmt (without --check) to automatically rewrite all files to canonical formatting and resolve SIFR-FMT-0001.
The LINT family covers the policy-rule engine (sifr lint). These are Warning-severity diagnostics that can be suppressed per-line with # sifr: ignore[rule-id]. The family also includes meta-diagnostics about suppression hygiene.
The MATCH family covers match statement correctness. Sifr requires that match statements are exhaustive over enum types and that patterns are well-formed.
The PROTO family covers violations of Sifr’s structural protocol system: iterator and reversible protocols, context-manager protocols, and hashability/comparability constraints.
The CLASS family covers class-level structural errors: missing field initializers, field ordering violations, duplicate enum variants, invalid base classes, and unsupported class forms.
The RESULT family covers Sifr’s checked error-handling model. Sifr requires that Result values are explicitly handled, that error types are valid, and that try/except blocks cover all possible error types from the try body.
SIFR-RESULT-0001 fires whenever you call a function that returns Result and discard the return value without handling it. Use match, unwrap(), or propagate the result with ? syntax to resolve it.
The STDLIB family covers errors related to Sifr’s embedded standard library. These diagnostics fire when a stdlib constructor or method is called in an unsupported way, or when the stdlib bootstrap or cache has a problem.
The WORKSPACE family covers errors in workspace configuration: malformed manifests, source roots that escape the workspace boundary, and invalid source root entries. It also includes legacy import resolution errors that mirror the IMPORT family for workspaces not yet migrated to the current module system.
The PACKAGE family is the largest family and covers the full lifecycle of Sifr packages: manifest validation, dependency resolution, import scope enforcement, trust policy, archive integrity, and publish guardrails.
The CODEGEN family is reserved for diagnostics that arise during the Rust lowering and code-generation phase, after HIR construction. No codes are active yet; this family is reserved for future use.
The BUILD family covers failures in Sifr’s build pipeline: file materialization, temporary workspace creation, Cargo manifest generation, Rustc/Cargo execution, and missing artifacts.
The INTERNAL family covers compiler-internal failures that escape the panic boundary. If you see an INTERNAL diagnostic, it indicates a compiler bug rather than a problem with your source code.
SIFR-INTERNAL-0001 always indicates a compiler bug. If you encounter it, please file a report with the Sifr issue tracker and include a minimal reproduction of the failing source file.