AaronLasseigne / active_interaction

:briefcase: Manage application specific business logic.
MIT License
2.06k stars 136 forks source link

Bug: Cached default input values #539

Closed ericcecchi closed 1 year ago

ericcecchi commented 1 year ago

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 commented 1 year ago

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