Error in gc in Pkg


#1

After updating some packages I tried a gc to obtain the error:

(v1.0) pkg> gc
    Active manifests at:
        `/Users/amrods/.julia/environments/v0.7/Manifest.toml`
        `/Users/amrods/.julia/environments/v1.0/Manifest.toml`
ERROR: SystemError: unable to read directory /Users/amrods/.julia/packages/.DS_Store: Not a directory
Stacktrace:
 [1] readdir(::String) at ./file.jl:620
 [2] macro expansion at ./logging.jl:321 [inlined]
 [3] #gc#43(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:326
 [4] gc at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:290 [inlined]
 [5] do_gc!(::Dict{Symbol,Any}, ::Array{String,1}, ::Dict{Symbol,Any}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:668
 [6] #invokelatest#1(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:697
 [7] invokelatest(::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:696
 [8] do_cmd!(::Pkg.REPLMode.PkgCommand, ::REPL.LineEditREPL) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:603
 [9] #do_cmd#33(::Bool, ::Function, ::REPL.LineEditREPL, ::String) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:577
 [10] do_cmd at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:573 [inlined]
 [11] (::getfield(Pkg.REPLMode, Symbol("##44#47")){REPL.LineEditREPL,REPL.LineEdit.Prompt})(::REPL.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:912
 [12] #invokelatest#1 at ./essentials.jl:697 [inlined]
 [13] invokelatest at ./essentials.jl:696 [inlined]
 [14] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/REPL/src/LineEdit.jl:2261
 [15] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:1029
 [16] run_repl(::REPL.AbstractREPL, ::Any) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:191
 [17] (::getfield(Base, Symbol("##719#721")){Bool,Bool,Bool,Bool})(::Module) at ./logging.jl:311
 [18] #invokelatest#1 at ./essentials.jl:697 [inlined]
 [19] invokelatest at ./essentials.jl:696 [inlined]
 [20] macro expansion at ./logging.jl:308 [inlined]
 [21] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:330
 [22] exec_options(::Base.JLOptions) at ./client.jl:242
 [23] _start() at ./client.jl:421

This keeps happening since then.


#2

See https://github.com/JuliaLang/Pkg.jl/issues/601, https://github.com/JuliaLang/Pkg.jl/pull/634 and https://github.com/JuliaLang/Pkg.jl/issues/790

The fix will be included in Julia v1.0.2, but you can fix the problem by just deleting the .DS_Store file.