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

RFC: Move PriorityQueue and heap functions out of Base #19800

Merged
merged 2 commits into from
Jan 6, 2017

Conversation

ararslan
Copy link
Member

@ararslan ararslan commented Dec 31, 2016

This PR is the Base companion to JuliaCollections/DataStructures.jl#238; it removes the entire Collections module and makes all functions currently exported from that module error, in a similar fashion to QuadGK and Primes.

This should not be merged until the DataStructures PR is merged and the package tagged.

edit by tkelman: closes #18497

@ararslan ararslan force-pushed the aa/farewell-collections branch from d3f11cb to c6f07d2 Compare January 1, 2017 01:21
for f in (:PriorityQueue, :enqueue!, :dequeue!, :heapify!, :heapify, :heappop!, :heappush!, :isheap, :peek)
@eval function ($f)(args...; kwargs...)
error(string($f, args, " has been moved to the package DataStructures.jl.\n",
"Run Pkg.add(\"DataStructures\") to install DataStructures on Julia v0.6 and later, ",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's nothing 0.6 specific about this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only in that they aren't (/won't be) in Base in 0.6. I just followed the text from QuadGK and Primes.

Copy link
Contributor

@tkelman tkelman Jan 1, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will DataStructures use base's copy on 0.5, or define its own equivalent version? I think either would be fine in this case, as long as you aren't overwriting methods or otherwise causing issues or conflicts

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It defines its own version using the code as of 0.6 (with a single slight modification to make it work on 0.4). Should be entirely equivalent to what's in Base in 0.5.

@ararslan
Copy link
Member Author

ararslan commented Jan 2, 2017

Note that the PR title is "WIP" only because the changes have not been incorporated into DataStructures; this is otherwise good to go I think. Once that's done I'll change the title here to "RFC" to reflect its mergeability.

@ararslan ararslan changed the title WIP: Move PriorityQueue and heap functions out of Base RFC: Move PriorityQueue and heap functions out of Base Jan 5, 2017
@JeffBezanson JeffBezanson merged commit 5b6ff4a into JuliaLang:master Jan 6, 2017
@ararslan ararslan deleted the aa/farewell-collections branch January 6, 2017 05:54
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

Successfully merging this pull request may close these issues.

move PriorityQueue out of Base?
3 participants