File tree Expand file tree Collapse file tree 3 files changed +51
-2
lines changed Expand file tree Collapse file tree 3 files changed +51
-2
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,25 @@ def go_rules_dependencies(force = False):
8282 patch_args = ["-p1" ],
8383 )
8484
85+ # Needed for go/tools/fetch_repo
86+ # releaser:upgrade-dep golang tools
87+ wrapper (
88+ http_archive ,
89+ name = "org_golang_x_tools_go_vcs" ,
90+ # v0.12.0, latest as of 2023-08-12
91+ urls = [
92+ "https://mirror.bazel.build/github.com/golang/tools/archive/refs/tags/go/vcs/v0.1.0-deprecated.zip" ,
93+ "https://github.com/golang/tools/archive/refs/tags/go/vcs/v0.1.0-deprecated.zip" ,
94+ ],
95+ sha256 = "1b389268d126467105305ae4482df0189cc80a13aaab28d0946192b4ad0737a8" ,
96+ strip_prefix = "tools-go-vcs-v0.1.0-deprecated/go/vcs" ,
97+ patches = [
98+ # releaser:patch-cmd gazelle -repo_root . -go_prefix golang.org/x/tools/go/vcs -go_naming_convention import_alias
99+ Label ("//third_party:org_golang_x_tools_go_vcs-gazelle.patch" ),
100+ ],
101+ patch_args = ["-p1" ],
102+ )
103+
85104 # releaser:upgrade-dep golang sys
86105 wrapper (
87106 http_archive ,
Original file line number Diff line number Diff line change @@ -11,13 +11,13 @@ go_library(
1111 srcs = ["main.go" ],
1212 importpath = "github.com/bazelbuild/rules_go/go/tools/fetch_repo" ,
1313 visibility = ["//visibility:private" ],
14- deps = ["@org_golang_x_tools//go/vcs :go_default_library" ],
14+ deps = ["@org_golang_x_tools_go_vcs// :go_default_library" ],
1515)
1616
1717go_test (
1818 name = "go_default_test" ,
1919 size = "small" ,
2020 srcs = ["fetch_repo_test.go" ],
2121 embed = [":go_default_library" ],
22- deps = ["@org_golang_x_tools//go/vcs :go_default_library" ],
22+ deps = ["@org_golang_x_tools_go_vcs// :go_default_library" ],
2323)
Original file line number Diff line number Diff line change 1+ diff -urN a/BUILD.bazel b/BUILD.bazel
2+ --- a/BUILD.bazel 1970-01-01 01:00:00.000000000 +0100
3+ +++ b/BUILD.bazel 2023-08-12 19:21:03.606016940 +0200
4+ @@ -0,0 +1,26 @@
5+ + load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
6+ +
7+ + go_library(
8+ + name = "vcs",
9+ + srcs = [
10+ + "discovery.go",
11+ + "env.go",
12+ + "http.go",
13+ + "vcs.go",
14+ + ],
15+ + importpath = "golang.org/x/tools/go/vcs",
16+ + visibility = ["//visibility:public"],
17+ + deps = ["@org_golang_x_sys//execabs:go_default_library"],
18+ + )
19+ +
20+ + alias(
21+ + name = "go_default_library",
22+ + actual = ":vcs",
23+ + visibility = ["//visibility:public"],
24+ + )
25+ +
26+ + go_test(
27+ + name = "vcs_test",
28+ + srcs = ["vcs_test.go"],
29+ + embed = [":vcs"],
30+ + )
You can’t perform that action at this time.
0 commit comments