# Pkg REPL mode bug in 1.6.0-rc2

**URL:** https://discourse.julialang.org/t/pkg-repl-mode-bug-in-1-6-0-rc2/57261
**Category:** General Usage
**Tags:** bug, repl, pkg
**Created:** [March 16, 2021, 4:40am UTC](https://discourse.julialang.org/t/pkg-repl-mode-bug-in-1-6-0-rc2/57261 "2021-03-16T04:40:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![braydenware](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/braydenware/32/2612_2.png) [@braydenware](https://discourse.julialang.org/u/braydenware)
#### Post date: [March 16, 2021, 4:40am UTC](https://discourse.julialang.org/t/pkg-repl-mode-bug-in-1-6-0-rc2/57261/1 "2021-03-16T04:40:56Z")

</div>

There seems to be a bug in parsing the strings in Pkg. It only happens in a weird subset of cases: specifically, only on 1.6.0, only when using ssh rather than http to clone, and only when trying to add a specific package revision.  
Some examples of passing and failing cases. The following code fails:

```julia
julia> using Pkg                                                                                                                                                                                        
julia> pkg"add git@bitbucket.org:fakeuser/fake.git#master"                               
ERROR: ArgumentError: invalid base 10 digit 'b' in "bitbucket"                                       
Stacktrace:                                                                                          
  [1] tryparse_internal(#unused#::Type{Int64}, s::SubString{String}, startpos::Int64, endpos::Int64, base_::Int64, raise::Bool)

```

while the exactly equivalent command not using Pkg REPL mode succeeds. Also, variants of this command that specify packages via http urls succeed, or those that don’t request specific revisions from a bitbucket address succeed.

```julia
julia> using Pkg
# not using Pkg strings succeeds
julia> Pkg.add(url="git@bitbucket.org:fakeuser/fake.git", rev="master") 
     Cloning git-repo `git@bitbucket.org:fakeuser/fake.git`
# not requesting a specific revison succeeds
julia> pkg"add git@bitbucket.org:fakeuser/fake.git"
     Cloning git-repo `git@bitbucket.org:fakeuser/fake.git`
# requesting a specific revision from a github account succeeds.
julia> pkg"add https://github.com/haberdashPI/Alert.jl#master"
    Updating git-repo `https://github.com/haberdashPI/Alert.jl`

```

Of course, fakeuser/fake.git isn’t a real publicly available bitbucket address – using a real address isn’t necessary to see the parsing bug but would be to install a real package. (SSH access into a github address also causes the same error, where it thinks the first g in github is not a valid base 10 digit.)

I thought I would report here and see if the behavior is seen by others before submitting a bug report.

---

<div class="post-metadata">

### Author: ![lungben](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lungben/32/12314_2.png) [@lungben](https://discourse.julialang.org/u/lungben)
#### Post date: [March 16, 2021, 6:52am UTC](https://discourse.julialang.org/t/pkg-repl-mode-bug-in-1-6-0-rc2/57261/2 "2021-03-16T06:52:35Z")

</div>

May it be related to [Julia v1.5.4 and v1.6.0-rc2 have been released - #12 by stillyslalom](https://discourse.julialang.org/t/julia-v1-5-4-and-v1-6-0-rc2-have-been-released/57040/12) ?

---

<div class="post-metadata">

### Author: ![braydenware](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/braydenware/32/2612_2.png) [@braydenware](https://discourse.julialang.org/u/braydenware)
#### Post date: [March 25, 2021, 1:45am UTC](https://discourse.julialang.org/t/pkg-repl-mode-bug-in-1-6-0-rc2/57261/3 "2021-03-25T01:45:15Z")

</div>

Hi lungben,

I don’t think so. Every call to “Pkg.add” continues to work as expected, and as far as I can tell other calls to Pkg functions work perfectly, so I don’t see any bugs like that. This is clearly only a parsing error that comes shows up in the “pkg\>” repl mode and equivalently when parsing strings that are prefixed like pkg"add … ".
