Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkg/util/hack/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go_library(
srcs = [
"hack.go",
"map_abi.go",
"map_abi_go126.go",
],
importpath = "github.com/pingcap/tidb/pkg/util/hack",
visibility = ["//visibility:public"],
Expand All @@ -17,6 +18,8 @@ go_test(
"hack_test.go",
"main_test.go",
"map_abi_test.go",
"map_abi_test_type_go125_test.go",
"map_abi_test_type_go126_test.go",
],
embed = [":hack"],
flaky = True,
Expand Down
2 changes: 2 additions & 0 deletions pkg/util/hack/map_abi.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build go1.25 && !go1.26
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does the build process add go1.25 tag? I didn't find the doc related to it 😂

And seems we only need one version tag?

//go:build go1.25
//go:build go1.26

should be enough

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gemini says it's called ReleaseTags, golang will assign all tags <= current version, so we should use

//go:build go1.25 && !go1.26

However I didn't find the official document for it. Do you have more authorized materials for this feature?


package hack

import (
Expand Down
Loading