From 6d82a1891680b95decb5051849a1cdb0fd7f7adc Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 3 Nov 2021 11:56:25 -0700 Subject: [PATCH] tstest/integration: don't include stdlib deps in go generate output Causes too much churn for zero benefit. Change-Id: I838f8cdb5723f122f11dd4bbce5e9c07755c3cd9 Signed-off-by: Brad Fitzpatrick --- tstest/integration/gen_deps.go | 5 ++++ .../tailscaled_deps_test_darwin.go | 25 ------------------- .../tailscaled_deps_test_freebsd.go | 23 ----------------- .../integration/tailscaled_deps_test_linux.go | 23 ----------------- .../tailscaled_deps_test_openbsd.go | 23 ----------------- .../tailscaled_deps_test_windows.go | 23 ----------------- 6 files changed, 5 insertions(+), 117 deletions(-) diff --git a/tstest/integration/gen_deps.go b/tstest/integration/gen_deps.go index 640bff36b..b7c2ffd2e 100644 --- a/tstest/integration/gen_deps.go +++ b/tstest/integration/gen_deps.go @@ -15,6 +15,7 @@ "log" "os" "os/exec" + "strings" ) func main() { @@ -52,6 +53,10 @@ func generate(goos string) { // process and can cache a prior success when a dependency changes. `) for _, dep := range x.Imports { + if !strings.Contains(dep, ".") { + // Omit stanard library deps. + continue + } fmt.Fprintf(&out, "\t_ %q\n", dep) } fmt.Fprintf(&out, ")\n") diff --git a/tstest/integration/tailscaled_deps_test_darwin.go b/tstest/integration/tailscaled_deps_test_darwin.go index 16a75c2c3..fa368fd28 100644 --- a/tstest/integration/tailscaled_deps_test_darwin.go +++ b/tstest/integration/tailscaled_deps_test_darwin.go @@ -11,31 +11,7 @@ // Otherwise cmd/go never sees that we depend on these packages' // transitive deps when we run "go install tailscaled" in a child // process and can cache a prior success when a dependency changes. - _ "context" - _ "crypto/tls" - _ "encoding/json" - _ "errors" - _ "flag" - _ "fmt" _ "inet.af/netaddr" - _ "io" - _ "io/ioutil" - _ "log" - _ "net" - _ "net/http" - _ "net/http/httptrace" - _ "net/http/httputil" - _ "net/http/pprof" - _ "net/url" - _ "os" - _ "os/exec" - _ "os/signal" - _ "path/filepath" - _ "runtime" - _ "runtime/debug" - _ "strconv" - _ "strings" - _ "syscall" _ "tailscale.com/chirp" _ "tailscale.com/derp/derphttp" _ "tailscale.com/ipn" @@ -61,5 +37,4 @@ _ "tailscale.com/wgengine/monitor" _ "tailscale.com/wgengine/netstack" _ "tailscale.com/wgengine/router" - _ "time" ) diff --git a/tstest/integration/tailscaled_deps_test_freebsd.go b/tstest/integration/tailscaled_deps_test_freebsd.go index d5e7594cd..fa368fd28 100644 --- a/tstest/integration/tailscaled_deps_test_freebsd.go +++ b/tstest/integration/tailscaled_deps_test_freebsd.go @@ -11,29 +11,7 @@ // Otherwise cmd/go never sees that we depend on these packages' // transitive deps when we run "go install tailscaled" in a child // process and can cache a prior success when a dependency changes. - _ "context" - _ "crypto/tls" - _ "encoding/json" - _ "errors" - _ "flag" - _ "fmt" _ "inet.af/netaddr" - _ "io" - _ "io/ioutil" - _ "log" - _ "net" - _ "net/http" - _ "net/http/httptrace" - _ "net/http/httputil" - _ "net/http/pprof" - _ "net/url" - _ "os" - _ "os/signal" - _ "runtime" - _ "runtime/debug" - _ "strconv" - _ "strings" - _ "syscall" _ "tailscale.com/chirp" _ "tailscale.com/derp/derphttp" _ "tailscale.com/ipn" @@ -59,5 +37,4 @@ _ "tailscale.com/wgengine/monitor" _ "tailscale.com/wgengine/netstack" _ "tailscale.com/wgengine/router" - _ "time" ) diff --git a/tstest/integration/tailscaled_deps_test_linux.go b/tstest/integration/tailscaled_deps_test_linux.go index d5e7594cd..fa368fd28 100644 --- a/tstest/integration/tailscaled_deps_test_linux.go +++ b/tstest/integration/tailscaled_deps_test_linux.go @@ -11,29 +11,7 @@ // Otherwise cmd/go never sees that we depend on these packages' // transitive deps when we run "go install tailscaled" in a child // process and can cache a prior success when a dependency changes. - _ "context" - _ "crypto/tls" - _ "encoding/json" - _ "errors" - _ "flag" - _ "fmt" _ "inet.af/netaddr" - _ "io" - _ "io/ioutil" - _ "log" - _ "net" - _ "net/http" - _ "net/http/httptrace" - _ "net/http/httputil" - _ "net/http/pprof" - _ "net/url" - _ "os" - _ "os/signal" - _ "runtime" - _ "runtime/debug" - _ "strconv" - _ "strings" - _ "syscall" _ "tailscale.com/chirp" _ "tailscale.com/derp/derphttp" _ "tailscale.com/ipn" @@ -59,5 +37,4 @@ _ "tailscale.com/wgengine/monitor" _ "tailscale.com/wgengine/netstack" _ "tailscale.com/wgengine/router" - _ "time" ) diff --git a/tstest/integration/tailscaled_deps_test_openbsd.go b/tstest/integration/tailscaled_deps_test_openbsd.go index d5e7594cd..fa368fd28 100644 --- a/tstest/integration/tailscaled_deps_test_openbsd.go +++ b/tstest/integration/tailscaled_deps_test_openbsd.go @@ -11,29 +11,7 @@ // Otherwise cmd/go never sees that we depend on these packages' // transitive deps when we run "go install tailscaled" in a child // process and can cache a prior success when a dependency changes. - _ "context" - _ "crypto/tls" - _ "encoding/json" - _ "errors" - _ "flag" - _ "fmt" _ "inet.af/netaddr" - _ "io" - _ "io/ioutil" - _ "log" - _ "net" - _ "net/http" - _ "net/http/httptrace" - _ "net/http/httputil" - _ "net/http/pprof" - _ "net/url" - _ "os" - _ "os/signal" - _ "runtime" - _ "runtime/debug" - _ "strconv" - _ "strings" - _ "syscall" _ "tailscale.com/chirp" _ "tailscale.com/derp/derphttp" _ "tailscale.com/ipn" @@ -59,5 +37,4 @@ _ "tailscale.com/wgengine/monitor" _ "tailscale.com/wgengine/netstack" _ "tailscale.com/wgengine/router" - _ "time" ) diff --git a/tstest/integration/tailscaled_deps_test_windows.go b/tstest/integration/tailscaled_deps_test_windows.go index 8c13e9fc5..5b4094786 100644 --- a/tstest/integration/tailscaled_deps_test_windows.go +++ b/tstest/integration/tailscaled_deps_test_windows.go @@ -11,33 +11,11 @@ // Otherwise cmd/go never sees that we depend on these packages' // transitive deps when we run "go install tailscaled" in a child // process and can cache a prior success when a dependency changes. - _ "context" - _ "crypto/tls" - _ "encoding/json" - _ "errors" - _ "flag" - _ "fmt" _ "golang.org/x/sys/windows" _ "golang.org/x/sys/windows/svc" _ "golang.org/x/sys/windows/svc/mgr" _ "golang.zx2c4.com/wireguard/windows/tunnel/winipcfg" _ "inet.af/netaddr" - _ "io" - _ "io/ioutil" - _ "log" - _ "net" - _ "net/http" - _ "net/http/httptrace" - _ "net/http/httputil" - _ "net/http/pprof" - _ "net/url" - _ "os" - _ "os/signal" - _ "runtime" - _ "runtime/debug" - _ "strconv" - _ "strings" - _ "syscall" _ "tailscale.com/derp/derphttp" _ "tailscale.com/ipn" _ "tailscale.com/ipn/ipnserver" @@ -65,5 +43,4 @@ _ "tailscale.com/wgengine/monitor" _ "tailscale.com/wgengine/netstack" _ "tailscale.com/wgengine/router" - _ "time" )