One thing I’ve noticed (not just with Pkg, but in general in a lot of Julia code), is the issue of always dumping out large backtraces when getting exceptions that come from invalid user input.
I feel that when something is dealing with user input, such as in the below example at the Pkg REPL (good work Oh REPL Jedi @kristoffer.carlsson! ), that all errors should be trapped (with a run-time debugging to display the backtrace if desired), and a short message understandable to a basic user (as opposed to somebody trying to track down a problem in the package manager code), such as a simple `Directory “/s/CharSetEncodings” not found".
Any hope of getting that sort of ease-of-use issue handled before v1.0?
(v0.7) pkg> add /s/CharSetEncodings#master
Cloning git-repo `/s/CharSetEncodings`
ERROR: GitError(Code:ERROR, Class:Net, unsupported URL protocol)
Stacktrace:
[1] uv_error at ./libuv.jl:80 [inlined]
[2] unlink(::String) at ./file.jl:705
[3] #rm#9(::Bool, ::Bool, ::Function, ::String) at ./file.jl:253
[4] #rm at ./<missing>:0 [inlined]
[5] #clone#2(::Nothing, ::Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol},NamedTuple{(:isbare, :credentials),Tuple{Bool,LibGit2.CachedCredentials}}}, ::Function, ::String, ::String) at /j/julia/usr/share/julia/stdlib/v0.7/Pkg/src/GitTools.jl:72
[6] #handle_repos_add!#16(::Bool, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at ./<missing>:0
[7] #handle_repos_add! at ./<missing>:0 [inlined]
[8] #add_or_develop#8(::Symbol, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /j/julia/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:32
[9] #add_or_develop at ./<missing>:0 [inlined]
[10] do_add_or_develop!(::Pkg.Types.Context, ::Array{Union{Pkg.Types.VersionRange, String, Pkg.REPLMode.Command, Pkg.REPLMode.Option, Pkg.REPLMode.Rev},1}, ::Pkg.REPLMode.CommandKind) at /j/julia/usr/share/julia/stdlib/v0.7/Pkg/src/REPLMode.jl:595
[11] #invokelatest#1 at ./essentials.jl:670 [inlined]
[12] invokelatest at ./essentials.jl:669 [inlined]
[13] do_cmd!(::Array{Union{Pkg.Types.VersionRange, String, Pkg.REPLMode.Command, Pkg.REPLMode.Option, Pkg.REPLMode.Rev},1}, ::REPL.LineEditREPL) at /j/julia/usr/share/julia/stdlib/v0.7/Pkg/src/REPLMode.jl:275
[14] #do_cmd#8(::Bool, ::Function, ::REPL.LineEditREPL, ::String) at /j/julia/usr/share/julia/stdlib/v0.7/Pkg/src/REPLMode.jl:235
[15] do_cmd at /j/julia/usr/share/julia/stdlib/v0.7/Pkg/src/REPLMode.jl:232 [inlined]
[16] (::getfield(Pkg.REPLMode, Symbol("##27#30")){REPL.LineEditREPL,REPL.LineEdit.Prompt})(::REPL.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at /j/julia/usr/share/julia/stdlib/v0.7/Pkg/src/REPLMode.jl:950
[17] top-level scope
(v0.7) pkg> add /s/CharSetEncodings.jl#master
Cloning git-repo `/s/CharSetEncodings.jl`
Updating git-repo `/s/CharSetEncodings.jl`
Updating registry at `~/.julia/registries/Uncurated`
Updating git-repo `https://github.com/JuliaRegistries/Uncurated.git`
Resolving package versions...
Updating `~/.julia/environments/v0.7/Project.toml`
[cb9422de] + CharSetEncodings v0.1.1 #master [/s/CharSetEncodings.jl]
Updating `~/.julia/environments/v0.7/Manifest.toml`
[cb9422de] + CharSetEncodings v0.1.1 #master [/s/CharSetEncodings.jl]