diff --git a/scripts/cached_modfiles/github.com_andybalholm_brotli.mod b/scripts/cached_modfiles/github.com_andybalholm_brotli.mod new file mode 100644 index 0000000..59613dc --- /dev/null +++ b/scripts/cached_modfiles/github.com_andybalholm_brotli.mod @@ -0,0 +1,5 @@ +module test + +go 1.23.0 + +require github.com/andybalholm/brotli v1.1.0 // indirect diff --git a/scripts/cached_modfiles/github.com_andybalholm_brotli.sum b/scripts/cached_modfiles/github.com_andybalholm_brotli.sum new file mode 100644 index 0000000..8769ccf --- /dev/null +++ b/scripts/cached_modfiles/github.com_andybalholm_brotli.sum @@ -0,0 +1,2 @@ +github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= +github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= diff --git a/scripts/cached_modfiles/github.com_andybalholm_brotli_v1.0.4.mod b/scripts/cached_modfiles/github.com_andybalholm_brotli_v1.0.4.mod deleted file mode 100644 index 20a011f..0000000 --- a/scripts/cached_modfiles/github.com_andybalholm_brotli_v1.0.4.mod +++ /dev/null @@ -1,5 +0,0 @@ -module test - -go 1.20 - -require github.com/andybalholm/brotli v1.0.4 // indirect diff --git a/scripts/cached_modfiles/github.com_andybalholm_brotli_v1.0.4.sum b/scripts/cached_modfiles/github.com_andybalholm_brotli_v1.0.4.sum deleted file mode 100644 index 3d85808..0000000 --- a/scripts/cached_modfiles/github.com_andybalholm_brotli_v1.0.4.sum +++ /dev/null @@ -1,2 +0,0 @@ -github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= -github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= diff --git a/scripts/cached_modfiles/github.com_samber_lo.mod b/scripts/cached_modfiles/github.com_samber_lo.mod new file mode 100644 index 0000000..e693183 --- /dev/null +++ b/scripts/cached_modfiles/github.com_samber_lo.mod @@ -0,0 +1,8 @@ +module test + +go 1.23.0 + +require ( + github.com/samber/lo v1.47.0 // indirect + golang.org/x/text v0.16.0 // indirect +) diff --git a/scripts/cached_modfiles/github.com_samber_lo.sum b/scripts/cached_modfiles/github.com_samber_lo.sum new file mode 100644 index 0000000..5e5aa6e --- /dev/null +++ b/scripts/cached_modfiles/github.com_samber_lo.sum @@ -0,0 +1,4 @@ +github.com/samber/lo v1.47.0 h1:z7RynLwP5nbyRscyvcD043DWYoOcYRv3mV8lBeqOCLc= +github.com/samber/lo v1.47.0/go.mod h1:RmDH9Ct32Qy3gduHQuKJ3gW1fMHAnE/fAzQuf6He5cU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= diff --git a/scripts/cached_modfiles/github.com_samber_lo_v1.21.0.mod b/scripts/cached_modfiles/github.com_samber_lo_v1.21.0.mod deleted file mode 100644 index 66cf777..0000000 --- a/scripts/cached_modfiles/github.com_samber_lo_v1.21.0.mod +++ /dev/null @@ -1,8 +0,0 @@ -module test - -go 1.20 - -require ( - github.com/samber/lo v1.21.0 // indirect - golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect -) diff --git a/scripts/cached_modfiles/github.com_samber_lo_v1.21.0.sum b/scripts/cached_modfiles/github.com_samber_lo_v1.21.0.sum deleted file mode 100644 index 9044f92..0000000 --- a/scripts/cached_modfiles/github.com_samber_lo_v1.21.0.sum +++ /dev/null @@ -1,4 +0,0 @@ -github.com/samber/lo v1.21.0 h1:FSby8pJQtX4KmyddTCCGhc3JvnnIVrDA+NW37rG+7G8= -github.com/samber/lo v1.21.0/go.mod h1:2I7tgIv8Q1SG2xEIkRq0F2i2zgxVpnyPOP0d3Gj2r+A= -golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 h1:3MTrJm4PyNL9NBqvYDSj3DHl46qQakyfqfWo4jgfaEM= -golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= diff --git a/scripts/cached_modfiles/golang.zx2c4.com_wireguard.mod b/scripts/cached_modfiles/golang.zx2c4.com_wireguard.mod new file mode 100644 index 0000000..528d65a --- /dev/null +++ b/scripts/cached_modfiles/golang.zx2c4.com_wireguard.mod @@ -0,0 +1,14 @@ +module test + +go 1.23.0 + +require ( + github.com/google/btree v1.0.1 // indirect + golang.org/x/crypto v0.13.0 // indirect + golang.org/x/net v0.15.0 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect + golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect + golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 // indirect + gvisor.dev/gvisor v0.0.0-20230927004350-cbd86285d259 // indirect +) diff --git a/scripts/cached_modfiles/golang.zx2c4.com_wireguard.sum b/scripts/cached_modfiles/golang.zx2c4.com_wireguard.sum new file mode 100644 index 0000000..91d1675 --- /dev/null +++ b/scripts/cached_modfiles/golang.zx2c4.com_wireguard.sum @@ -0,0 +1,16 @@ +github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 h1:B82qJJgjvYKsXS9jeunTOisW56dUokqW/FOteYJJ/yg= +golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2/go.mod h1:deeaetjYA+DHMHg+sMSMI58GrEteJUUzzw7en6TJQcI= +golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 h1:/jFs0duh4rdb8uIfPMv78iAJGcPKDeqAFnaLBropIC4= +golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173/go.mod h1:tkCQ4FQXmpAgYVh++1cq16/dH4QJtmvpRv19DWGAHSA= +gvisor.dev/gvisor v0.0.0-20230927004350-cbd86285d259 h1:TbRPT0HtzFP3Cno1zZo7yPzEEnfu8EjLfl6IU9VfqkQ= +gvisor.dev/gvisor v0.0.0-20230927004350-cbd86285d259/go.mod h1:AVgIgHMwK63XvmAzWG9vLQ41YnVHN0du0tEC46fI7yY= diff --git a/scripts/cached_modfiles/golang.zx2c4.com_wireguard_0.0.20220316.mod b/scripts/cached_modfiles/golang.zx2c4.com_wireguard_0.0.20220316.mod deleted file mode 100644 index f9b4a2e..0000000 --- a/scripts/cached_modfiles/golang.zx2c4.com_wireguard_0.0.20220316.mod +++ /dev/null @@ -1,11 +0,0 @@ -module test - -go 1.20 - -require ( - golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect - golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect - golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86 // indirect - golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224 // indirect - golang.zx2c4.com/wireguard v0.0.0-20220317033214-ee1c8e0e8789 // indirect -) diff --git a/scripts/cached_modfiles/golang.zx2c4.com_wireguard_0.0.20220316.sum b/scripts/cached_modfiles/golang.zx2c4.com_wireguard_0.0.20220316.sum deleted file mode 100644 index 4df276f..0000000 --- a/scripts/cached_modfiles/golang.zx2c4.com_wireguard_0.0.20220316.sum +++ /dev/null @@ -1,10 +0,0 @@ -golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd h1:XcWmESyNjXJMLahc3mqVQJcgSTDxFxhETVlfk9uGc38= -golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86 h1:A9i04dxx7Cribqbs8jf3FQLogkL/CV2YN7hj9KWJCkc= -golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224 h1:Ug9qvr1myri/zFN6xL17LSCBGFDnphBBhzmILHsM5TY= -golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224/go.mod h1:deeaetjYA+DHMHg+sMSMI58GrEteJUUzzw7en6TJQcI= -golang.zx2c4.com/wireguard v0.0.0-20220317033214-ee1c8e0e8789 h1:VOTlV0x4S7exvgtanezUuF/s++xx6ZHrPZRi8dEW7dM= -golang.zx2c4.com/wireguard v0.0.0-20220317033214-ee1c8e0e8789/go.mod h1:bVQfyl2sCM/QIIGHpWbFGfHPuDvqnCNkT6MQLTCjO/U= diff --git a/scripts/cached_modfiles/google.golang.org_protobuf_v1.28.1.mod b/scripts/cached_modfiles/google.golang.org_protobuf.mod similarity index 76% rename from scripts/cached_modfiles/google.golang.org_protobuf_v1.28.1.mod rename to scripts/cached_modfiles/google.golang.org_protobuf.mod index 8d58054..1b145ed 100644 --- a/scripts/cached_modfiles/google.golang.org_protobuf_v1.28.1.mod +++ b/scripts/cached_modfiles/google.golang.org_protobuf.mod @@ -1,10 +1,10 @@ module test -go 1.20 +go 1.23.0 require ( github.com/golang/protobuf v1.5.0 // indirect github.com/google/go-cmp v0.5.5 // indirect golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect - google.golang.org/protobuf v1.28.1 // indirect + google.golang.org/protobuf v1.34.2 // indirect ) diff --git a/scripts/cached_modfiles/google.golang.org_protobuf_v1.28.1.sum b/scripts/cached_modfiles/google.golang.org_protobuf.sum similarity index 78% rename from scripts/cached_modfiles/google.golang.org_protobuf_v1.28.1.sum rename to scripts/cached_modfiles/google.golang.org_protobuf.sum index a6b84d3..8a13d2c 100644 --- a/scripts/cached_modfiles/google.golang.org_protobuf_v1.28.1.sum +++ b/scripts/cached_modfiles/google.golang.org_protobuf.sum @@ -5,5 +5,5 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= diff --git a/scripts/check-third-party.sh b/scripts/check-third-party.sh index d16ff66..7fc1172 100755 --- a/scripts/check-third-party.sh +++ b/scripts/check-third-party.sh @@ -15,22 +15,23 @@ # Also remember that the standard library already provides significant cover. modules=( # Protobuf helps cover encoding libraries and reflection. - google.golang.org/protobuf v1.28.1 + google.golang.org/protobuf v1.34.2 # Wireguard helps cover networking and cryptography. - golang.zx2c4.com/wireguard 0.0.20220316 + # Note that the latest tag does not build on Go 1.23. + golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 # Lo helps cover generics. # TODO: would be nice to find a more popular alternative, # at least once generics are more widespread. - github.com/samber/lo v1.21.0 + github.com/samber/lo v1.47.0 # Brotli is a compression algorithm popular with HTTP. # It's also transpiled from C with a gitlab.com/cznic/ccgo, # so this helps stress garble with Go code that few humans would write. # Unlike other ccgo-generated projects, like modernc.org/sqlite, # it's relatively small without any transitive dependencies. - github.com/andybalholm/brotli v1.0.4 + github.com/andybalholm/brotli v1.1.0 # TODO: consider github.com/mattn/go-sqlite3 to cover a DB and more cgo @@ -44,7 +45,10 @@ exit_code=0 show() { echo "> ${@}" - "${@}" + if ! "${@}"; then + echo "FAIL" + return 1 + fi } BASE_GOFLAGS="$(go env GOFLAGS)" @@ -64,7 +68,7 @@ for ((i = 0; i < ${#modules[@]}; i += 2)); do # Use the custom go.mod file for the rest of the commands via GOFLAGS. # We should delete these cached modfiles with major Go updates, # to recreate their "tidy" version with newer Go toolchains. - cached_modfile="${module}_${version}" + cached_modfile="${module}" cached_modfile="${CACHED_MODFILES}/${cached_modfile//[^A-Za-z0-9._-]/_}.mod" export GOFLAGS="${BASE_GOFLAGS} -modfile=${cached_modfile}"