Version: dev

unit_finding_analysis

Stable constant · Units

Tier: stable · Kind: constant · Topic: Units

JuliaTypeScriptPythonRustGo
not exportednot exportedUNIT_FINDING_ANALYSISUNIT_FINDING_ANALYSISUnitFindingAnalysis

Julia

Julia does not export this constant.

TypeScript

TypeScript does not export this constant.

Python

UNIT_FINDING_ANALYSIS = 'analysis'

The checker could not DETERMINE a dimension – a symbolic exponent, an operator with no dimensional rule, an unknown variable, a missing pint. A statement about the checker, not the file.

Source

Rust

pub const UNIT_FINDING_ANALYSIS: &str = crate::diagnostic::codes::ANALYSIS;

See UNIT_FINDING_DIMENSIONAL_MISMATCH .

Source · Rust docs

Go

const UnitFindingAnalysis = "analysis"

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.

Source · Go docs