Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Cached default input values #539

Closed
ericcecchi opened this issue Aug 31, 2022 · 1 comment
Closed

Bug: Cached default input values #539

ericcecchi opened this issue Aug 31, 2022 · 1 comment
Assignees
Labels

Comments

@ericcecchi
Copy link

The ActiveInteraction v5 update introduced a regression where the default option for inputs is cached and not reevaluated on each execution. For default values that are function calls (e.g. lambdas), this leads to stale values after the first execution of an interaction.

The root cause of this regression is the caching of default values introduced in this commit. The previous behavior should be restored by either reverting the changes in that commit or conditionally caching the default value only when the value is not a function. Since the benefits of caching static values are negligible, the best option is to revert this change.

@AaronLasseigne
Copy link
Owner

Thanks for the issue. Fixed in https://github.com/AaronLasseigne/active_interaction/releases/tag/v5.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants