Skip to content

Commit 9fc3b2a

Browse files
authored
Merge pull request #18590 from henrybear327/ci/fix
Add tools/mod to module_dirs
2 parents ce07474 + fc901bd commit 9fc3b2a

File tree

4 files changed

+25
-3
lines changed

4 files changed

+25
-3
lines changed

scripts/test_lib.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ function run_for_module {
166166
}
167167

168168
function module_dirs() {
169-
echo "api pkg client/pkg client/internal/v2 client/v3 server etcdutl etcdctl tests tools/rw-heatmaps tools/testgrid-analysis ."
169+
echo "api pkg client/pkg client/internal/v2 client/v3 server etcdutl etcdctl tests tools/mod tools/rw-heatmaps tools/testgrid-analysis ."
170170
}
171171

172172
# maybe_run [cmd...] runs given command depending on the DRY_RUN flag.

tools/mod/doc.go

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright 2024 The etcd Authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// As this directory implements the pattern for tracking tool dependencies as documented here:
16+
// https://go.dev/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module, it doesn't
17+
// contain any valid go source code in the directory directly. This would break scripts for
18+
// unit testing, golangci-lint, and coverage calculation.
19+
//
20+
// Thus, to ensure tools to run normally, we've added this empty file.
21+
22+
package mod

tools/mod/libs.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
//go:build libs
1616

1717
// This file implements that pattern:
18-
// https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module
18+
// https://go.dev/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module
1919
// for etcd. Thanks to this file 'go mod tidy' does not removes dependencies.
2020

2121
package libs

tools/mod/tools.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
//go:build tools
1616

1717
// This file implements that pattern:
18-
// https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module
18+
// https://go.dev/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module
1919
// for etcd. Thanks to this file 'go mod tidy' does not removes dependencies.
2020

2121
package tools

0 commit comments

Comments
 (0)