GithubHelp home page GithubHelp logo

Fix macro hygiene about dataframesmeta.jl HOT 3 OPEN

pdeffebach avatar pdeffebach commented on June 25, 2024 1
Fix macro hygiene

from dataframesmeta.jl.

Comments (3)

pdeffebach avatar pdeffebach commented on June 25, 2024

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?

from dataframesmeta.jl.

mcabbott avatar mcabbott commented on June 25, 2024

The error from that line can probably be fixed by :($make_source_concrete($(Expr(:vect, t...)))), but I haven't tried.

from dataframesmeta.jl.

pdeffebach avatar pdeffebach commented on June 25, 2024

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

from dataframesmeta.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.