Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@ vars:
EMBED_SOURCES:
sh: 'uv run -p ">=3.11" --no-project python tools/list_embeds.py'

env:
# Isolate golangci-lint's results cache per worktree. Its cache key is a hash
# of file *contents*, but each cached issue stores the file's *absolute* path.
# Two worktrees with byte-identical packages (the near-static tools/ module is
# the usual culprit) get a cross-worktree cache hit, so the second inherits the
# first's absolute paths; the //nolint processor then re-opens those paths to
# apply suppressions and, when the other worktree was deleted, can't — so
# suppressed issues leak through as phantom failures pointing at a gone path.
# The default shared cache (~/Library/Caches/golangci-lint) is machine-global;
# rooting it under the gitignored per-worktree .task/ makes contamination
# impossible. CI is unaffected: it runs a single checkout and never persists
# this directory (setup-go caches only the Go build cache).
GOLANGCI_LINT_CACHE: '{{.ROOT_DIR}}/.task/golangci-lint'

# pydabs-* tasks live in python/Taskfile.yml so `task pydabs-foo` works when
# run from python/. Flattened so they keep their `pydabs-` names at the root.
includes:
Expand Down Expand Up @@ -113,8 +127,10 @@ tasks:
# -j=4 — cap analyzer concurrency; higher values use more CPU without
# reducing wall time on this codebase.
#
# Cross-worktree concurrency relies on content-addressable cache keys added
# in golangci-lint v2.12.0; keep the binary at v2.12.0+ in tools/go.mod.
# Concurrent cross-worktree runs rely on content-addressable cache keys added
# in golangci-lint v2.12.0; keep the binary at v2.12.0+ in tools/go.mod. Those
# keys don't cover the deleted-worktree case (stale absolute paths in cached
# issues) — the per-worktree GOLANGCI_LINT_CACHE in the top-level `env:` does.
lint-go:
desc: Lint Go files across all modules (root, tools, codegen)
deps: ['lint-go-root', 'lint-go-tools', 'lint-go-codegen']
Expand Down
Loading