tstest/iosdeps: update import list to mirror ipn-go-bridge

The purpose of this package is to test the iOS dependency closure, but
it had drifted from the actual import list of the ipn-go-bridge package
in the corp repo (the Go side of the iOS / macOS app).

Update the imports to match ipn-go-bridge's GOOS=ios import list,
adding many missing packages including wgengine/netstack,
feature/{taildrop,syspolicy,condregister}, the util/syspolicy/*
subpackages, types/{key,lazy,logid,netmap}, tsd, safesocket,
util/{eventbus,must,set}, and several net/* and ipn/* packages.

Drop two now-stale BadDeps entries (for now!): database/sql/driver and
github.com/google/uuid are reached via wgengine/netstack ->
github.com/prometheus-community/pro-bing, which netstack imports on
darwin || ios for ICMP user-ping, so the iOS app already ships them.
But we should fix that later.

Updates #19633

Change-Id: Ic50779fdb195685a2e8ccd7c513eee91b0feeaf8
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick 2026-05-04 17:20:43 +00:00 committed by Brad Fitzpatrick
parent 9bb7ca6116
commit 81569e891f
2 changed files with 42 additions and 7 deletions

View File

@ -4,28 +4,36 @@
// Package iosdeps is a just a list of the packages we import on iOS, to let us
// test that our transitive closure of dependencies on iOS doesn't accidentally
// grow too large, as we've historically been memory constrained there.
//
// It is intended to mirror the imports of the ipn-go-bridge package in the
// private "corp" repository (the Go side of the iOS / macOS app).
package iosdeps
import (
_ "bufio"
_ "bytes"
_ "context"
_ "crypto/rand"
_ "crypto"
_ "crypto/ecdsa"
_ "crypto/elliptic"
_ "crypto/sha256"
_ "encoding/base64"
_ "encoding/json"
_ "errors"
_ "fmt"
_ "io"
_ "io/fs"
_ "log"
_ "math"
_ "net"
_ "net/http"
_ "net/netip"
_ "net/url"
_ "os"
_ "os/signal"
_ "path/filepath"
_ "runtime"
_ "runtime/debug"
_ "slices"
_ "strconv"
_ "strings"
_ "sync"
_ "sync/atomic"
@ -35,24 +43,48 @@ import (
_ "github.com/tailscale/wireguard-go/device"
_ "github.com/tailscale/wireguard-go/tun"
_ "go4.org/mem"
_ "golang.org/x/sys/unix"
_ "tailscale.com/client/tailscale/apitype"
_ "tailscale.com/drive/driveimpl"
_ "tailscale.com/envknob"
_ "tailscale.com/feature/condregister"
_ "tailscale.com/feature/syspolicy"
_ "tailscale.com/feature/taildrop"
_ "tailscale.com/hostinfo"
_ "tailscale.com/ipn"
_ "tailscale.com/ipn/ipnauth"
_ "tailscale.com/ipn/ipnlocal"
_ "tailscale.com/ipn/localapi"
_ "tailscale.com/logpolicy"
_ "tailscale.com/logtail"
_ "tailscale.com/logtail/filch"
_ "tailscale.com/net/dns"
_ "tailscale.com/net/netaddr"
_ "tailscale.com/net/netmon"
_ "tailscale.com/net/netutil"
_ "tailscale.com/net/tsaddr"
_ "tailscale.com/net/tsdial"
_ "tailscale.com/net/tshttpproxy"
_ "tailscale.com/net/tstun"
_ "tailscale.com/paths"
_ "tailscale.com/safesocket"
_ "tailscale.com/tsd"
_ "tailscale.com/types/empty"
_ "tailscale.com/types/key"
_ "tailscale.com/types/lazy"
_ "tailscale.com/types/logger"
_ "tailscale.com/types/logid"
_ "tailscale.com/types/netmap"
_ "tailscale.com/util/clientmetric"
_ "tailscale.com/util/dnsname"
_ "tailscale.com/util/eventbus"
_ "tailscale.com/util/must"
_ "tailscale.com/util/set"
_ "tailscale.com/util/syspolicy"
_ "tailscale.com/util/syspolicy/pkey"
_ "tailscale.com/util/syspolicy/setting"
_ "tailscale.com/util/syspolicy/source"
_ "tailscale.com/version"
_ "tailscale.com/wgengine"
_ "tailscale.com/wgengine/netstack"
_ "tailscale.com/wgengine/router"
)

View File

@ -20,11 +20,14 @@ func TestDeps(t *testing.T) {
"tailscale.com/net/wsconn": "https://github.com/tailscale/tailscale/issues/13762",
"github.com/coder/websocket": "https://github.com/tailscale/tailscale/issues/13762",
"github.com/mitchellh/go-ps": "https://github.com/tailscale/tailscale/pull/13759",
"database/sql/driver": "iOS doesn't use an SQL database",
"github.com/google/uuid": "see tailscale/tailscale#13760",
"tailscale.com/clientupdate/distsign": "downloads via AppStore, not distsign",
"github.com/tailscale/hujson": "no config file support on iOS",
"tailscale.com/feature/capture": "no debug packet capture on iOS",
// TODO(bradfitz): fix this again. See https://github.com/tailscale/tailscale/issues/13760 and
// https://github.com/tailscale/tailscale/issues/19633
// "database/sql/driver": "iOS doesn't use an SQL database",
// "github.com/google/uuid": "see tailscale/tailscale#13760",
},
}.Check(t)
}