DataFramesMeta.jl
DataFramesMeta.jl copied to clipboard
Fix macro hygiene
Here is the problem in particular:
julia> using DataFrames
julia> using DataFramesMeta: @transform
julia> df = DataFrame(x = [1, 2]);
julia> @transform df :y = :x .+ :x .^ 2
ERROR: UndefVarError: DataFramesMeta not defined
Stacktrace:
[1] top-level scope
@ ~/.julia/packages/DataFramesMeta/yzaoq/src/macros.jl:1190
The offending line is here.
Unfortunately I really don't know what to do in this exact instance, since this call is pretty deeply nested inside a helper function shared by everything. I can't just copy and paste it into each macro call. cc @jkrumbiegel , do you have any ideas on a fix?
The error from that line can probably be fixed by :($make_source_concrete($(Expr(:vect, t...)))), but I haven't tried.
Cool that seems to have fixed it. Great, I was worried that I would be really out of luck. I will make a PR for this after I merge #307
Fixed in #384