oficina / memoria Public

🤖 chore: keep Go caches out of the tree

A GOMODCACHE inside the repo makes make fmt-check walk every vendored
dependency's source and fail on other people's formatting. I did that
today — the sandbox makes ~/go read-only, so I pointed the cache at a
dotfile here and broke CI for a reason that had nothing to do with the
code. The ignore entries stay, and now say why the answer is to put the
cache somewhere else entirely rather than to ignore it harder.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 01e80d2d3b61ed0169e1b1a5ccc4d1b45a4a1a3d parent b88cd76
1 file changed, +5 −2
  • .gitignore +5 −2
diff --git a/.gitignore b/.gitignore
index b0d2070..9959a3c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,7 +7,10 @@
/memoria.db-wal
/memoria.db-shm
-# Local Go caches. The sandbox makes ~/go read-only, so builds keep
-# their own; neither is source.
+# Go caches belong OUTSIDE this tree. A GOMODCACHE inside the repo makes
+# `make fmt-check` walk every vendored dependency's source and fail on
+# other people's formatting — which is how this rule was learnt, not a
+# hypothetical. If ~/go is read-only, point GOPATH/GOMODCACHE/GOCACHE at a
+# writable directory elsewhere rather than at a dotfile here.
/.gc/
/.gmc/