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
util/by-method: Accepts keyword arguments, returns nil if method wasn't defined
core/by-method: Accept a map, return context if method wasn't defined. Due to deep merging of return values, all sequential values in the context are mutated. (Bad behavior, caused me a bug)
I assume the "better" one is util/by-method. Can we then at least deprecate the one in core?
The text was updated successfully, but these errors were encountered:
Good catch and sorry for not looking at this bug earlier. Can you describe the problem with core/by-method more detailed? I don't see where deep merging would kick in here. The functions seem similar to me except keyword args and handling of :any.
Maybe you could past an example or -- even better -- write a little test?
The
by-method
function is defined twice:liberator/src/liberator/util.clj
Line 51 in 1a2a510
liberator/src/liberator/core.clj
Line 614 in b18447e
They behave differently:
util/by-method
: Accepts keyword arguments, returns nil if method wasn't definedcore/by-method
: Accept a map, return context if method wasn't defined. Due to deep merging of return values, all sequential values in the context are mutated. (Bad behavior, caused me a bug)I assume the "better" one is
util/by-method
. Can we then at least deprecate the one in core?The text was updated successfully, but these errors were encountered: