Looks like serializing functions with keyword arguments doesn't work:
julia> using BSON
julia> f = (;x)->x^2
#7 (generic function with 1 method)
julia> BSON.@save "test.bson" f
julia> BSON.@load "test.bson" f
julia> f(x=2)
ERROR: function #7 does not accept keyword arguments
Stacktrace:
[1] kwfunc(::Any) at ./boot.jl:330
[2] top-level scope at none:0
Replacing the above with a positional argument works as expected. Would be great if this could be fixed. I would use JLD2 but while that works with keyword arguments, it can't do closures unlike BSON. I'm on Julia 1.1.0 and BSON 0.2.3.