unit_finding_unparseable
Stable constant · Units
Tier: stable · Kind: constant · Topic: Units
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
| not exported | not exported | UNIT_FINDING_UNPARSEABLE | UNIT_FINDING_UNPARSEABLE | UnitFindingUnparseable |
Julia
Julia does not export this constant.
TypeScript
TypeScript does not export this constant.
Python
UNIT_FINDING_UNPARSEABLE = 'unparseable_unit'
A declared unit string that denotes no real unit. Meaningless declaration, so a defect in the FILE, not in the checker.
Rust
pub const UNIT_FINDING_UNPARSEABLE: &str = crate::diagnostic::codes::UNPARSEABLE_UNIT;
Go
const UnitFindingUnparseable = "unparseable_unit"
Unit-finding codes. A unit finding is either a DEFECT IN THE FILE — which invalidates the document — or a limit of the ANALYSIS, which does not. The classification is decided at the point the finding is raised (never recovered later from the prose) and carried on UnitWarning.Code; ValidateStructuralWithCodes promotes the defect-bearing codes to unit_inconsistency structural errors.
The split is the cross-binding policy and mirrors TypeScript’s units.ts:
- UnitFindingDimensionalMismatch — a PROVABLE inconsistency: adding metres to kilograms, log() of a dimensional quantity, an equation whose sides have different dimensions. The file is wrong. → HARD ERROR.
- UnitFindingUnparseable — a declared unit string that does not denote a real unit (“not_a_unit”). The file is wrong. → HARD ERROR.
- UnitFindingAnalysis — the checker cannot DETERMINE a dimension: a symbolic (non-literal) exponent, an operator with no dimensional rule (fn/table_lookup), a malformed arity. That is a statement about the checker, not a defect in the file. → WARNING.
- UnitFindingDimensionlessLiteral — the esm-spec §4.8.6 warning stage: a site that fails only when nonzero bare literals are dimensionless. Never promoted. → WARNING.
An unknown VARIABLE is likewise never a mismatch (it propagates as “unknown” and suppresses the check); it is separately a hard undefined_variable error, so the units layer does not double-report it.