Juno REPL behaves differently than terminal REPL

Julia 1.2, Atom 1.40.1, latest versions of Atom.jl and Juno.jl, macOS.

At a fresh Juno Julia REPL:

julia> d = Dict(1 => "a", 3 => "b", 0 => "c")
Dict{Int64,String} with 3 entries:
  0 => "c"
  3 => "b"
  1 => "a"

julia> sort(d)
OrderedCollections.OrderedDict{Int64,String} with 3 entries:
  0 => "c"
  1 => "a"
  3 => "b"

Who said to import OrderedCollections???

Terminal REPL, same version of everything:

julia> d = Dict(1 => "a", 3 => "b", 0 => "c")
Dict{Int64,String} with 3 entries:
  0 => "c"
  3 => "b"
  1 => "a"

julia> sort(d)
ERROR: MethodError: no method matching sort(::Dict{Int64,String})

We were able to reproduce this on Linux and Windows, so it appears like a Juno side effect. How do we make the Juno REPL behave like the terminal REPL?

1 Like

Atom: https://github.com/JunoLab/Atom.jl/blob/fa3ed718d21afa269ccfeb2cf72d2a88f65334fc/Project.toml#L24

Tell OrderedCollections to not commit type piracy: https://github.com/JuliaCollections/OrderedCollections.jl/blob/342792ccb4d14bf7c49b0812b0375981a1448b9f/src/dict_sorting.jl#L21

1 Like

Who said to import OrderedCollections ???

Atom: https://github.com/JunoLab/Atom.jl/blob/fa3ed718d21afa269ccfeb2cf72d2a88f65334fc/Project.toml#L24

Well, right, but when module A depends on module B, using A doesn’t automatically reexport B.

Tell OrderedCollections to not commit type piracy: https://github.com/JuliaCollections/OrderedCollections.jl/blob/342792ccb4d14bf7c49b0812b0375981a1448b9f/src/dict_sorting.jl#L21

Ok, that’s the culprit. Thank you. I opened an issue.