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

no module was cached matching given package zombiezen.com/go/capnproto2/capnpc-go #100

Closed
martin-sucha opened this issue Oct 29, 2021 · 4 comments · Fixed by #107
Closed

Comments

@martin-sucha
Copy link
Contributor

martin-sucha commented Oct 29, 2021

bingo version output:

v0.5.1

go version output:

go version go1.17 linux/amd64

What happened:

$ bingo get zombiezen.com/go/capnproto2/capnpc-go@v2.18.2
Error: get command failed: get: capnpc-go.mod: getting zombiezen.com/go/capnproto2/capnpc-go@v2.18.2: fallback to local go mod cache resolution failed after go get failure: go get: added golang.org/x/net v0.0.0-20211020060615-d418f374d309
go get: added zombiezen.com/go/capnproto2 v2.18.2+incompatible: no module was cached matching given package zombiezen.com/go/capnproto2/capnpc-go

What you expected to happen:

Install capnpc-go command.

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

bingo get zombiezen.com/go/capnproto2/capnpc-go@v2.18.2

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

Logs
getting target zombiezen.com/go/capnproto2/capnpc-go@v2.18.2 (module  )
exec 'go mod init -modfile=/home/martin/Projects/conveyance-store/.bingo/capnpc-go-e.tmp.mod _'
exec 'go get -modfile=/home/martin/Projects/conveyance-store/.bingo/capnpc-go-e.tmp.mod -d zombiezen.com/go/capnproto2/capnpc-go@v2.18.2'
resolveInGoModCache: /home/martin/go/pkg/mod/cache/download/zombiezen.com/go/capnproto2/capnpc-go/@v directory does not exists
resolveInGoModCache: Found /home/martin/go/pkg/mod/cache/download/zombiezen.com/go/capnproto2/@v directory
resolveInGoModCache: /home/martin/go/pkg/mod/cache/download/zombiezen.com/go/capnproto2/@v/v2.18.2.info file not exists. Looking for different module
Error: no module was cached matching given package zombiezen.com/go/capnproto2/capnpc-go
main.resolveInGoModCache
        /home/martin/go/pkg/mod/github.com/bwplotka/bingo@v0.5.1/get.go:520
main.resolvePackage
        /home/martin/go/pkg/mod/github.com/bwplotka/bingo@v0.5.1/get.go:405
main.getPackage
        /home/martin/go/pkg/mod/github.com/bwplotka/bingo@v0.5.1/get.go:559
main.get
        /home/martin/go/pkg/mod/github.com/bwplotka/bingo@v0.5.1/get.go:297
main.main.func2
        /home/martin/go/pkg/mod/github.com/bwplotka/bingo@v0.5.1/main.go:158
main.main.func5
        /home/martin/go/pkg/mod/github.com/bwplotka/bingo@v0.5.1/main.go:227
github.com/oklog/run.(*Group).Run.func1
        /home/martin/go/pkg/mod/github.com/oklog/run@v1.1.0/group.go:38
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:1581
fallback to local go mod cache resolution failed after go get failure: go get: added golang.org/x/net v0.0.0-20211020060615-d418f374d309
go get: added zombiezen.com/go/capnproto2 v2.18.2+incompatible
main.resolvePackage
        /home/martin/go/pkg/mod/github.com/bwplotka/bingo@v0.5.1/get.go:406
main.getPackage
        /home/martin/go/pkg/mod/github.com/bwplotka/bingo@v0.5.1/get.go:559
main.get
        /home/martin/go/pkg/mod/github.com/bwplotka/bingo@v0.5.1/get.go:297
main.main.func2
        /home/martin/go/pkg/mod/github.com/bwplotka/bingo@v0.5.1/main.go:158
main.main.func5
        /home/martin/go/pkg/mod/github.com/bwplotka/bingo@v0.5.1/main.go:227
github.com/oklog/run.(*Group).Run.func1
        /home/martin/go/pkg/mod/github.com/oklog/run@v1.1.0/group.go:38
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:1581
capnpc-go.mod: getting zombiezen.com/go/capnproto2/capnpc-go@v2.18.2
main.get
        /home/martin/go/pkg/mod/github.com/bwplotka/bingo@v0.5.1/get.go:298
main.main.func2
        /home/martin/go/pkg/mod/github.com/bwplotka/bingo@v0.5.1/main.go:158
main.main.func5
        /home/martin/go/pkg/mod/github.com/bwplotka/bingo@v0.5.1/main.go:227
github.com/oklog/run.(*Group).Run.func1
        /home/martin/go/pkg/mod/github.com/oklog/run@v1.1.0/group.go:38
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:1581
get
main.main.func2
        /home/martin/go/pkg/mod/github.com/bwplotka/bingo@v0.5.1/main.go:159
main.main.func5
        /home/martin/go/pkg/mod/github.com/bwplotka/bingo@v0.5.1/main.go:227
github.com/oklog/run.(*Group).Run.func1
        /home/martin/go/pkg/mod/github.com/oklog/run@v1.1.0/group.go:38
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:1581
get command failed
main.main
        /home/martin/go/pkg/mod/github.com/bwplotka/bingo@v0.5.1/main.go:235
runtime.main
        /usr/local/go/src/runtime/proc.go:255
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:1581

Anything else we need to know:

resolveInGoModCache fails to resolve zombiezen.com/go/capnproto2/capnpc-go because it is looking in $GOPATH/pkg/mod/cache/download/zombiezen.com/go/capnproto2/@v/ for file v2.18.2.info, but there is only v2.18.2+incompatible.info file.

Running bingo get zombiezen.com/go/capnproto2/capnpc-go@v2.18.2+incompatible successfully installs the tool as $GOBIN/capnpc-go-v2.18.2+incompatible.

Perhaps bingo should handle the +incompatible suffix when looking up info files?

This issue might be related to #99 I wasn't 100% sure whether it is the same issue or not.

@bwplotka
Copy link
Owner

Thanks for pointing. Indeed there is bug with +incompatible. Fixing now (:

bwplotka added a commit that referenced this issue Dec 21, 2021
Fixes #100

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
@bwplotka
Copy link
Owner

Done 🤗 xmas fixes #107

bwplotka added a commit that referenced this issue Dec 21, 2021
Fixes #100

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
bwplotka added a commit that referenced this issue Dec 21, 2021
Fixes #100

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
@dio
Copy link

dio commented Dec 30, 2021

@martin-sucha, sorry, does the latest patch, work for you? I believe I missed a very obvious step. This is what I do in my repro repo: https://github.com/dio/bingo-test/blob/953c78ecfbfe7ecc77d2795bd4c3f63bc4e5f0dd/.github/workflows/test.yaml#L14-L16.

The complete logs (just in case the log from this job is expired https://pipelines.actions.githubusercontent.com/eFoaTFl87N8LgkMgEWLJ52O5vGzfqmel4JyKWxbvvYqVS1ivln/_apis/pipelines/1/runs/5/signedlogcontent/2?urlExpires=2021-12-30T02%3A25%3A18.3866979Z&urlSigningMethod=HMACV1&urlSignature=iR6Mo00Bh%2FQJ2qTamsYSEacFm0PjjMH27ZYQP2sumjM%3D):

2021-12-30T02:18:33.8493613Z ##[group]Run go install github.com/bwplotka/bingo@latest
2021-12-30T02:18:33.8494421Z �[36;1mgo install github.com/bwplotka/bingo@latest�[0m
2021-12-30T02:18:33.8495227Z �[36;1mPATH=$PATH:~/go/bin bingo get -v zombiezen.com/go/capnproto2/capnpc-go@v2.18.2�[0m
2021-12-30T02:18:33.8496195Z �[36;1mPATH=$PATH:~/go/bin bingo get -v github.com/golangci/golangci-lint/cmd/golangci-lint@v1.35.2�[0m
2021-12-30T02:18:33.8546942Z shell: /usr/bin/bash -e {0}
2021-12-30T02:18:33.8547366Z env:
2021-12-30T02:18:33.8547854Z   GOROOT: /opt/hostedtoolcache/go/1.17.2/x64
2021-12-30T02:18:33.8548344Z ##[endgroup]
2021-12-30T02:18:34.1120901Z go: downloading github.com/bwplotka/bingo v0.5.2
2021-12-30T02:18:34.9634079Z go: downloading github.com/efficientgo/tools/core v0.0.0-20210201220623-8118984754c2
2021-12-30T02:18:34.9635262Z go: downloading github.com/oklog/run v1.1.0
2021-12-30T02:18:34.9733132Z go: downloading github.com/pkg/errors v0.9.1
2021-12-30T02:18:34.9769702Z go: downloading golang.org/x/mod v0.4.2
2021-12-30T02:18:35.0040983Z go: downloading github.com/Masterminds/semver v1.5.0
2021-12-30T02:18:35.0196765Z go: downloading mvdan.cc/sh/v3 v3.2.4
2021-12-30T02:18:35.0516250Z go: downloading golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898
2021-12-30T02:18:35.0537016Z go: downloading golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9
2021-12-30T02:18:35.0619947Z go: downloading golang.org/x/sys v0.0.0-20201029080932-201ba4db2418
2021-12-30T02:18:35.0653981Z go: downloading golang.org/x/term v0.0.0-20191110171634-ad39bd3f0407
2021-12-30T02:18:37.9124041Z Bingo not used before here, creating directory for pinned modules for you at .bingo
2021-12-30T02:18:37.9125817Z getting target zombiezen.com/go/capnproto2/capnpc-go@v2.18.2 (module  )
2021-12-30T02:18:37.9167544Z exec 'go mod init -modfile=/home/runner/work/bingo-test/bingo-test/.bingo/capnpc-go-e.tmp.mod _'
2021-12-30T02:18:41.0148748Z exec 'go get -modfile=/home/runner/work/bingo-test/bingo-test/.bingo/capnpc-go-e.tmp.mod -d zombiezen.com/go/capnproto2/capnpc-go@v2.18.2'
2021-12-30T02:18:41.0154729Z resolveInGoModCache: cache/download/zombiezen.com/go/capnproto2/capnpc-go/@v directory does not exists
2021-12-30T02:18:41.0159036Z resolveInGoModCache: cache/download/zombiezen.com/go/capnproto2/@v directory does not exists
2021-12-30T02:18:41.0160639Z Error: no module was cached matching given package zombiezen.com/go/capnproto2/capnpc-go
2021-12-30T02:18:41.0161595Z main.resolveInGoModCache
2021-12-30T02:18:41.0162474Z 	/home/runner/go/pkg/mod/github.com/bwplotka/bingo@v0.5.2/get.go:564
2021-12-30T02:18:41.0163187Z main.resolvePackage
2021-12-30T02:18:41.0163964Z 	/home/runner/go/pkg/mod/github.com/bwplotka/bingo@v0.5.2/get.go:402
2021-12-30T02:18:41.0164621Z main.getPackage
2021-12-30T02:18:41.0165369Z 	/home/runner/go/pkg/mod/github.com/bwplotka/bingo@v0.5.2/get.go:605
2021-12-30T02:18:41.0165958Z main.get
2021-12-30T02:18:41.0166641Z 	/home/runner/go/pkg/mod/github.com/bwplotka/bingo@v0.5.2/get.go:297
2021-12-30T02:18:41.0167276Z main.main.func2
2021-12-30T02:18:41.0168029Z 	/home/runner/go/pkg/mod/github.com/bwplotka/bingo@v0.5.2/main.go:158
2021-12-30T02:18:41.0168679Z main.main.func5
2021-12-30T02:18:41.0169396Z 	/home/runner/go/pkg/mod/github.com/bwplotka/bingo@v0.5.2/main.go:227
2021-12-30T02:18:41.0170127Z github.com/oklog/run.(*Group).Run.func1
2021-12-30T02:18:41.0170905Z 	/home/runner/go/pkg/mod/github.com/oklog/run@v1.1.0/group.go:38
2021-12-30T02:18:41.0171549Z runtime.goexit
2021-12-30T02:18:41.0172340Z 	/opt/hostedtoolcache/go/1.17.2/x64/src/runtime/asm_amd64.s:1581
2021-12-30T02:18:41.0173442Z fallback to local go mod cache resolution failed after go get failure: go: downloading zombiezen.com/go/capnproto2 v2.18.2+incompatible
2021-12-30T02:18:41.0174720Z go: downloading golang.org/x/net v0.0.0-20211216030914-fe4d6282115f
2021-12-30T02:18:41.0175618Z go get: added golang.org/x/net v0.0.0-20211216030914-fe4d6282115f
2021-12-30T02:18:41.0176401Z go get: added zombiezen.com/go/capnproto2 v2.18.2+incompatible
2021-12-30T02:18:41.0177094Z main.resolvePackage
2021-12-30T02:18:41.0178194Z 	/home/runner/go/pkg/mod/github.com/bwplotka/bingo@v0.5.2/get.go:403
2021-12-30T02:18:41.0178858Z main.getPackage
2021-12-30T02:18:41.0179593Z 	/home/runner/go/pkg/mod/github.com/bwplotka/bingo@v0.5.2/get.go:605
2021-12-30T02:18:41.0180195Z main.get
2021-12-30T02:18:41.0180861Z 	/home/runner/go/pkg/mod/github.com/bwplotka/bingo@v0.5.2/get.go:297
2021-12-30T02:18:41.0181517Z main.main.func2
2021-12-30T02:18:41.0182255Z 	/home/runner/go/pkg/mod/github.com/bwplotka/bingo@v0.5.2/main.go:158
2021-12-30T02:18:41.0182894Z main.main.func5
2021-12-30T02:18:41.0183627Z 	/home/runner/go/pkg/mod/github.com/bwplotka/bingo@v0.5.2/main.go:227
2021-12-30T02:18:41.0184340Z github.com/oklog/run.(*Group).Run.func1
2021-12-30T02:18:41.0185116Z 	/home/runner/go/pkg/mod/github.com/oklog/run@v1.1.0/group.go:38
2021-12-30T02:18:41.0185755Z runtime.goexit
2021-12-30T02:18:41.0186434Z 	/opt/hostedtoolcache/go/1.17.2/x64/src/runtime/asm_amd64.s:1581
2021-12-30T02:18:41.0187580Z capnpc-go.mod: getting zombiezen.com/go/capnproto2/capnpc-go@v2.18.2
2021-12-30T02:18:41.0188876Z main.get
2021-12-30T02:18:41.0189593Z 	/home/runner/go/pkg/mod/github.com/bwplotka/bingo@v0.5.2/get.go:298
2021-12-30T02:18:41.0190233Z main.main.func2
2021-12-30T02:18:41.0191121Z 	/home/runner/go/pkg/mod/github.com/bwplotka/bingo@v0.5.2/main.go:158
2021-12-30T02:18:41.0191952Z main.main.func5
2021-12-30T02:18:41.0192669Z 	/home/runner/go/pkg/mod/github.com/bwplotka/bingo@v0.5.2/main.go:227
2021-12-30T02:18:41.0193403Z github.com/oklog/run.(*Group).Run.func1
2021-12-30T02:18:41.0194163Z 	/home/runner/go/pkg/mod/github.com/oklog/run@v1.1.0/group.go:38
2021-12-30T02:18:41.0194805Z runtime.goexit
2021-12-30T02:18:41.0198405Z 	/opt/hostedtoolcache/go/1.17.2/x64/src/runtime/asm_amd64.s:1581
2021-12-30T02:18:41.0198984Z get
2021-12-30T02:18:41.0199412Z main.main.func2
2021-12-30T02:18:41.0200134Z 	/home/runner/go/pkg/mod/github.com/bwplotka/bingo@v0.5.2/main.go:159
2021-12-30T02:18:41.0200787Z main.main.func5
2021-12-30T02:18:41.0201881Z 	/home/runner/go/pkg/mod/github.com/bwplotka/bingo@v0.5.2/main.go:227
2021-12-30T02:18:41.0202637Z github.com/oklog/run.(*Group).Run.func1
2021-12-30T02:18:41.0203408Z 	/home/runner/go/pkg/mod/github.com/oklog/run@v1.1.0/group.go:38
2021-12-30T02:18:41.0204034Z runtime.goexit
2021-12-30T02:18:41.0204727Z 	/opt/hostedtoolcache/go/1.17.2/x64/src/runtime/asm_amd64.s:1581
2021-12-30T02:18:41.0205344Z get command failed
2021-12-30T02:18:41.0205771Z main.main
2021-12-30T02:18:41.0206430Z 	/home/runner/go/pkg/mod/github.com/bwplotka/bingo@v0.5.2/main.go:235
2021-12-30T02:18:41.0207068Z runtime.main
2021-12-30T02:18:41.0207751Z 	/opt/hostedtoolcache/go/1.17.2/x64/src/runtime/proc.go:255
2021-12-30T02:18:41.0208371Z runtime.goexit
2021-12-30T02:18:41.0209058Z 	/opt/hostedtoolcache/go/1.17.2/x64/src/runtime/asm_amd64.s:1581
2021-12-30T02:18:41.0219098Z ##[error]Process completed with exit code 1.

Thank you!

@dio
Copy link

dio commented Dec 30, 2021

Ah, NVM I think I need to explicitly set the GOPATH or GOMODCACHE explicitly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants