Skip to content

Number the calls of non-idempotent methods so identical expressions get separate requirements - #90

Closed
bolehan wants to merge 1 commit into
masterfrom
bolekhan/non-idempotent-method-call-ordinal
Closed

bolehan wants to merge 1 commit into
masterfrom
bolekhan/non-idempotent-method-call-ordinal

Conversation

@bolehan

@bolehan bolehan commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

TemplateFactory now takes a set of method names that are not idempotent. While visiting a template the engine assigns every call of such a method a CallOrdinal — its 1-based number among the calls with the same name and argument list — and carries it through MethodCall, IMethodCallDefinition and IModelMethod. CallOrdinal takes part in equality, so two textually identical calls of a non-idempotent method no longer collapse into one entry of the model definition and the caller can supply a different value for each of them. Methods outside the set keep a null CallOrdinal and the previous behaviour.

…et separate requirements

TemplateFactory now takes a set of method names that are not idempotent. While visiting a
template the engine assigns every call of such a method a CallOrdinal — its 1-based number
among the calls with the same name and argument list — and carries it through MethodCall,
IMethodCallDefinition and IModelMethod. CallOrdinal takes part in equality, so two textually
identical calls of a non-idempotent method no longer collapse into one entry of the model
definition and the caller can supply a different value for each of them. Methods outside the
set keep a null CallOrdinal and the previous behaviour.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@bolehan bolehan self-assigned this Aug 21, 2026
@github-actions

Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Complexity Health
Mindbox.Quokka.Abstractions 92% 88% 106
Mindbox.Quokka 84% 79% 2264
Summary 84% (5008 / 5976) 79% (988 / 1247) 2370

@bolehan bolehan closed this Aug 24, 2026
@bolehan
bolehan deleted the bolekhan/non-idempotent-method-call-ordinal branch August 24, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant