The documentation shows:
stamp("figures/energy_sweep.provenance.toml") do
sweep(model; βs = 0.05:0.05:2.0)
end
do passes the function as the first argument, so that is stamp(f, path). The methods are
stamp(::AbstractString, ::Record)
stamp(::AbstractString, ::Any)
so the documented call raises MethodError: no method matching stamp(::var"#…", ::String).
record(f; …) already takes the function first, so the two verbs disagree on argument order as well.
Fix
stamp(f::Function, path::AbstractString) = stamp(path, f)
Typed ::Function so stamp(path, value) stays unambiguous against stamp(::AbstractString, ::Any).
The documentation shows:
dopasses the function as the first argument, so that isstamp(f, path). The methods areso the documented call raises
MethodError: no method matching stamp(::var"#…", ::String).record(f; …)already takes the function first, so the two verbs disagree on argument order as well.Fix
Typed
::Functionsostamp(path, value)stays unambiguous againststamp(::AbstractString, ::Any).