Summary
When the generator looks up dimension references for relationships (integrals, derivatives, dot/cross products, overload base types) it uses try-get on a dimension map and continues silently when the reference is missing. A typo like "result": "Forec1D" or a stale name from a renamed dimension produces no diagnostic — the operator just isn't generated.
Evidence
Semantics.SourceGenerators/Generators/QuantitiesGenerator.cs around the relationship/operator emission code (e.g. ~lines 125-127, 245-278) does dimension-map lookups without diagnostics on miss.
Impact
- Hard to notice when a relationship that was supposed to exist quietly disappears from generated output.
- Major risk while iterating on the unified vector representation, where dimensions.json is being heavily edited.
Suggested next step
When a referenced dimension cannot be resolved, emit a Roslyn diagnostic (ReportDiagnostic) with a clear ID, e.g. SEM001: relationship 'Force * Distance -> Enrgy' references unknown dimension 'Enrgy'. Treat at least typo-class lookups as warnings; consider failing the build for unknown references in CI.
Area / Severity
SourceGenerators · bug
Summary
When the generator looks up dimension references for relationships (integrals, derivatives, dot/cross products, overload base types) it uses
try-geton a dimension map and continues silently when the reference is missing. A typo like"result": "Forec1D"or a stale name from a renamed dimension produces no diagnostic — the operator just isn't generated.Evidence
Semantics.SourceGenerators/Generators/QuantitiesGenerator.csaround the relationship/operator emission code (e.g. ~lines 125-127, 245-278) does dimension-map lookups without diagnostics on miss.Impact
Suggested next step
When a referenced dimension cannot be resolved, emit a Roslyn diagnostic (
ReportDiagnostic) with a clear ID, e.g.SEM001: relationship 'Force * Distance -> Enrgy' references unknown dimension 'Enrgy'. Treat at least typo-class lookups as warnings; consider failing the build for unknown references in CI.Area / Severity
SourceGenerators · bug