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

Error using bingo with github.com/xo/xo #93

Closed
panta opened this issue Jul 1, 2021 · 1 comment
Closed

Error using bingo with github.com/xo/xo #93

panta opened this issue Jul 1, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@panta
Copy link

panta commented Jul 1, 2021

bingo version output: v0.4.3

go version output: go version go1.16.4 darwin/amd64

What happened:

From my project directory:

$ bingo get github.com/xo/xo@9a3ddc1
Bingo not used before here, creating directory for pinned modules for you at .bingo
Error: get command failed: get: xo.mod: getting github.com/xo/xo@9a3ddc1: fallback to local go mod cache resolution failed after go get failure: go: downloading github.com/xo/xo v0.0.0-20210416025017-9a3ddc1e1407
go get: github.com/xo/xo@none updating to
        github.com/xo/xo@v0.0.0-20210416025017-9a3ddc1e1407 requires
        github.com/xo/xoutil@v0.0.0-20171112033149-46189f4026a5: invalid version: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /Users/panta/.go/pkg/mod/cache/vcs/076de485f6bfc7a8e444ab6a676f8b3bebc02186cfe92720dd78cec82eafcc82: exit status 128:
        ERROR: Repository not found.
        fatal: Could not read from remote repository.
        
        Please make sure you have the correct access rights
        and the repository exists.
: exit 1: no module was cached matching given package github.com/xo/xo

What you expected to happen:

I expected bingo to install github.com/xo/xo@9a3ddc1

How to reproduce it (as minimally and precisely as possible):

Run the command bingo get github.com/xo/xo@9a3ddc1.

Logs (use bingo get -v <thing you do> for verbose output):

$ bingo get -v github.com/xo/xo@9a3ddc1
getting target github.com/xo/xo@9a3ddc1 (module  )
exec 'go mod init -modfile=/Users/panta/prj/gameclub-tsportal-ng/.bingo/xo-e.tmp.mod _'
resolveInGoModCache: Found /Users/panta/.go/pkg/mod/cache/download/github.com/xo/xo/@v directory
panic: runtime error: slice bounds out of range [:12] with length 7

goroutine 20 [running]:
main.resolveInGoModCache(0xc0000b6370, 0x1, 0x0, 0x0, 0xc0000f3160, 0x1, 0x0)
        /Users/panta/.go/pkg/mod/github.com/bwplotka/bingo@v0.4.3/get.go:513 +0x12a5
main.resolvePackage(0xc0000b6370, 0xc0000b6501, 0xc0000e86c0, 0x39, 0x122bdf0, 0xc0000b6500, 0x0, 0x0, 0xc0000f3160, 0x0, ...)
        /Users/panta/.go/pkg/mod/github.com/bwplotka/bingo@v0.4.3/get.go:405 +0x18d
main.getPackage(0x122b588, 0xc0000b27e0, 0xc0000b6370, 0xc00009a900, 0xc0000ac180, 0x2c, 0x11ea289, 0x6, 0x0, 0x0, ...)
        /Users/panta/.go/pkg/mod/github.com/bwplotka/bingo@v0.4.3/get.go:556 +0x5a8
main.get(0x122b518, 0xc0000b27e0, 0xc0000b6370, 0xc00009a900, 0xc0000ac180, 0x2c, 0x11ea289, 0x6, 0x0, 0x0, ...)
        /Users/panta/.go/pkg/mod/github.com/bwplotka/bingo@v0.4.3/get.go:297 +0x1838
main.main.func2(0x122b518, 0xc0000b4780, 0xc00009a900, 0x0, 0x0)
        /Users/panta/.go/pkg/mod/github.com/bwplotka/bingo@v0.4.3/main.go:156 +0x2d5
main.main.func5(0x0, 0x0)
        /Users/panta/.go/pkg/mod/github.com/bwplotka/bingo@v0.4.3/main.go:225 +0xc4
github.com/oklog/run.(*Group).Run.func1(0xc0000b2600, 0xc0000b47c0, 0xc000098870)
        /Users/panta/.go/pkg/mod/github.com/oklog/run@v1.1.0/group.go:38 +0x27
created by github.com/oklog/run.(*Group).Run
        /Users/panta/.go/pkg/mod/github.com/oklog/run@v1.1.0/group.go:37 +0xbb

Anything else we need to know:

@bwplotka bwplotka added the bug Something isn't working label Jul 19, 2021
@bwplotka
Copy link
Owner

Thanks for reporting!

looks like this version was... not buildable?

         unexpected error: error while running command "/tmp/bingo-tmpgoenv897996011/bingo get github.com/xo/xo@9a3ddc1"; out: Bingo not used before here, creating directory for pinned modules for you at .bingo
        Error: get command failed: get: xo.mod: getting github.com/xo/xo@9a3ddc1: install: build versioned: # github.com/xo/xoutil
        ../../gopath/pkg/mod/github.com/xo/xoutil@v0.0.0-20171112033149-46189f4026a5/xoutil.go:48:20: undefined: sqlite3.SQLiteTimestampFormats
        : exit 1
        ; err: exit status 1

Anyway, I checked newest commit and it builds fine:

079c3752126ac030ab42be8c32fa95c8872767f8

Can you check that one?

Closing for now, we can reopen if there are still problems. I think what happened is that such version was not available remotely so something in cache was used etc. Then there was malformed mod file which created panic. I fixed this in #96. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants