Skip to content

Per-class eval error diagnostic messages — pipeline-sourced (deferred) #731

Description

@hhimanshu

Approach (updated)

Per-class eval error diagnostic messages (#VALUE! / #DIV/0! / #NUM! / #REF! / #NAME? / lookup #N/A) must align with Google Sheets as verified ground truth — never self-confirmed or hand-written. They will be sourced from the conformance fixtures pipeline (real-Sheets eval), which must first capture Sheets' error message strings: truecalc/fixtures#61.

Core 4.0.0 ships only the verified arity messages + the ErrorMsg mechanism (#730, merged). Per-class lands as a later minor (additive, non-breaking) once the pipeline provides verified text.

Implementation landmine (from the #730 stand-down audit)

When per-class kinds start being produced as ErrorMsg (instead of bare Error), any site that classifies by a SPECIFIC ErrorKind while matching only Value::Error(kind) will fall through and regress conformance. Known case: ERROR.TYPE in crates/core/src/eval/functions/logical/info/mod.rs matches Value::Error(kind) but not Value::ErrorMsg(kind, _), so it would return #N/A and break info.tsv once e.g. #DIV/0! / #NAME? become ErrorMsg. Fix: classify via val.error_kind() (handles both variants). Audit for similar classify-by-specific-kind sites before adding per-class messages.

Depends on

truecalc/fixtures#61 (pipeline captures Sheets error message strings).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions