You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We ran into an issue where we were loading data in a preparation for a default read action, which caused other issues, but we weren't getting the new warning advising not to do that (introduced in e5656b6).
The reason is because the preparation was a global one, ie. in a preparations block, not in a specific action. These preparations aren't inlined into the action at compile time, meaning calling Ash.Resource.Info.action(MyResource, :read) won't list the preparation even though it will apply.
Describe the solution you'd like
These preparations should be added to each of the actions they apply to, at compile time. For now this will be all actions, as preparations can't have conditions, but later on conditions may be added.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
We ran into an issue where we were loading data in a preparation for a default read action, which caused other issues, but we weren't getting the new warning advising not to do that (introduced in e5656b6).
The reason is because the preparation was a global one, ie. in a
preparations
block, not in a specific action. These preparations aren't inlined into the action at compile time, meaning callingAsh.Resource.Info.action(MyResource, :read)
won't list the preparation even though it will apply.Describe the solution you'd like
These preparations should be added to each of the actions they apply to, at compile time. For now this will be all actions, as preparations can't have conditions, but later on conditions may be added.
The text was updated successfully, but these errors were encountered: