You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Yuxuan Wang (Jira)" <ji...@apache.org> on 2021/10/16 22:35:00 UTC

[jira] [Created] (THRIFT-5472) Fix the "latest" version of go library recognized by the go toolchain

Yuxuan Wang created THRIFT-5472:
-----------------------------------

             Summary: Fix the "latest" version of go library recognized by the go toolchain
                 Key: THRIFT-5472
                 URL: https://issues.apache.org/jira/browse/THRIFT-5472
             Project: Thrift
          Issue Type: Bug
            Reporter: Yuxuan Wang
            Assignee: Yuxuan Wang


Because of a previously failed attempt of THRIFT-5338, there's a git commit ([e27e82c|https://github.com/apache/thrift/commit/e27e82c46ba4d46c2c3267701191cdc26614f739]) on the master branch with lib/go/thrift/go.mod file. Although that file was removed in a later commit ([d9fcdd3|https://github.com/apache/thrift/commit/d9fcdd3dbafbe1a8296018d0d6c55d972f607a42]), the existence of e27e82c confused the go toolchain in the following ways:
 # `go get github.com/apache/thrift/lib/go/thrift@latest` will always import e27e82c (`go get github.com/apache/thrift@latest` will import the correct latest version)
 # pkg.go.dev will also prompt people that e27e82c is the "latest" version, over v0.15.0

With the [[help of go team|https://github.com/golang/go/issues/49015#issuecomment-944993211][,|https://github.com/golang/go/issues/49015#issuecomment-944993211],] the solution to fix it is to:
 # Create a commit, not necessarily need to be on master branch, with lib/go/thrift/go.mod file with the line of `retract [v0.0.0-00000000000000-000000000000, v0.0.1-do-not-use]` with an explanation of retract reason.
 # Tag that commit with `lib/go/thrift/v0.0.1-do-not-use` and push the tag to github.
 # On github releases page, mark that tag as a pre-release.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)