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

using Revise "leaks" methods #605

Open
jaakkor2 opened this issue Feb 19, 2021 · 2 comments
Open

using Revise "leaks" methods #605

jaakkor2 opened this issue Feb 19, 2021 · 2 comments
Labels
pending outside PR depends on changes in another package

Comments

@jaakkor2
Copy link

julia> sort(Dict(2=>22,1=>11))
ERROR: MethodError: no method matching sort(::Dict{Int64, Int64})
Closest candidates are:
  sort(::AbstractUnitRange) at range.jl:1060
  sort(::AbstractRange) at range.jl:1063
  sort(::SparseArrays.SparseVector{Tv, Ti}; kws...) where {Tv, Ti} at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\SparseArrays\src\sparsevector.jl:1942
  ...
Stacktrace:
 [1] top-level scope
   @ REPL[1]:1

julia> using Revise

julia> sort(Dict(2=>22,1=>11))
OrderedCollections.OrderedDict{Int64, Int64} with 2 entries:
  1 => 11
  2 => 22

using Revise added a method for sorting a Dict. This confuses a casual user since testing a package with Pkg.test usually does not include Revise.jl to the environment, and it takes some time to figure out that it was using Revise in the REPL that made the code work.

@pfitzseb
Copy link
Collaborator

JuliaCollections/OrderedCollections.jl#25

@timholy
Copy link
Owner

timholy commented Feb 19, 2021

Verdict is that this won't be fixed any time soon.

@timholy timholy added the pending outside PR depends on changes in another package label Feb 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending outside PR depends on changes in another package
Projects
None yet
Development

No branches or pull requests

3 participants