Error when running mod download: unknown revision v3.0.82
Hi, After cloning the repo (Fedora 34 , go version go1.16.5 linux/amd64, don't know if that matters) and running the mod download comment I get this
$ go mod download go: github.com/hashicorp/[email protected] requires github.com/tencentcloud/[email protected]+incompatible: reading github.com/tencentcloud/tencentcloud-sdk-go/go.mod at revision v3.0.82: unknown revision v3.0.82
Any idea?
Cheers, Carlos
It's weird to get this error as the CI that runs the test also has to download everything (automatically done by go test ./...).
I would suggest to run the go test ./... just to see the same error.
And potentially from the docs I did see
The -x flag causes download to print the commands download executes to standard error.
So potentially with that we may get more info.
If not I'll try to create a Docker image for Fedora and try to reproduce it.
Hi,
Test produced the same error
$ go test ./... go: github.com/hashicorp/[email protected] requires github.com/tencentcloud/[email protected]+incompatible: reading github.com/tencentcloud/tencentcloud-sdk-go/go.mod at revision v3.0.82: unknown revision v3.0.82
-x output
$ go mod download -x mkdir -p /home/casep/go/pkg/mod/cache/vcs # git3 https://github.com/tencentcloud/tencentcloud-sdk-go /# lock /home/casep/go/pkg/mod/cache/vcs/48d0913117235a203a131cd99c79e6a402648f1c5ef7f7cdf0b1fb88954acd33.lock/# /home/casep/go/pkg/mod/cache/vcs/48d0913117235a203a131cd99c79e6a402648f1c5ef7f7cdf0b1fb88954acd33 for git3 https://github.com/tencentcloud/tencentcloud-sdk-go cd /home/casep/go/pkg/mod/cache/vcs/48d0913117235a203a131cd99c79e6a402648f1c5ef7f7cdf0b1fb88954acd33; git tag -l 0.003s # cd /home/casep/go/pkg/mod/cache/vcs/48d0913117235a203a131cd99c79e6a402648f1c5ef7f7cdf0b1fb88954acd33; git tag -l cd /home/casep/go/pkg/mod/cache/vcs/48d0913117235a203a131cd99c79e6a402648f1c5ef7f7cdf0b1fb88954acd33; git ls-remote -q origin 0.441s # cd /home/casep/go/pkg/mod/cache/vcs/48d0913117235a203a131cd99c79e6a402648f1c5ef7f7cdf0b1fb88954acd33; git ls-remote -q origin go: github.com/hashicorp/[email protected] requires github.com/tencentcloud/[email protected]+incompatible: reading github.com/tencentcloud/tencentcloud-sdk-go/go.mod at revision v3.0.82: unknown revision v3.0.82
Cheers, Carlos
Builds okay on a RockyLinux box
$ ./inframap version The current version is: v0.6.6-4-gda38573
So it could be Fedora related.
Ok I was able to reproduce the error with:
docker run --name fedora_bash --rm -i -t fedora:34 bash
And then installing latest version of GO and running https://github.com/cycloidio/inframap#development
Also tried
docker run --name debian_bash --rm -i -t debian:buster bash
And then installed latest version of Go and installed inframap but this time it worked.
So we can say that is related to Fedora.
Next I've checked the lib that is failing, IDK what it is and I don't speak the language so even worse haha.
But I did found this https://github.com/TencentCloud/tencentcloud-sdk-go/blob/master/doc.go
// Package doc
// go get -u github.com/tencentcloud/tencentcloud-sdk-go
// package github.com/tencentcloud/tencentcloud-sdk-go: no Go files in /Users/xxx/go/src/github.com/tencentcloud/tencentcloud-sdk-go
// FIXME: this is a workaround for above go get issue, a fake file does nothing but claims we are a go project.
// Eventually we need something useful here, such as real documentation, version and etc.
// To get the package of all products at once, the package of each product is added in the imports code as side-effects.
IDK if it could fix anything.
Also found https://github.com/hashicorp/terraform/issues/29021 which is 100% the same issue, and also https://github.com/TencentCloud/tencentcloud-sdk-go/issues/125 which is the one the guy opened too.
From this I get that it's an issue from the lib that broke compatibility with that.
One of the solutions purposed is to use replace to have a fixed version, I'll try that and see if it works fine with Fedora :smile: