Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using function chaining and Lazy.lj #40

Closed
tcovert opened this issue Feb 17, 2016 · 2 comments
Closed

Error using function chaining and Lazy.lj #40

tcovert opened this issue Feb 17, 2016 · 2 comments

Comments

@tcovert
Copy link

tcovert commented Feb 17, 2016

When I try to do something very similar to the Lazy.jl example in the docs, I get a error informing me that both Lazy.jl and DataFramesMeta.jl have macros called "with", and as a result, uses of with must be "qualified". Here is the code block I am trying to run. For reference, "ndic" is a dataframe, and dfsplit() is a helper function that more or less calls split() in a particular way.

using DataFrames
using Lazy
using DataFramesMeta

...

pools = @> begin
ndic
@where(!isna(:ProducedPools))
@by(:FileNo, df -> dfsplit(df, :ProducedPools, ','))
@select(:FileNo, poolorder = :splitorder, pool = :splitval)
@where(:pool .!= "Confidential")
end

Here is the error I get:

julia> include("CODE.jl")
WARNING: both DataFramesMeta and Lazy export "@with"; uses of it in module Main must be qualified
ERROR: LoadError: UndefVarError: @with not defined
in include at /usr/local/Cellar/julia/0.4.3/lib/julia/sys.dylib
in include_from_node1 at /usr/local/Cellar/julia/0.4.3/lib/julia/sys.dylib
while loading /PATH_TO_CODE/CODE.jl, in expression starting on line 36

@tshort
Copy link
Contributor

tshort commented Feb 17, 2016

It's probably possible to get rid of the error but not the warning. I think replacing uses of @with with DataFramesMeta.@with in the code should do that. I won't have time until late next week, so if anyone wants it before that, please make a pull request.

If that doesn't work, we should remove those docs or pull in the code for the @> macro from Lazy.

@tshort
Copy link
Contributor

tshort commented Mar 11, 2016

Should be fixed by #41. I added tests that include @> and @as. It won't show up in the release version until I tag it, so you'll have to clone it to use it before that.

@tshort tshort closed this as completed Mar 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants