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
Mneme should no longer generate empty maps as a pattern for maps that contain keys. Note that the behavior for structs would remain the same.
# Maps:auto_assert%{id: 1,name: "Zach"}# would NO LONGER SUGGESTauto_assert%{}<-%{id: 1,name: "Zach"}# Structs:auto_assert%User{id: 1,name: "Zach"}# would still suggestauto_assert%User{}<-%User{id: 1,name: "Zach"}
Note that if you edited a match to assert an empty map, it would still succeed and be offered as a suggestion when updating. For instance:
auto_assert%{x: 1,y: %{}}<-%{x: 2,y: %{z: 3}}# would still suggestauto_assert%{x: 2,y: %{}}<-%{x: 2,y: %{z: 3}}
Context
Two recent issues got me thinking about the utility of suggesting empty maps as patterns: #55, #56.
In my own usage, empty raw maps are rarely useful patterns, whereas empty structs often are, especially when nested.
Request for comment
I'd greatly appreciate any feedback on whether this change would be beneficial/detrimental/neutral to your usage of Mneme. Do you ever use empty raw maps in patterns? Would you miss them?
The text was updated successfully, but these errors were encountered:
zachallaun
changed the title
Proposal: Remove empty raw maps as suggested match patterns
Remove empty raw maps as suggested match patterns
Nov 26, 2023
Proposal
Mneme should no longer generate empty maps as a pattern for maps that contain keys. Note that the behavior for structs would remain the same.
Note that if you edited a match to assert an empty map, it would still succeed and be offered as a suggestion when updating. For instance:
Context
Two recent issues got me thinking about the utility of suggesting empty maps as patterns: #55, #56.
In my own usage, empty raw maps are rarely useful patterns, whereas empty structs often are, especially when nested.
Request for comment
I'd greatly appreciate any feedback on whether this change would be beneficial/detrimental/neutral to your usage of Mneme. Do you ever use empty raw maps in patterns? Would you miss them?
The text was updated successfully, but these errors were encountered: