litao3rd commented on pull request #2315: URL: https://github.com/apache/thrift/pull/2315#issuecomment-886070277
Hi, thanks. I did as follow commands. ```shell 1, remove the directory $HOME/go/pkg/mod as I did not set $GOROOT and $GOPATH explicitly. 2, run the command `go clean -cache` 3, go get github.com/apache/thrift 4, go mod init demo2 5, go build ``` On step3, I do get the right version v0.14.2 as I get the message ``` go: downloading github.com/apache/thrift v0.14.2 ``` and the directory ``` $HOME/go/pkg/mod/github.com/apache/[email protected] ``` But on step4, I get the prompt ``` go: creating new go.mod: module demo2 go: to add module requirements and sums: go mod tidy ``` If I do as it requires to run the command `go mod tidy`, I will get the follow messages. ``` go: finding module for package github.com/apache/thrift/lib/go/thrift go: found github.com/apache/thrift/lib/go/thrift in github.com/apache/thrift/lib/go/thrift v0.0.0-20210120171102-e27e82c46ba4 ``` Yep, I still get the wrong version of the library. If I do NOT run the command `go mod tidy`, but run `go build` directly. I will get the follow messages ``` gen-go/${pkg_name}/${filename}-consts.go:10:2: no required module provides package github.com/apache/thrift/lib/go/thrift; to add it: go get github.com/apache/thrift/lib/go/thrift ``` That meas I must run the command go get before `go build`. But when I run the `go get` command as it prompts. I get the follow messages ``` go: downloading github.com/apache/thrift/lib/go/thrift v0.0.0-20210120171102-e27e82c46ba4 go get: added github.com/apache/thrift/lib/go/thrift v0.0.0-20210120171102-e27e82c46ba4 ``` I still get the wrong version. I do not know does it any relation with my go executable version as I use the latest version of go 1.16.6 Thanks very much. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
