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

Need to change Sort.foo imports #243

Closed
dmbates opened this issue Apr 10, 2013 · 9 comments
Closed

Need to change Sort.foo imports #243

dmbates opened this issue Apr 10, 2013 · 9 comments

Comments

@dmbates
Copy link
Contributor

dmbates commented Apr 10, 2013

Suddenly this morning I needed to remove lines of

import Sort.Perm

in src/pooleddataarray.jl and

import Sort.sort, Sort.sortby, Sort.By, 
       Sort.sort!, Sort.sortby!,
       Sort.Algorithm, Sort.Ordering, 
       Sort.lt, Sort.Perm, Sort.Forward

in src/dataframe.jl and then add

import Base.Sort.Algorithm, Base.Sort.Ordering
import Base.Sort.Perm, Base.Sort.Forward

in src/DataFrames.jl to get the DataFrames package to load.

I didn't see any changes in either the DataFrames package or Julia herself that should have caused this change. Am I doing something wrong with versions or should I commit these changes?

@tshort
Copy link
Contributor

tshort commented Apr 10, 2013

I think it's from this:

JuliaLang/julia#2375

I assume someone will clarify this later today.

@dmbates
Copy link
Contributor Author

dmbates commented Apr 10, 2013

Shall I commit these changes?

@johnmyleswhite
Copy link
Contributor

If they're needed to get the package to work at all, please go ahead and commit the changes. @kmsquire is the real expert on sorting and will have the most useful insight into this.

@ViralBShah
Copy link
Contributor

I think that @StefanKarpinski needs to weigh in, since he is the last person to have overhauled the sort stuff. It is worth checking if the sorting documentation has kept up with the implementation.

@kmsquire
Copy link
Contributor

As pointed out by @tshort, this is related to JuliaLang/julia#2375, and isn't related to sorting at all.

Basically the issue is that modules defined in Base used to shadow top level modules. Sort, in particular, is really Base.Sort, but @JeffBezanson felt that it wasn't good to shadow a potential Sort package, so the "fix" was to start requiring full qualification of subpackages.

For sorting to work properly for DataFrames, the rest of the imports (Base.Sort.sort, Base.Sort.sortby, etc.) will also need to be there. @dmbates, do you mind including these changes?

(Jeff, this has come up a few times, so it would probably be good to announce it on julia-dev, if you haven't already.)

@kmsquire
Copy link
Contributor

"isn't related to sorting" -> "isn't _specifically_ related to sorting"

@dmbates
Copy link
Contributor Author

dmbates commented Apr 10, 2013

Fixed via 5517155

@kmsquire
Copy link
Contributor

Thanks!

@dmbates
Copy link
Contributor Author

dmbates commented Apr 11, 2013

Fixed via b936f7119eb52322dfd142bc70df3d387b14119e

@dmbates dmbates closed this as completed Apr 11, 2013
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

5 participants