fix(analyzer): resolve explicit-mass percentage targets when mass standardization is off #325
No reviewers
Labels
No labels
bug
discussion
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gram-lang/gram!325
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/analyzer-percent-without-mass-std"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
With
enableMassStandardization: false, a percentage targeting an ingredient already written in a unit of mass (@water{65% @&flour}with@flour{500 g}) raised a falseRELATIVE_QUANTITY_UNKNOWN_MASS:resolveShare()only read the target'snormalizedMass, which is never set when standardization is off.resolveShare()falls back to the written mass of the target (g,kg,oz,lb, sums), converted within the mass family, with no database.normalizedMasswhen the option is off.Tests:
packages/analyzer/tests/percent-without-mass-standardization.test.ts(8 cases). Build, full test suite, conformance, lint and typecheck green. Patch changeset for@gram-lang/analyzer.