Skip to content

Commit f66af93

Browse files
committed
Migrate to go_repo
1 parent 82b3e52 commit f66af93

File tree

37 files changed

+227
-277
lines changed

37 files changed

+227
-277
lines changed

.plzconfig

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
[Please]
22
Version = >=17.11.0
33

4+
5+
46
[build]
57
hashcheckers = sha256
68

9+
[BuildConfig]
10+
puku-version = "1.15.1"
11+
712
[Plugin "go"]
13+
Target = //plugins:go
814
GoTool = //third_party/go:toolchain|go
915
Stdlib = //third_party/go:std
1016
PleaseGoTool = //tools/please_go:bootstrap
1117
ImportPath = github.com/please-build/go-rules
12-
ValidateModuleVersions = true
18+
ModFile = //:gomod
1319

1420
[Plugin "cc"]
1521
Target = //plugins:cc
@@ -183,3 +189,8 @@ Help = Build tags to pass to the Go compiler
183189

184190
[Plugin "shell"]
185191
Target = //plugins:shell
192+
193+
[alias "puku"]
194+
cmd = run --wd=. //third_party/binary:puku --
195+
desc = Formats BUILD files and update go rules
196+
positionallabels = true

BUILD

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,10 @@ filegroup(
33
name = "config",
44
srcs = [".plzconfig"],
55
visibility = ["PUBLIC"],
6-
)
6+
)
7+
8+
filegroup(
9+
name = "gomod",
10+
srcs = ["go.mod"],
11+
visibility = ["PUBLIC"],
12+
)

go.mod

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/please-build/go-rules
22

3-
go 1.20
3+
go 1.24
44

55
require github.com/stretchr/testify v1.7.1
66

@@ -16,14 +16,16 @@ require (
1616
github.com/pmezard/go-difflib v1.0.0 // indirect
1717
github.com/thought-machine/go-flags v1.6.2 // indirect
1818
golang.org/x/crypto v0.26.0 // indirect
19-
golang.org/x/mod v0.20.0 // indirect
20-
golang.org/x/sync v0.8.0 // indirect
21-
golang.org/x/sys v0.23.0 // indirect
19+
golang.org/x/mod v0.24.0 // indirect
20+
golang.org/x/sync v0.12.0 // indirect
21+
golang.org/x/sys v0.31.0 // indirect
2222
golang.org/x/term v0.23.0 // indirect
23-
golang.org/x/tools v0.24.0 // indirect
23+
golang.org/x/tools v0.31.0 // indirect
2424
google.golang.org/protobuf v1.25.0 // indirect
2525
gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473 // indirect
26-
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
26+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
2727
)
2828

2929
replace github.com/please-build/go-rules/tools => ./tools
30+
31+
replace github.com/bazelbuild/buildtools => github.com/please-build/buildtools v0.0.0-20221110131218-762712d8ce3f

go.sum

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LF
3939
github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4=
4040
github.com/peterebden/go-cli-init/v5 v5.2.0 h1:T4WfGF+XjYCdVR4Y9KcTRVGpY5f6UelP0WDNuvn3Twc=
4141
github.com/peterebden/go-cli-init/v5 v5.2.0/go.mod h1:CAwh3oj26LCNv9zLsWCDWlPnERwAeQTDsHTSGqobV3Q=
42+
github.com/please-build/buildtools v0.0.0-20221110131218-762712d8ce3f/go.mod h1:689QdV3hBP7Vo9dJMmzhoYIyo/9iMhEmHkJcnaPRCbo=
4243
github.com/please-build/go-rules/tools/please_go v0.0.0-20230117162622-4a2c3e910628 h1:Jj2W50Hk7g+sgi8ZTjnpw6N/RbvCournIyBQ+xT2ERw=
4344
github.com/please-build/go-rules/tools/please_go v0.0.0-20230117162622-4a2c3e910628/go.mod h1:GADkfzADG0tOAJbhVnUDlqqYJPIJS5IUkfJf+JsiV4c=
4445
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
@@ -65,6 +66,8 @@ golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
6566
golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
6667
golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
6768
golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
69+
golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU=
70+
golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
6871
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
6972
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
7073
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -75,6 +78,8 @@ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJ
7578
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
7679
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
7780
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
81+
golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw=
82+
golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
7883
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
7984
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
8085
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -86,6 +91,8 @@ golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
8691
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
8792
golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM=
8893
golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
94+
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
95+
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
8996
golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU=
9097
golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk=
9198
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -98,6 +105,8 @@ golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ=
98105
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
99106
golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24=
100107
golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ=
108+
golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU=
109+
golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ=
101110
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
102111
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
103112
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
@@ -124,5 +133,7 @@ gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473 h1:6D+BvnJ/j6e222UW
124133
gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473/go.mod h1:N1eN2tsCx0Ydtgjl4cqmbRCsY4/+z4cYDeqwZTk6zog=
125134
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
126135
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
136+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
137+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
127138
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
128139
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

plugins/BUILD

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ plugin_repo(
66

77
plugin_repo(
88
name = "cc",
9-
plugin = "cc-rules",
10-
revision="v0.3.2"
9+
revision = "v0.3.2",
1110
)
1211

1312
plugin_repo(
14-
name = "shell",
15-
revision = "v0.1.2",
13+
name = "shell",
14+
revision = "v0.1.2",
15+
)
16+
17+
plugin_repo(
18+
name = "go",
19+
revision = "master",
1620
)

test/asm/lib/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ go_test(
1414
labels = ["asm"],
1515
deps = [
1616
":asm",
17-
"//third_party/go:testify",
17+
"///third_party/go/github.com_stretchr_testify//assert",
1818
],
1919
)

test/asm/third_party/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go_test(
44
name = "asm_test",
55
srcs = ["asm_test.go"],
66
deps = [
7-
"//third_party/go:testify",
8-
"//third_party/go:xxhash",
7+
"///third_party/go/github.com_stretchr_testify//assert",
8+
"///third_party/go/github.com_cespare_xxhash_v2//:v2",
99
],
1010
)

test/benchmark/BUILD

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ go_test(
99
name = "benchmark_test",
1010
srcs = ["bench_test.go"],
1111
data = [":benchmark"],
12-
deps = ["//third_party/go:testify"],
12+
deps = [
13+
"///third_party/go/github.com_stretchr_testify//require",
14+
],
1315
)

test/buildinfo/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ go_test(
55
srcs = ["buildinfo_test.go"],
66
data = ["//tools/please_go"],
77
deps = [
8-
"//third_party/go:testify",
8+
"///third_party/go/github.com_stretchr_testify//assert",
99
],
1010
)

test/cgo/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ cgo_test(
1313
srcs = ["cgo_test.go"],
1414
deps = [
1515
":cgo",
16-
"//third_party/go:testify",
16+
"///third_party/go/github.com_stretchr_testify//assert",
1717
],
1818
)

0 commit comments

Comments
 (0)