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):
82
82
patch_args = ["-p1" ],
83
83
)
84
84
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
+
85
104
# releaser:upgrade-dep golang sys
86
105
wrapper (
87
106
http_archive ,
Original file line number Diff line number Diff line change @@ -11,13 +11,13 @@ go_library(
11
11
srcs = ["main.go" ],
12
12
importpath = "github.com/bazelbuild/rules_go/go/tools/fetch_repo" ,
13
13
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" ],
15
15
)
16
16
17
17
go_test (
18
18
name = "go_default_test" ,
19
19
size = "small" ,
20
20
srcs = ["fetch_repo_test.go" ],
21
21
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" ],
23
23
)
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