Skip to content

Commit 56bd678

Browse files
aledbfclaude
andcommitted
build: run task and go-tools from released binaries
go tool task is go-tools' task command now: the Task versions.yaml pins, for every platform, with go-tools' latest release on its PATH, so the Taskfile calls vulngate, ctxlife, testquality, refs, mutate, deadgate, taskgate, sfw and versions by name. Neither is compiled here any more: the module graph goes from 568 modules to 272. mockgen and deadcode stay go.mod tools. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 8c3cc70 commit 56bd678

5 files changed

Lines changed: 54 additions & 397 deletions

File tree

‎Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# context. For a local single-arch build:
1919
# mkdir -p linux/amd64
2020
# CGO_ENABLED=0 go build -o linux/amd64/devcontainer ./cmd/devcontainer
21-
# docker buildx build --platform linux/amd64 --load $(go tool versions args distroless) -t devcontainer-cli .
21+
# docker buildx build --platform linux/amd64 --load $(versions args distroless) -t devcontainer-cli .
2222
#
2323
# The base is pinned by digest in versions.yaml (distroless) and handed in: GoReleaser
2424
# reads it from DISTROLESS_IMAGE, which `task release:env` exports.

‎Taskfile.yml‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ tasks:
8787
vuln:
8888
desc: Fail on a vulnerability the code calls and that has a fix, the standard library's included (govulncheck through go-tools' vulngate)
8989
cmds:
90-
- go tool vulngate ./...
90+
- vulngate ./...
9191

9292
coverage:
9393
desc: Hermetic unit coverage — per-package table + enforce the total/package floors
@@ -202,14 +202,14 @@ tasks:
202202
cmds:
203203
- go vet ./cmd/... ./internal/...
204204
- task: lint:go
205-
- go tool ctxlife
206-
- go tool testquality -allow .github/testquality-allow.txt ./...
207-
- go tool refs
208-
- go tool mutate -stale-exempts
205+
- ctxlife
206+
- testquality -allow .github/testquality-allow.txt ./...
207+
- refs
208+
- mutate -stale-exempts
209209
- task: deadcode
210210
# The Task running this one, which taskgate asks for the task names a workflow step runs.
211-
- go tool taskgate -task {{.TASK_EXE}}
212-
- go tool sfw check
211+
- taskgate -task {{.TASK_EXE}}
212+
- sfw check
213213

214214
lint:go:
215215
desc: golangci-lint with .golangci.yml, at the version versions.yaml pins
@@ -222,18 +222,18 @@ tasks:
222222
-v "$(go env GOMODCACHE)":/go/pkg/mod -v "$(go env GOCACHE)":/cache/go-build
223223
-e GOMODCACHE=/go/pkg/mod -e GOCACHE=/cache/go-build -e GOLANGCI_LINT_CACHE=/work/artifacts/golangci-lint
224224
-e HOME=/tmp -e GOTOOLCHAIN=local
225-
$(go tool versions ref golangci-lint) golangci-lint run ./cmd/... ./internal/...
225+
$(versions ref golangci-lint) golangci-lint run ./cmd/... ./internal/...
226226
227227
deadcode:
228228
desc: Fail on a function the binaries link and never call, or a package none imports, unless .github/deadcode-allow.txt says why
229229
cmds:
230-
- go tool deadgate -deadcode "$(go tool -n deadcode)" -roots ./cmd/... -packages ./internal/... -allow .github/deadcode-allow.txt -pending .github/deadcode-pending.txt
230+
- deadgate -deadcode "$(go tool -n deadcode)" -roots ./cmd/... -packages ./internal/... -allow .github/deadcode-allow.txt -pending .github/deadcode-pending.txt
231231

232232
mutate:
233233
desc: Break what the change against BASE touched and fail on an edit no test refuses (BASE=origin/main; on a pull request, what it merges into)
234234
cmds:
235235
# BASE comes from `task mutate BASE=...` or the environment (the workflow's).
236-
- go tool mutate -base "{{.BASE | default "${BASE:-origin/main}"}}" -max 200
236+
- mutate -base "{{.BASE | default "${BASE:-origin/main}"}}" -max 200
237237

238238
spec:compliance:
239239
desc: Verify spec compliance — schema attribute coverage + normative behavior (merge/lifecycle/discovery), excludes Go-only additions
@@ -253,13 +253,13 @@ tasks:
253253
desc: Rewrite every internal/**/testdata/ts-oracle/*.json with the results of the reference TypeScript functions (tools/tsoracle), run in the node image versions.yaml pins (needs Docker)
254254
deps: [reference:compile]
255255
cmds:
256-
- go run ./cmd/devtool ts-oracle "$(go tool versions ref node)"
256+
- go run ./cmd/devtool ts-oracle "$(versions ref node)"
257257

258258
testdata:ts-oracle:check:
259259
desc: Fail when a testdata/ts-oracle golden differs from what the reference TypeScript functions return
260260
deps: [reference:compile]
261261
cmds:
262-
- TS_ORACLE_IMAGE="$(go tool versions ref node)" go test ./internal/devtools -run '^TestTSOracleGoldensMatchTheReference$' -count=1 -v
262+
- TS_ORACLE_IMAGE="$(versions ref node)" go test ./internal/devtools -run '^TestTSOracleGoldensMatchTheReference$' -count=1 -v
263263

264264
reference:
265265
desc: Install and compile the TypeScript parity oracle
@@ -281,7 +281,7 @@ tasks:
281281
# must be in the inventory (needs reference/ checked out, so it lives here).
282282
- go test ./internal/cli -run TestOracleFlagCoverage -count=1
283283
# The ts-oracle goldens must be what the reference's functions return.
284-
- TS_ORACLE_IMAGE="$(go tool versions ref node)" go test ./internal/devtools -run '^TestTSOracleGoldensMatchTheReference$' -count=1
284+
- TS_ORACLE_IMAGE="$(versions ref node)" go test ./internal/devtools -run '^TestTSOracleGoldensMatchTheReference$' -count=1
285285
- PARITY_REPORT_FILE={{.ROOT_DIR}}/artifacts/parity-contract.json PARITY_STRICT=true PARITY_LANE=contract PARITY_SKIP_DOCKER=true PARITY_SKIP_NETWORK=true go test ./internal/cli -run TestParityMatrix -count=1 -timeout 10m -v {{.CLI_ARGS}}
286286

287287
parity:semantic:
@@ -410,14 +410,14 @@ tasks:
410410
msg: goreleaser is required
411411
env:
412412
DISTROLESS_IMAGE:
413-
sh: go tool versions ref distroless
413+
sh: versions ref distroless
414414
cmds:
415415
- goreleaser release --clean {{.CLI_ARGS}}
416416

417417
release:env:
418418
desc: "CI-ONLY: export what GoReleaser reads from versions.yaml (DISTROLESS_IMAGE) to $GITHUB_ENV"
419419
cmds:
420-
- echo "DISTROLESS_IMAGE=$(go tool versions ref distroless)" >> "$GITHUB_ENV"
420+
- echo "DISTROLESS_IMAGE=$(versions ref distroless)" >> "$GITHUB_ENV"
421421

422422
# The release workflow's own steps. What only the workflow knows - the dispatch input, the
423423
# prepare job's outputs, the published digest - comes in the environment.
@@ -512,8 +512,8 @@ tasks:
512512
node-pty: true
513513
verifyDepsBeforeRun: error
514514
EOF
515-
- go tool sfw pnpm import
516-
- go tool sfw pnpm install --frozen-lockfile
515+
- sfw pnpm import
516+
- sfw pnpm install --frozen-lockfile
517517

518518
reference:compile:
519519
internal: true

‎go.mod‎

Lines changed: 9 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/devcontainers/cli
22

3-
go 1.27
3+
go 1.27.0
44

55
toolchain go1.27.3
66

@@ -15,7 +15,7 @@ require (
1515
github.com/opencontainers/image-spec v1.1.1
1616
github.com/spf13/cobra v1.10.2
1717
github.com/spf13/pflag v1.1.0
18-
github.com/spin-stack/go-tools v0.0.0-20261109064146-2b473b1bc102
18+
github.com/spin-stack/go-tools v0.0.0-20261109214710-b4b5f4a78a45
1919
github.com/tailscale/hujson v0.0.0-20260727124030-b80ff77dac4f
2020
github.com/testcontainers/testcontainers-go v0.44.0
2121
go.uber.org/mock v0.6.0
@@ -28,176 +28,66 @@ require (
2828
)
2929

3030
require (
31-
cel.dev/expr v0.25.2 // indirect
32-
charm.land/bubbles/v2 v2.1.1 // indirect
33-
charm.land/bubbletea/v2 v2.0.8 // indirect
34-
charm.land/lipgloss/v2 v2.0.6 // indirect
35-
cloud.google.com/go v0.123.0 // indirect
36-
cloud.google.com/go/auth v0.23.1 // indirect
37-
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
38-
cloud.google.com/go/compute/metadata v0.9.0 // indirect
39-
cloud.google.com/go/iam v1.13.0 // indirect
40-
cloud.google.com/go/monitoring v1.30.0 // indirect
41-
cloud.google.com/go/storage v1.64.0 // indirect
4231
dario.cat/mergo v1.0.2 // indirect
4332
github.com/Azure/go-ansiterm v0.0.0-20261006220739-8c912ac31dd4 // indirect
44-
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.35.0 // indirect
45-
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.59.0 // indirect
46-
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.59.0 // indirect
47-
github.com/Ladicle/tabwriter v1.0.0 // indirect
4833
github.com/Microsoft/go-winio v0.6.3-0.20251027160822-ad3df93bed29 // indirect
4934
github.com/agext/levenshtein v1.2.3 // indirect
50-
github.com/alecthomas/chroma/v2 v2.27.0 // indirect
51-
github.com/atotto/clipboard v0.1.4 // indirect
52-
github.com/aws/aws-sdk-go-v2 v1.47.0 // indirect
53-
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.20 // indirect
54-
github.com/aws/aws-sdk-go-v2/config v1.33.4 // indirect
55-
github.com/aws/aws-sdk-go-v2/credentials v1.20.4 // indirect
56-
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.20.0 // indirect
57-
github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.3 // indirect
58-
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.3 // indirect
59-
github.com/aws/aws-sdk-go-v2/internal/v4a v1.5.3 // indirect
60-
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.19 // indirect
61-
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.28 // indirect
62-
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.3 // indirect
63-
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.36 // indirect
64-
github.com/aws/aws-sdk-go-v2/service/s3 v1.106.5 // indirect
65-
github.com/aws/aws-sdk-go-v2/service/signin v1.10.0 // indirect
66-
github.com/aws/aws-sdk-go-v2/service/sso v1.38.0 // indirect
67-
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.43.0 // indirect
68-
github.com/aws/aws-sdk-go-v2/service/sts v1.50.0 // indirect
69-
github.com/aws/smithy-go v1.28.2 // indirect
70-
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
7135
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
7236
github.com/cespare/xxhash/v2 v2.3.0 // indirect
73-
github.com/chainguard-dev/git-urls v1.0.2 // indirect
74-
github.com/charmbracelet/colorprofile v0.4.3 // indirect
75-
github.com/charmbracelet/ultraviolet v0.0.0-20260811164956-006e29f97886 // indirect
76-
github.com/charmbracelet/x/ansi v0.11.8 // indirect
77-
github.com/charmbracelet/x/term v0.2.2 // indirect
78-
github.com/charmbracelet/x/termios v0.1.1 // indirect
79-
github.com/charmbracelet/x/windows v0.2.2 // indirect
80-
github.com/clipperhouse/displaywidth v0.11.0 // indirect
81-
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
82-
github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2 // indirect
8337
github.com/containerd/errdefs v1.0.0 // indirect
8438
github.com/containerd/errdefs/pkg v0.3.0 // indirect
8539
github.com/containerd/log v0.2.0 // indirect
8640
github.com/containerd/platforms v1.0.0-rc.5 // indirect
8741
github.com/containerd/typeurl/v2 v2.3.0 // indirect
8842
github.com/cpuguy83/dockercfg v0.3.2 // indirect
89-
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
9043
github.com/distribution/reference v0.6.0 // indirect
91-
github.com/dlclark/regexp2/v2 v2.7.1 // indirect
92-
github.com/docker/cli v29.8.2+incompatible // indirect
93-
github.com/docker/docker-credential-helpers v0.9.9 // indirect
9444
github.com/docker/go-connections v0.8.2 // indirect
9545
github.com/docker/go-units v0.5.0 // indirect
96-
github.com/dominikbraun/graph v0.23.0 // indirect
97-
github.com/dustin/go-humanize v1.0.1 // indirect
9846
github.com/ebitengine/purego v0.10.1 // indirect
99-
github.com/elliotchance/orderedmap/v3 v3.1.1 // indirect
100-
github.com/envoyproxy/go-control-plane/envoy v1.39.0 // indirect
101-
github.com/envoyproxy/protoc-gen-validate v1.3.3 // indirect
102-
github.com/fatih/color v1.19.0 // indirect
10347
github.com/felixge/httpsnoop v1.1.0 // indirect
104-
github.com/fsnotify/fsnotify v1.10.1 // indirect
105-
github.com/go-jose/go-jose/v4 v4.1.4 // indirect
10648
github.com/go-logr/logr v1.4.4 // indirect
10749
github.com/go-logr/stdr v1.2.2 // indirect
10850
github.com/go-ole/go-ole v1.3.0 // indirect
109-
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
110-
github.com/go-task/task/v3 v3.53.1 // indirect
111-
github.com/go-task/template v0.2.0 // indirect
112-
github.com/google/go-containerregistry v0.22.1 // indirect
113-
github.com/google/s2a-go v0.1.9 // indirect
11451
github.com/google/uuid v1.6.0 // indirect
115-
github.com/googleapis/enterprise-certificate-proxy v0.3.20 // indirect
116-
github.com/googleapis/gax-go/v2 v2.23.0 // indirect
117-
github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.74 // indirect
118-
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
119-
github.com/hashicorp/go-getter v1.8.8 // indirect
120-
github.com/hashicorp/go-version v1.9.0 // indirect
12152
github.com/inconshreveable/mousetrap v1.1.0 // indirect
122-
github.com/joho/godotenv v1.5.1 // indirect
12353
github.com/klauspost/compress v1.20.2 // indirect
124-
github.com/klauspost/cpuid/v2 v2.4.0 // indirect
125-
github.com/klauspost/pgzip v1.2.6 // indirect
126-
github.com/lucasb-eyer/go-colorful v1.4.1 // indirect
54+
github.com/kr/text v0.2.0 // indirect
12755
github.com/lufia/plan9stats v0.0.0-20260330125221-c963978e514e // indirect
12856
github.com/magiconair/properties v1.8.10 // indirect
129-
github.com/mattn/go-colorable v0.1.15 // indirect
130-
github.com/mattn/go-isatty v0.0.24 // indirect
131-
github.com/mattn/go-runewidth v0.0.27 // indirect
132-
github.com/mitchellh/go-homedir v1.1.0 // indirect
133-
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
13457
github.com/moby/go-archive v0.3.0 // indirect
13558
github.com/moby/patternmatcher v0.6.1 // indirect
13659
github.com/moby/sys/sequential v0.7.0 // indirect
13760
github.com/moby/sys/user v0.4.1 // indirect
13861
github.com/moby/sys/userns v0.2.1 // indirect
13962
github.com/moby/term v0.5.2 // indirect
140-
github.com/muesli/cancelreader v0.2.2 // indirect
141-
github.com/pierrec/lz4/v4 v4.1.27 // indirect
14263
github.com/pkg/errors v0.9.1 // indirect
14364
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
14465
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
145-
github.com/puzpuzpuz/xsync/v4 v4.5.0 // indirect
146-
github.com/rivo/uniseg v0.4.7 // indirect
147-
github.com/sajari/fuzzy v1.0.0 // indirect
66+
github.com/rogpeppe/go-internal v1.15.0 // indirect
14867
github.com/shirou/gopsutil/v4 v4.26.6 // indirect
14968
github.com/sirupsen/logrus v1.10.2 // indirect
150-
github.com/spiffe/go-spiffe/v2 v2.8.1 // indirect
151-
github.com/stretchr/objx v0.5.3 // indirect
15269
github.com/stretchr/testify v1.12.1 // indirect
15370
github.com/tklauser/go-sysconf v0.4.0 // indirect
15471
github.com/tklauser/numcpus v0.12.0 // indirect
15572
github.com/tonistiigi/go-csvvalue v0.0.0-20240814133006-030d3b2625d0 // indirect
156-
github.com/u-root/u-root v0.16.0 // indirect
157-
github.com/u-root/uio v0.0.0-20240224005618-d2acac8f3701 // indirect
158-
github.com/ulikunitz/xz v0.5.16 // indirect
159-
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
16073
github.com/yusufpapurcu/wmi v1.2.4 // indirect
161-
github.com/zeebo/xxh3 v1.1.0 // indirect
16274
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
163-
go.opentelemetry.io/contrib/detectors/gcp v1.45.0 // indirect
164-
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.71.0 // indirect
16575
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.71.0 // indirect
166-
go.opentelemetry.io/otel v1.46.0 // indirect
167-
go.opentelemetry.io/otel/metric v1.46.0 // indirect
168-
go.opentelemetry.io/otel/sdk v1.46.0 // indirect
169-
go.opentelemetry.io/otel/sdk/metric v1.46.0 // indirect
170-
go.opentelemetry.io/otel/trace v1.46.0 // indirect
76+
go.opentelemetry.io/otel v1.47.0 // indirect
77+
go.opentelemetry.io/otel/log v1.47.0 // indirect
78+
go.opentelemetry.io/otel/metric v1.47.0 // indirect
79+
go.opentelemetry.io/otel/trace v1.47.0 // indirect
17180
go.yaml.in/yaml/v3 v3.0.6 // indirect
17281
golang.org/x/mod v0.42.0 // indirect
173-
golang.org/x/oauth2 v0.36.0 // indirect
17482
golang.org/x/sync v0.24.0 // indirect
17583
golang.org/x/sys v0.49.0 // indirect
17684
golang.org/x/telemetry v0.0.0-20261010193011-f71dc92da45e // indirect
177-
golang.org/x/time v0.16.0 // indirect
17885
golang.org/x/tools v0.52.0 // indirect
179-
golang.org/x/vuln v1.9.0 // indirect
180-
google.golang.org/api v0.293.0 // indirect
181-
google.golang.org/genproto v0.0.0-20260724162435-b2f20204f0df // indirect
182-
google.golang.org/genproto/googleapis/api v0.0.0-20260825221802-da73d73af1c5 // indirect
183-
google.golang.org/genproto/googleapis/rpc v0.0.0-20260825221802-da73d73af1c5 // indirect
184-
google.golang.org/grpc v1.84.0 // indirect
18586
google.golang.org/protobuf v1.36.12 // indirect
186-
mvdan.cc/sh/moreinterp v0.0.0-20260817215856-d6550df7ed8d // indirect
187-
mvdan.cc/sh/v3 v3.13.2-0.20260817215856-d6550df7ed8d // indirect
18887
)
18988

19089
tool (
191-
github.com/go-task/task/v3/cmd/task
192-
github.com/spin-stack/go-tools/cmd/ctxlife
193-
github.com/spin-stack/go-tools/cmd/deadgate
194-
github.com/spin-stack/go-tools/cmd/mutate
195-
github.com/spin-stack/go-tools/cmd/refs
196-
github.com/spin-stack/go-tools/cmd/sfw
197-
github.com/spin-stack/go-tools/cmd/taskgate
198-
github.com/spin-stack/go-tools/cmd/testquality
199-
github.com/spin-stack/go-tools/cmd/versions
200-
github.com/spin-stack/go-tools/cmd/vulngate
90+
github.com/spin-stack/go-tools/cmd/task
20191
go.uber.org/mock/mockgen
20292
golang.org/x/tools/cmd/deadcode
20393
)

0 commit comments

Comments
 (0)